Skip to content
Snippets Groups Projects
Commit 89d3b54e authored by Eilís Ní Fhlannagáin's avatar Eilís Ní Fhlannagáin
Browse files

Merge branch 'removal-keypad-smartpanel-adjust-others' into 'main'

[Docs] Revamp of BP section in Oniro RTD

Closes #1

See merge request !2
parents fdace385 0516882b
No related branches found
No related tags found
1 merge request!2[Docs] Revamp of BP section in Oniro RTD
......@@ -46,6 +46,9 @@ copyright = '2021'
author = 'Oniro Project'
version = 'dunfell'
#probably has to be changed to kirkstone
release = version
# -- General configuration ---------------------------------------------------
......
......@@ -183,6 +183,20 @@ Get sources
===========
#.
Get |main_project_name| sources as described in the :ref:`blueprints workspace documentation <Workspace>`.
For this specific build, you need to
clone `meta-oniro-blueprints-doorlock <https://gitlab.eclipse.org/eclipse/oniro-blueprints/doorlock/meta-oniro-blueprints-doorlock>`_.
.. code-block:: bash
$ cd $CHECKOUT_DIR
$ git clone --recursive https://gitlab.eclipse.org/eclipse/oniro-blueprints/doorlock/meta-oniro-blueprints-doorlock.git
$ cd meta-oniro-blueprints-doorlock
.. note::
Make sure you define or replace
`CHECKOUT_DIR` as described in :ref:`blueprints workspace documentation <Workspace>`.
#.
If you already have sources cloned, update them to the most recent revision
......@@ -200,14 +214,15 @@ Build the software
$ TEMPLATECONF=../oniro/flavours/zephyr . ./oe-core/oe-init-build-env build-oniro-doorlock
#. Add the meta-homeassistant & meta-oniro-blueprints layers to the build.
#. Add the `meta-oniro-blueprints-doorlock`` & `meta-oniro-blueprints-core` layers to the build.
This is only needed once after initializing a new build.
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-doorlock/meta-oniro-blueprints-core
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-doorlock/meta-oniro-blueprints-doorlock
#. Start building the image
......@@ -236,7 +251,7 @@ Alternative way of building the software (using west)
$ cd doorlock
$ west init --mr v2.7.0
$ west update
$ git clone https://booting.oniroproject.org/distro/blueprints/doorlock/doorlock-zephyr
$ git clone https://gitlab.eclipse.org/eclipse/oniro-blueprints/doorlock/doorlock-zephyr.git
$ west build -p auto -b arduino_nano_33_ble doorlock-zephyr
Flashing the software when built with west
......@@ -265,6 +280,9 @@ Resources
- See `Door lock's requirement <https://git.ostc-eu.org/OSTC/requirements/-/issues/12>`_
..
We probably have to move those requirement to gitlab.eclipse
*******************
Using the door lock
*******************
......@@ -292,7 +310,7 @@ as described in "Setting a pin".
Forgotten pin
=============
There is no "master key". If you've forgotten your pin, flash the separate `factory reset app <https://booting.oniroproject.org/distro/blueprints/doorlock/doorlock-factoryreset>`_, boot it, then reflash the doorlock app.
There is no "master key". If you've forgotten your pin, flash the separate `factory reset app <https://gitlab.eclipse.org/eclipse/oniro-blueprints/doorlock/doorlock-factoryreset>`_, boot it, then reflash the doorlock app.
Build the factory reset firmware
================================
......@@ -304,7 +322,7 @@ Build the factory reset firmware
$ cd doorlock-factoryreset
$ west init --mr v2.7.0
$ west update
$ git clone https://booting.oniroproject.org/distro/blueprints/doorlock/doorlock-factoryreset
$ git clone https://gitlab.eclipse.org/eclipse/oniro-blueprints/doorlock/doorlock-factoryreset.git
$ west build -p auto -b arduino_nano_33_ble doorlock-factoryreset
Flashing the factory reset firmware
......
......@@ -67,9 +67,7 @@ This section details the available blueprints provided as part of the |main_proj
.. toctree::
:maxdepth: 1
smart-panel
doorlock
keypad
transparent-gateway
vending-machine
......
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ./definitions.rst
KeyPad Blueprint
#####################
.. contents::
:depth: 4
.. attention::
The `TouchPannel` blueprint is still a work in progress (WIP). For more
information, see the :ref:`resources <Resources>` section.
Overview
********
The KeyPad Blueprint provides support for building a PoC smart touch panel that can be used in other smart devices to accept input and display status. Some features to demonstrate include:
#. Accepting input from a keypad
#. Accepting input from UI icons on a touch panel
#. Ability to send input data securely over the network
.. image:: assets/keypad-nRF52840.jpg
:alt: Keypad on nRF52840-DK
Hardware Setup - Bill of Materials
**********************************
The current version of keypad can be deployed to Nordic's nRF52840-DK
- 1 x `nRF52840-DK
<https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK>`_
- 1 x `2.8" TFT Touch Shield for Arduino w/Capacitive Touch
<https://www.adafruit.com/product/1947>`_
- 1 x Micro USB cable
Get sources
***********
Get or update the |main_project_name| sources as described in the
:ref:`blueprints workspace documentation <Workspace>`.
The quick steps are detailed as follows:
.. code-block:: bash
$ export CHECKOUT_DIR=~/oniroproject
$ mkdir -p "${CHECKOUT_DIR}" ; cd "$CHECKOUT_DIR"
$ # Download sources
$ repo init -u https://booting.oniroproject.org/distro/oniro -b dunfell
$ git clone https://booting.oniroproject.org/distro/meta-oniro-blueprints --branch dunfell --depth 1
$ git clone https://github.com/meta-homeassistant/meta-homeassistant --branch dunfell --depth 1
$ repo sync
$ # Configure environement and build directory for supported hardware
$ TEMPLATECONF=../oniro/flavours/zephyr . ./oe-core/oe-init-build-env build-oniro-zephyr
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ export MACHINE=nrf52840dk-nrf52840
$ # Build firmware image
$ bitbake zephyr-blueprint-keypad
$ du -hs ./tmp-newlib/deploy/images/nrf52840dk-nrf52840/zephyr-blueprint-keypad.bin # 148K
Then plug the board to USB connector (the one near the battery), then it should be detected by Linux system:
.. code-block:: bash
$ sudo dmesg
[...] usb 2-1.7: Product: J-Link
[...] usb 2-1.7: Manufacturer: SEGGER
(...)
$ ls /dev/disk/by-id/usb-SEGGER_MSD_Volume_*
$ sudo mkdir /tmp/usb
$ sudo mount /dev/disk/by-id/usb-SEGGER_MSD_Volume_*-0\:0 /mnt/usb
$ sudo cp -v /tmp-newlib/deploy/images/nrf52840dk-nrf52840/zephyr-blueprint-keypad.bin /mnt/usb
Display should show the keypad on reset.
Resources
=========
.. _Resources:
- See `KeyPad's requirement <https://git.ostc-eu.org/OSTC/planning/blueprints/-/issues/1>`_
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ./definitions.rst
Smart Panel Blueprint
#####################
.. contents::
:depth: 4
Overview
********
The Smart Panel Blueprint provides support for building a PoC for a home
automation system with components showing the capabilities of the build
infrastructure in leveraging different kernels for building an end to end
solution.
The setup is composed of an Avenger96 board acting as a gateway and running
HomeAssistant. The gateway also provides UI as a browser connected to the
localhost HomeAssistant server. The gateway is connected over Bluetooth to two
Nitrogen boards exposing sensors and/or actuator (e.g. controlled light source).
.. image:: assets/smart-home-blueprint-arch.png
.. uml::
title
<b>High level connection diagram
end title
node "Avenger96" #11AAFF {
[Linux]
}
node "Nitrogen #1" #116699 {
[Zephyr#1]
}
node "Nitrogen #2" #116699 {
[Zephyr#2]
}
[LED] #3BB300
[LCD] #3BB300
[MotionSensor] #3BB300
[HumidityTemperature] #3BB300
[Display]
[Linux] --> [Display] : HDMI
[Zephyr#1] --> Linux : BLE
[Zephyr#1] --> LCD : I2C
[Zephyr#1] <-- MotionSensor : I2C
[Zephyr#1] <-- HumidityTemperature : GPIO
[Zephyr#2] <-- Linux : BLE
[Zephyr#2] --> LED : GPIO
legend
|= Legend: |
|<back:#11AAFF>Avenger96:96Boards</back>|
|<back:#116699>Nitrogen:96Boards</back>|
|<back:#3BB300>Grove sensors</back>|
endlegend
[Human] --> [Display]
Bill of materials
*****************
IoT controller (Avenger96)
--------------------------
Equipment
^^^^^^^^^
* 1x 96Boards Avenger96
* 1x Power supply 12 V minimum 2 A,
* 1x microSD card at least 8 GB,
* 1x HDMI touch screen,
Cables and connectors
^^^^^^^^^^^^^^^^^^^^^
* 1x HDMI-HDMI.
* 1x microUSB-USB type A cable.
* 1x Ethernet cable.
IoT devices (Nitrogens)
-----------------------
Equipment
^^^^^^^^^
* 2x 96Boards Nitrogen,
* 2x Grove Mezzanine board,
* 1x Grove LED module,
* 1x Grove DHT11 temperature and humidity sensor,
* 1x Grove AK9753 human presence sensor,
* 1x Grove LCD RGB Backlight screen,
Cables and connectors
^^^^^^^^^^^^^^^^^^^^^
* 4x Grove connector cables,
* 2x microUSB cable.
Assembly
********
IoT controller
--------------
#. Connect the screen's display output with the board using HDMI cable.
#. Connect the screen's touch controller with the board using USB cable.
#. The board to a network with DHCP server configured using the Ethernet cable.
#. Do not insert the microSD card into the board's slot. It will be needed for
flashing.
#. Connect power supply to the power jack.
.. image:: assets/smarthome-blueprint-assembled.jpg
:alt: The whole assembled setup with labels
IoT devices
-----------
#. Connect Grove Mezzanine boards to both Nitrogen boards. One of them will act
as a light switching device, the other as sensors device.
#. Assemble the light switching device:
* Connect Grove LED module to GPIO IJ port on the Mezzanine board.
#. Assemble the sensors device:
* Connect Grove DHT11 module to GPIO GH port on the Mezzanine board,
* Connect Grove AK9753 module to GPIO KL port on the Mezzanine board,
* Connect Grove LCD module to I2C0 port on the Mezzanine board,
#. Connect Nitrogens to your computer with microUSB cables.
Get sources
***********
Get or update |main_project_name| sources as described in the :ref:`blueprints
workspace documentation <Workspace>`.
.. note::
Mind the `CHECKOUT_DIR` variable in the workspace documentation as you will
need them below.
Prepare IoT devices (Nitrogen/Zephyr flavour)
*********************************************
Build
-----
#.
Create build directory
.. code-block:: bash
$ TEMPLATECONF=../oniro/flavours/zephyr . ./oe-core/oe-init-build-env build-oniro-zephyr-96b-nitrogen
#.
Edit ``conf/local.conf``, and uncomment the following line:
.. code-block:: bash
#MACHINE ?= "96b-nitrogen"
#.
Add the `meta-oniro-blueprints` layer to the build. This is only needed once
after initializing a new build:
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
#.
Build ``zephyr-blueprint-smarthome-sensors`` image using ``bitbake``,
with the following override:
.. code-block:: bash
$ DISTRO=oniro-zephyr-blueprint-dashboard bitbake zephyr-blueprint-smarthome-sensors
.. note::
* The build will configure the MAC address with sane defaults. If you
want a custom MAC address, you can prepend to the command above the
following:
BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SMART_HOME_SENSORS_MAC" SMART_HOME_SENSORS_MAC="<custom_mac_address>"
* The MAC address can have any value provided it starts with ``C0`` and
is unique in your environment.
#.
Make sure you have at least 3 GB of free space on the partition
where the build directory is located.
#.
Build ``zephyr-blueprint-smarthome-switch`` image using ``bitbake``,
with the following override:
* ``SMART_HOME_SWITCH_MAC`` set to MAC address of the IoT device.
**It must be different than the MAC address used in the previous step**.
.. code-block:: bash
$ DISTRO=oniro-zephyr-blueprint-dashboard bitbake zephyr-blueprint-smarthome-switch
.. note::
* The build will configure the MAC address with sane defaults. If you
want a custom MAC address, you can prepend to the command above the
following:
BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SMART_HOME_SWITCH_MAC" SMART_HOME_SWITCH_MAC="<custom_mac_address>"
* The MAC address can have any value provided it starts with ``C0`` and
is unique in your environment.
Flash
-----
#.
Connect 96Boards Nitrogen boards to your computer.
#.
Assuming both boards are connected simultaneously, retrieve their IDs
.. code-block:: bash
$ pyocd list
# Probe Unique ID
---------------------------------------------------
0 Arch BLE [nrf51] 9009022103BB2A02FE6545F3
1 Arch BLE [nrf51] 9009022103BB3A2DFE6555DC
If you do not have PyOCD in your system, follow the guide in the PyOCD section of the
`Nitrogen documentation <https://docs.oniroproject.org/en/latest/oniro/hardware-support/boards/96b-nitrogen.html#supportedboardnitrogenpyocd>`_.
#.
Flash the first board with ``zephyr-blueprint-smarthome-sensors`` image. Use the same
command you used for build, with the following changes:
* add ``-c flash_usb`` suffix,
* remove the MAC address override (it is only effective at build time),
* add board ID override in the form of:
``BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" PYOCD_FLASH_IDS="<id>"``
.. code-block:: bash
$ BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" \
PYOCD_FLASH_IDS="9009022103BB2A02FE6545F3" bitbake zephyr-blueprint-smarthome-sensors -c flash_usb
#.
Flash the other board with ``zephyr-blueprint-smarthome-switch`` image
.. code-block:: bash
$ BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE PYOCD_FLASH_IDS" \
PYOCD_FLASH_IDS="9009022103BB3A2DFE6555DC" bitbake zephyr-blueprint-smarthome-switch -c flash_usb
Prepare IoT controller (Avenger96/Linux flavour)
************************************************
Build
-----
#.
Create build directory
.. code-block:: bash
$ TEMPLATECONF=../oniro/flavours/linux . ./oe-core/oe-init-build-env build-oniro-linux-stm32mp1-av96
#.
Edit ``conf/local.conf``, and uncomment the following line:
.. code-block:: bash
#MACHINE ?= "stm32mp1-av96"
#.
Add the `meta-oniro-blueprints` layer to the build. This is only needed once
after initializing a new build:
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
#.
Make sure you have at least 25 GB of free space on the partition
where the build directory is located.
#. Build ``blueprint-dashboard-gateway-image`` image using ``bitbake``,
with the following overrides:
* ``DISTRO`` set to ``oniro-linux-blueprint-dashboard`` --
this distribution configuration enhances the regular distribution
with dependencies necessary for this demonstration scenario,
* ``SMART_HOME_SENSORS_MAC`` and ``SMART_HOME_SWITCH_MAC`` set to MAC
addresses of IoT devices, as set in the previous section.
.. code-block:: bash
$ DISTRO=oniro-linux-blueprint-dashboard \
BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SMART_HOME_SENSORS_MAC SMART_HOME_SWITCH_MAC" \
SMART_HOME_SENSORS_MAC="C0:BA:DD:06:F0:0D" \
SMART_HOME_SWITCH_MAC="C0:BA:DD:06:F0:0E" \
bitbake blueprint-dashboard-gateway-image
Flash
-----
#.
Build artifacts are located in ``./tmp/deploy/images/stm32mp1-av96/`` relative
to the build directory. Flashing script is located in
``./scripts/create_sdcard_from_flashlayout.sh`` relative to the build artifacts
directory. FSD card flash layout used to convert build artifacts to the image is
located in ``flashlayout_<image name>/extensible/FlashLayout_sdcard_stm32mp157a-av96-extensible.tsv``
relative to the build artifacts directory.
#.
Go to the build artifacts directory and convert flash layout into a build image
.. code-block:: bash
$ cd tmp/deploy/images/stm32mp1-av96
$ ./scripts/create_sdcard_from_flashlayout.sh \
flashlayout_blueprint-dashboard-gateway-image/extensible/FlashLayout_sdcard_stm32mp157a-av96-extensible.tsv
#.
Lots of text will appear, but the most important part are the two commands
.. code-block:: bash
WARNING: before to use the command dd, please umount all the partitions
associated to SDCARD.
sudo umount `lsblk --list | grep <sd card name> | grep part | gawk '{ print $7 }' | tr '\n' ' '`
To put this raw image on sdcard
sudo dd if=<image>.raw of=<sd card node> bs=8M conv=fdatasync status=progress
#. Put a microSD card in your card reader. Copy the commands above and paste them
into your terminal. Do not remove the microSD card from the reader just yet.
Add Bluetooth firmware
----------------------
Due to licensing details, |main_project_name| cannot provide the firmware file for
the on-board Bluetooth controller. However, user may download and install it
manually.
#. Download the `Bluetooth firmware file from GitHub <https://github.com/dh-electronics/meta-av96/raw/9d2a3fdacf49aebc9298a7c444f5a021d3e99e13/recipes-bsp/firmware-files/files/lib/firmware/brcm/BCM4345C0.hcd>`_.
#. Create directory ``lib/firmware/brcm`` on the ``rootfs`` partition of the
microSD card and copy the downloaded file into that directory. Assuming your
card's mount point is ``/mnt/rootfs``, you may use the example commands to
accomplish that:
.. code-block:: bash
$ sudo mkdir /mnt/rootfs/lib/firmware/brcm
$ sudo cp ~/Downloads/BCM4345C0.hcd /mnt/rootfs/lib/firmware/brcm
$ sudo chmod 755 /mnt/rootfs/lib/firmware/brcm
#. Unmount all microSD card partitions, remove them from the reader and put
it in Avenger96 card slot. Power up the board.
Home Assistant
**************
Set up
------
#. Put ths SD card into Avenger96 and press power on button.
#. On start up, Avenger96 will try to contact a DHCP server. Be sure to
have one in your network, where you can see the IP address assigned to
the board. Alternatively, you can use UART-USB adapter, log in to the
system and set IP address manually.
#. Using a web browser, go to the IP address of Avenger96, port ``8123``.
E.g. if you find out the Avenger's IP address is ``192.0.2.137`` , go to
``http://192.0.2.137:8123``.
#. Create a user account and click your way through the basic settings.
#. You should find yourself in Home Assistant dashboard. Three circular
icons on top show temperature, humidity and human presence.
.. image:: assets/smarthome-blueprint-dashboard.png
:alt: Home Assistant dashboard
Customizing the Dashboard
-------------------------
#. Click three vertical dots in the top-right corner of the dashboard
and select ``Configure UI``.
#. Agree to take control over the UI, remove the default widgets and
click the yellow ``+`` button in the bottom-right corner of the dashboard.
#. Choose widgets according to your taste. They are already pre-configured,
connected to the existing sensors (temperature, humidity, human presence)
and light controls.
#. Adjust widgets configuration according to your taste. Most notable
possibility is that you can combine multiple entities in one widget,
e.g. creating a single widget with all the sensors and a light control
switch.
.. image:: assets/smarthome-blueprint-dashboard-config.png
:alt: Home Assistant dashboard configuration
.. image:: assets/smarthome-blueprint-dashboard-config-done.png
:alt: Home Assistant dashboard finished configuration
Set up automations
------------------
Home Assistant can do things for you based on state sensors. This is how
Home Assistant can be configured to turn the light on/off based on
user presence nearby the human presence sensor. Imagine it is a kitchen
light turning on every time it detects you are about to prepare a meal!
#. Go to Configuration menu using the cog button located on the left-hand
sidebar, then to Automations.
#. Click the yellow ``+`` button in the bottom-right corner of the screen, then
skip the smart automations generator.
#. Name your automation accordingly, e.g. *Lights on when somebody in the room*.
#. Set the trigger as follows:
* Trigger type: ``State``,
* Entity: ``sensor.all_scenarios_os_smarthome_device_presence``,
* From: ``False`` (*person not detected*).
* To: ``True`` (*person detected*)/
.. image:: assets/smarthome-blueprint-dashboard-automations-trigger.png
:alt: Home Assistant dashboard automations trigger
#.
Set the action as follows:
* Action type: ``Call service``,
* Service: ``switch.turn_on``,
* Name(s) of entities to turn on: ``switch.all_scenarios_os_smarthome_device_light``.
.. image:: assets/smarthome-blueprint-dashboard-automations-action.png
:alt: Home Assistant dashboard automations action
#.
Click the yellow save button in the bottom-right corner of the screen.
#. Repeat steps 2-6 for the opposite automation, i.e. turning the light off,
when human presence state switches from ``True`` to ``False``.
Verify operations
*****************
#. Temperature and humidity readings should show temperature and humidity
in the room where the Nitrogen with sensors is located. Try to blow
hot/cold air on the sensor to see values changing
#. Human presence state should change when you move your hand close to
the sensor.
#. The light switch should control the LED.
#. The LED should turn on/off automatically when human presence is detected.
#. The LCD screen should display the current temperature, humidity
and the connection state marked with a ``<B>`` symbol.
......@@ -123,7 +123,7 @@ Using the default Wi-Fi access point configuration, create an AP on channel 6 in
`SSID: "Oniro Project WiFi"`
`Passphrase: "12345678"`
For more details, refer to the `NetworkManager configuration file <https://booting.oniroproject.org/distro/oniro/-/blob/dunfell/meta-oniro-blueprints/recipes-connectivity/networkmanager/networkmanager-softap-config/SoftAP.nmconnection>`_ to get more clarity.
For more details, refer to the `NetworkManager configuration file <https://gitlab.eclipse.org/eclipse/oniro-blueprints/core/meta-oniro-blueprints-core/-/blob/master/recipes-connectivity/networkmanager/networkmanager-softap-config/SoftAP.nmconnection>`_ to get more clarity.
OpenThread Border Router Configuration
**************************************
......@@ -135,4 +135,4 @@ In our default OpenThread border router configuration, we create an OpenThread m
`Networkname "OniroThread"`
`OpenThread masterkey: 00112233445566778899aabbccddeeff`
For more details, refer to the `OpenThread configuration script <https://booting.oniroproject.org/distro/oniro/-/blob/dunfell/meta-oniro-blueprints/recipes-connectivity/openthread/ot-br-posix/otbr-configuration>`_ for getting more clarity.
For more details, refer to the `OpenThread configuration script <https://gitlab.eclipse.org/eclipse/oniro-blueprints/core/meta-oniro-blueprints-core/-/blob/master/recipes-connectivity/openthread/ot-br-posix/otbr-configuration>`_ for getting more clarity.
......@@ -67,11 +67,21 @@ The final piece remaining after building the hardware setup is fetching the
software sources and building the OS.
For fetching or updating the build metadata, follow the :ref:`blueprints
workspace documentation <Workspace>`. Doing so, brings everything you need on your host to start building an image for this blueprint.
workspace documentation <Workspace>`. Doing so, brings everything you need on your host
to start building an image for this blueprint. For this specific build, you need to
clone `meta-oniro-blueprints-gateway <https://gitlab.eclipse.org/eclipse/oniro-blueprints/transparent-gateway/meta-oniro-blueprints-gateway>`_.
.. code-block:: bash
$ cd $CHECKOUT_DIR
$ git clone --recursive https://gitlab.eclipse.org/eclipse/oniro-blueprints/transparent-gateway/meta-oniro-blueprints-gateway.git
$ cd meta-oniro-blueprints-gateway
$ git checkout origin/main
.. note::
Ensure to `CHECKOUT_DIR` variable in the workspace documentation as you need the variable during the process
Make sure you define or replace
`CHECKOUT_DIR` as described in :ref:`blueprints workspace documentation <Workspace>`.
Build the Oniro Image for the Gateway
-------------------------------------
......@@ -85,13 +95,13 @@ Once you have a workspace initialized as per the instructions in the preceding s
Executing the command sets up a new build environment in the `build-oniro-gateway` directory (or reuse it, if it already exists).
Add the `meta-oniro-blueprints` layer to the build. This is only needed once
after initializing a new build:
Add `meta-oniro-blueprints-gateway` layer to the build.
This is only needed once after initializing a new build:
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-gateway/meta-oniro-blueprints-core
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-gateway/meta-oniro-blueprints-gateway
Once the build environment is set, start building the image.
......@@ -135,13 +145,13 @@ ready to build the OS. The following command sets up a new build environment in
$ cd $CHECKOUT_DIR
$ TEMPLATECONF=../oniro/flavours/zephyr . ./oe-core/oe-init-build-env build-oniro-mesh-node
Add the `meta-oniro-blueprints` layer to the build. This is only needed once
after initializing a new build:
Add layer `meta-oniro-blueprints-gateway` to the build.
This is only needed once after initializing a new build:
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-gateway/meta-oniro-blueprints-core
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-gateway/meta-oniro-blueprints-gateway
Once the build environment is set, start building the image.
......
......@@ -140,13 +140,21 @@ The final piece remaining after building the hardware setup is fetching the
software sources and building the OS.
For fetching or updating the build metadata, follow the :ref:`blueprints
workspace documentation <Workspace>`. This will bring everything you need on
your host to start building an image for this blueprint.
workspace documentation <Workspace>`.
For this specific build, you need to
clone `meta-oniro-blueprints-vending-machine <https://gitlab.eclipse.org/eclipse/oniro-blueprints/vending-machine/meta-oniro-blueprints-vending-machine>`_.
.. code-block:: bash
$ cd $CHECKOUT_DIR
$ git clone --recursive https://gitlab.eclipse.org/eclipse/oniro-blueprints/vending-machine/meta-oniro-blueprints-vending-machine.git
$ cd meta-oniro-blueprints-gateway
.. note::
Mind the `CHECKOUT_DIR` variable in the workspace documentation as you will
need them below.
Make sure you define or replace
`CHECKOUT_DIR` as described in :ref:`blueprints workspace documentation <Workspace>`.
Build the Oniro Image for the Vending Machine Blueprint
-------------------------------------------------------
......@@ -161,13 +169,13 @@ ready to build the OS. Firstly, you will be initialising a build:
This will setup a new build environment in the `build-oniro-vending-machine`
directory (or reuse it if it already exists).
Add the `meta-oniro-blueprints` layer to the build. This is only needed once
after initializing a new build:
Add layers which are inside `meta-oniro-blueprints-vending-machine` to the build.
This is only needed once after initializing a new build:
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-vending-machine/meta-oniro-blueprints-core
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-vending-machine/meta-oniro-blueprints-vending-machine
Once the build environment is set we can start building the image. The building
command will be slightly different depending on the target board.
......@@ -211,13 +219,13 @@ For the Raspberry Pi 4B-based setup:
.. code-block:: bash
$ sudo bmaptool copy ./tmp/deploy/images/raspberrypi4-64/blueprint-vending-machine-image-raspberrypi4-64.wic.bz2 "$DEVICE"
$ sudo bmaptool copy ./tmp/deploy/images/raspberrypi4-64/blueprint-vending-machine-image-raspberrypi4-64.wic.gz "$DEVICE"
For the SECO b68-based setup:
.. code-block:: bash
$ sudo bmaptool copy ./tmp/deploy/images/seco-intel-b68/blueprint-vending-machine-image-seco-intel-b68.wic "$DEVICE"
$ sudo bmaptool copy ./tmp/deploy/images/seco-intel-b68/blueprint-vending-machine-image-seco-intel-b68.wic.gz "$DEVICE"
Running the Vending Machine Blueprint Image
*******************************************
......@@ -249,4 +257,4 @@ Resources
.. _ResourcesVM:
- See `Vending machine's requirement <https://git.ostc-eu.org/OSTC/requirements/-/issues/80>`_
- See `Vending machine's requirements <https://git.ostc-eu.org/OSTC/requirements/-/issues/80>`_
......@@ -36,50 +36,31 @@ layers set up in the build. The general steps are:
$ export CHECKOUT_DIR=~/oniroproject
$ mkdir -p $CHECKOUT_DIR
#. Clone `meta-oniro-blueprints
<https://booting.oniroproject.org/distro/meta-oniro-blueprints>`_:
#. Clone the layer for the blueprint which you want to add:
.. code-block:: bash
$ cd $CHECKOUT_DIR
$ git clone https://booting.oniroproject.org/distro/meta-oniro-blueprints
$ cd meta-oniro-blueprints
$ git checkout origin/dunfell
#. Clone the dependencies of the `meta-oniro-blueprints` layer that are not
brought in by `oniro` by default:
* `meta-homeassistant <https://github.com/meta-homeassistant/meta-homeassistant>`_
.. code-block:: bash
$ cd $CHECKOUT_DIR
$ git clone https://github.com/meta-homeassistant/meta-homeassistant.git
$ cd meta-homeassistant
$ git checkout origin/dunfell
.. note::
If you already have any of these layers cloned and you want to reuse
them, just update the revision of the branch above.
$ git clone --recursive https://gitlab.eclipse.org/eclipse/oniro-blueprints/<name-of-the-blueprint>/meta-oniro-blueprints-<name-of-the-blueprint>
$ cd meta-oniro-blueprints-<name-of-the-blueprint>
#. The first time a build is initialized, after running the `oe-init-build-env`
script, add that layers to the build's `bblayers.conf` either manually or by
running:
script, add all layers present in `meta-oniro-blueprints-<name-of-the-blueprint>`
to the build's `bblayers.conf` either manually or by
running (for each layer separately):
.. code-block:: bash
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-homeassistant
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints
$ bitbake-layers add-layer $CHECKOUT_DIR/meta-oniro-blueprints-<name-of-the-blueprint>/<name-of-a-layer>
.. note::
If 'oniro-blueprints-core' layer exists in blueprint directory, you may need to add it first.
.. attention::
Make sure you define (as per the instructions above) or replace
`CHECKOUT_DIR` accordingly.
.. attention::
Als, the order above is important as `meta-homeassistant` is a dependency
of `meta-oniro-blueprints`.
Make sure you define (as per the instructions above) or replace
`CHECKOUT_DIR` accordingly.
#. Once that is done. Follow the specific blueprint's build instructions.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment