Yocto BSP layer for the Edgeble OpenAIA - https://www.openaia.io
This project is based on upstream - https://git.yoctoproject.org/meta-rockchip
Please see the corresponding sections below for details.
I. Build Host
II. Configure Yocto
III. Build Yocto
To install the required packages on a Debian based distribution (Ubuntu etc) run
sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential \
chrpath socat cpio python3 python3-pip python3-pexpect xz-utils \
debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa \
libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool
In order to build an image with BSP support for a given release, you need to download the corresponding layers described in the "Dependencies" section. Be sure that everything is in the same directory.
~ $ mkdir yocto; cd yocto
~/yocto $ git clone git://git.openembedded.org/bitbake -b master
~/yocto $ git clone git://git.openembedded.org/openembedded-core -b kirkstone
~/yocto $ git clone git://git.yoctoproject.org/meta-arm -b kirkstone
~/yocto $ git clone git://git.openembedded.org/meta-openembedded -b kirkstone
~/yocto $ git clone [email protected]:edgeble/meta-openaia.git -b kirkstone
And put the meta-openaia layer here too.
Then you need to source the configuration script:
~/yocto $ source openembedded-core/oe-init-build-env
Having done that, you can build a image for a edgeble boards by adding the location of the meta-openaia layer to bblayers.conf, along with any other layers needed.
For example:
# conf/bblayers.conf
BBLAYERS ?= " \
${TOPDIR}/../openembedded-core/meta\
${TOPDIR}/../meta-arm/meta-arm \
${TOPDIR}/../meta-arm/meta-arm-toolchain \
${TOPDIR}/../meta-openaia \
${TOPDIR}/../meta-openembedded/meta-oe \
${TOPDIR}/../meta-openembedded/meta-python \
${TOPDIR}/../meta-openembedded/meta-networking \
${TOPDIR}/../meta-swupdate \
${TOPDIR}/../meta-swupdate-boards \
"
To enable a particular machine, you need to add a MACHINE line naming the BSP to the local.conf file:
MACHINE = "neu2a-io"
Enable systemd in your Yocto configuration by adding the following to your local.conf file
INIT_MANAGER = "systemd"
Enable disto features needed to support the pacakges by adding the following to your local.conf file
DISTRO_FEATURES:append = " bluetooth wifi"
To enable Wifi using wpa_supplicant
Create the wpa_supplicant configuration file by running the following command on your desktop. This will prompt you for the passphrase for your WiFi. You may want to then edit the file to remove the clear-text passphrase:
wpa_passphrase 'YOUR_SSID' > ../meta-openaia/recipes-connectivity/wpa-supplicant/files/wpa_supplicant-nl80211-wlan0.conf
All supported machines can be found in meta-openaia/conf/machine.
You should then be able to build a image as such:
bitbake core-image-full-cmdline
bitbake update-image
At the end of a successful build, you should have an .wic image in /path/to/yocto/build/tmp-glibc/deploy/<MACHINE>/
If you want to boot the image on microSD card the follow below steps.
cd tmp-glibc/deploy/images/\<MACHINE\>
sudo bmaptool copy --bmap core-image-full-cmdline-neu2a-io.wic.bmap core-image-full-cmdline-neu2a-io.wic.xz /dev/sdX
A. Steps to run Hawkbit server latest in our PC ;-
- clone the Hawkbit server repo.
$ cd $HOME
$ git clone https://github.com/eclipse/hawkbit
- Run the Hawkbit server using following command.
$ cd hawkbit
$ sudo docker run -p 8080:8080 hawkbit/hawkbit-update-server:latest
- Run hawkbit server using browser with following url format.
<your ip address>:8080/UI/#!deployment
For example: http://192.168.0.105:8080/UI/#!deployment
- To access Hawkbit panel, enter username and password as admin.
B. Command for swupdate to connect hawkbit server in the Board ;-
root@neu6b-v1-5:/# swupdate -H neu6b-v1:1.0 -e stable,copy2 -f /etc/swupdate.cfg -l 5 -u '-t DEFAULT -u http://<Hawkbit server ip Address>:8080 -i DeviceID'
For example : root@neu6b-v1-5:/# swupdate -H neu6b-v1:1.0 -e stable,copy2 -f /etc/swupdate.cfg -l 5 -u '-t DEFAULT -u http://192.168.0.105:8080 -i DeviceID'
- Jagan Teki
<[email protected]>