-
Notifications
You must be signed in to change notification settings - Fork 0
yocto
Download from website
Inside the unpacked poky
folder run
source oe-init-build-env <opt-path-for-build-folder_-_default-is./build>
to setup the build environment. Some files were generated:
...
├── build
│ └── conf
│ ├── bblayers.conf
│ ├── local.conf --> Variables that influence the BitBake build (can override settings from other files)
│ └── templateconf.cfg
...
- To share source downloads between build environments place the
DL_DIR
directory outside the build environment likeDL_DIR ?= "${TOPDIR}/../poky-src-dl"
- Same for
SSTATE_DIR
(holds shared state cache) ->SSTATE_DIR ?= "${TOPDIR}/../sstate-cache"
-
TMP_DIR
(contains build output and intermediate results) can be very big (gigabytes of data)- To save disk space you can add
INHERIT += rm_work
to your config. This deletes the files after building.
- To save disk space you can add
Just run:
# bitbake <build-target>
bitbake core-image-sato
from the top level directory of your build environment.
- Use
-c fetchall
to download all sources first without building (->bitbake -c fetchall core-image-sato
) -
-k
lets you continue the build if it led into an error if there are tasks left and are not dependent to the error
===============
- Bitbake target: TODO
- ...
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm
git clone git://git.yoctoproject.org/poky
Check out and branch a specific release:
cd poky
git fetch --tags
git tag
git checkout tags/yocto-3.0.1 -b my-yocto-3.0.1
Inside the poky
folder run source oe-init-build-env
(the location of the build
folder depends on your current working directory).
Only in terminals in which source oe-init-build-env
was executed some commands get available.
The script:
- creates a
build
directory -
poky/build/conf/local.conf
got created which holds local configuration options
Speed-up the download for the build using mirrors:
You can significantly speed up your build and guard against fetcher failures by using mirrors. To use mirrors, add these lines to your local.conf file in the Build directory:
SSTATE_MIRRORS = "\
file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH \n \
file://.* http://sstate.yoctoproject.org/2.7.2/PATH;downloadfilename=PATH \n \
file://.* http://sstate.yoctoproject.org/3.0.1/PATH;downloadfilename=PATH \n \
"
See also http://sstate.yoctoproject.org/ for all versions.
bitbake core-image-sato
# ^^^^^^^^^^^^^^^---- target
runqemu qemux86
In general, layers are repositories that contain related sets of instructions and configurations that tell the Yocto Project what to do.
From: https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html
By convention start layer names with meta-
.
For instance:
$ tree -L 1
.
├── bitbake
├── build
├── contrib
├── documentation
├── LICENSE
├── LICENSE.GPL-2.0-only
├── LICENSE.MIT
├── meta
├── meta-poky
├── meta-selftest
├── meta-skeleton
├── meta-yocto-bsp
├── oe-init-build-env
├── poky-src-dl
├── README.hardware -> meta-yocto-bsp/README.hardware
├── README.OE-Core
├── README.poky -> meta-poky/README.poky
├── README.qemu
├── scripts
└── sstate-cache
...into the poky directory.
Add the new layer:
bitbake-layers add-layer ../meta-altera
->poky/build/conf/bblayers.conf
(variable BBLAYERS
) gets modified (possibly other files as well).
Create new layers with:
bitbake-layers create-layer
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License *.
Code (snippets) are licensed under a MIT License *.
* Unless stated otherwise