an unattended script to setup build environment for ma35d1 on native Linux without inside docker, anytime anywhere run it!
Ubuntu Desktop 20.04.3 64-bit LTS
- Disconnect the computer from network before installing Ubuntu Desktop 20.04.3 64-bit LTS
- Install Ubuntu Desktop 20.04.3 64-bit LTS
- Connect the computer to network
- Fetch this script
- Execute this script, with or without argument YP_DIR. Without YP_DIR, script will fetch remote repositories into current directory, otherwise fetch code into YP_DIR
$ source /path/to/setup_ma35d1.sh <YP_DIR>The MA35D1 yocto project supports three boards: IoT, EVB, and SOM.
When the script prompts to select board, just type 'i' for IoT, 'e' for EVB, and 's' for SOM. By default, if user does not choose the board, EVB board will be selected.
| BOARD | DISTRO | MACHINE | IMAGE |
|---|---|---|---|
| EVB | nvt-ma35d1-directfb | ma35d1-evb | nvt-image-qt5 |
| core-image-minimal | |||
| IOT | nvt-ma35d1 | ma35d1-iot | core-image-minimal |
| SOM | nvt-ma35d1 | ma35d1-som | core-image-minimal |
| ma35d1-som-1gb |
Once the image is built out, the script will generate SDK for individual developer. Developers can use the standalone SDK toolchain on another machine to develop software with the same root filesystem content as the target device.
If extra features are enabled in image after the SDK generation is done, basically, the script should regenerate the SDK.
Enabling features in image means changing the EXTRA_IMAGE_FEATURES and IMAGE_INSTALL in local build configuration file ${YP_DIR}/build/conf/local.conf
Offline build can accelerate the next-time image generation, provided that the bitbake completes its image recipe at least one time. However, if server has updated the repositories, bitbake will miss the latest important fixes.
In another words, disabling offline build lead bitbake to fetch latest code.
To force enabling offline build on another machine that does not initialize the build environment at all, take the subsequent steps
- prepare an empty directory YP_DIR (/path/to/yocto)
- change current directory to YP_DIR
- copy the downloaded dependency package downloads.tar.gz to this directory YP_DIR
- extract the dependency package downloads.tar.gz
- launch this script.
$ mkdir -p /path/to/yocto
$ cd /path/to/yocto
$ cp /path/to/downloads.tar.gz $PWD
$ tar xzvf downloads.tar.gz
$ source /path/to/setup_ma35d1.sh
To download all the dependency packages downloads.tar.gz without actually building image, issue the below command
$ bitbake core-image-minimal -c fetchall
Usually, due to unstable network connection, this script often is executed unsuccessfully. Reexcuting this script again and again can make the build passed, but that is not recommended.
If the script has synchronized the repository (repo sync --force-sync) without problem, open another terminal (press Ctrl + Alt + T or Ctrl + Shift + T) and follow the below steps to make the build passed.
for EVB
$ cd ~/Project/yocto
DISTRO=nvt-ma35d1-directfb MACHINE=ma35d1-evb source sources/init-build-env build
bitbake nvt-image-qt5for IoT
$ cd ~/Project/yocto
DISTRO=nvt-ma35d1 MACHINE=ma35d1-iot source sources/init-build-env build
bitbake core-image-minimalfor SOM
$ cd ~/Project/yocto
DISTRO=nvt-ma35d1 MACHINE=ma35d1-som source sources/init-build-env build
bitbake core-image-minimalDo 'bitbake nvt-image-qt5' again and again until the final image is generated out! Note that this script uses shell command 'until bitbake nvt-image-qt5' to ensure the image is built out.