To build Yocto images to Toradex, will need a supported OS.
This repo is a proof of concept of using any GNU/Linux that supports Docker can build Toradex images.
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
Do below steps to setup;
Create temporary dirs with helper tool;
cd <where-this-project-located>
./tools/create-tmp-dirs.sh /disk-path-that-have-lots-of-space tmp-dir-name
Path should have at least 60GB disk space. You may want to check .env
file before use.
If you are planning to use multiple builders, you should consider sharing downloads dir with MY_YOCTO_DOWNLOADS
variable.
Build container:
cd <where-this-project-located>
docker-compose up --build --no-start
At any change to .env
file, you may need to run above command.
Take a look at build/conf/local.conf
file and change for your needs. You may want to;
MACHINE
,EXTRA_IMAGE_FEATURES
,Please do not change dirs that start with /yocto-*
, unless know what you are doing.
Start container;
./start.sh
Fetch layers with repo tool.
repo init -u https://git.toradex.com/toradex-manifest.git -m tdxref/default.xml -b refs/tags/6.4.0
repo sync -j16 # -jXX: cpu core count
Open a second console, and fix permissions before exit;
docker-compose exec -u root builder bash
chown yoctouser:yoctouser -R /yocto
Repo contains additionally;
To start and enter the container;
cd <where-this-project-located>
./start.sh
Then, you can use bitbake
. For example;
bitbake example
: build example
package.bitbake minimal-image -k
: build minimal image.bitbake minimal-image-sdk -c populate_sdk
: create minimal image SDK.bitbake -c listtasks virtual/kernel
: list available tasks to give like bitbake pacakge -c ...
.Packages will be in $MY_YOCTO_DEPLOY/ipk/
dir, and images will be in $MY_YOCTO_DEPLOY/images/
.
For more information; Toradex Wiki: openembedded-core, Yocto Manual.
You can extract ipk with extract-ipk.sh
. For ex;
cd <where-this-project-located>
./tools/extract-ipk.sh app
Command will extract /usr/bin/*
files into tools/extract-ipk-app/
dir.
Default user is yoctouser
. Probably, you will not need the root user while using the container.
If you need, run below commands to use the root
user.
cd <where-this-project-located>
docker-compose start
docker-compose exec -u root builder bash