to get help run
docker run yocto-bitbaker help
# or
docker run yocto-bitbaker --help
# or
docker run yocto-bitbaker -?
For simplicity set as you want upfront:
$ export YOCTO_ROOT="~/my-yocto/workdir"
$ export YOCTO_DONWLOAD="/my-yocto/download"
$ export YOCTO_PUBLISH="/my-html-base"
It is expected that a build.sh script exists in ${YOCTO_ROOT} folder
$ docker run --rm --user $(id -u):$(id -g) \
--volume $YOCTO_ROOT:/yocto/root \
--volume $YOCTO_CACHE:/yocto/cache \
--volume $YOCTO_PUBLISH:/yocto/publish \
yocto-bitbaker
alternatively, you can inject a script-path relative to your $YOCTO_ROOT. e.g.
$ docker run --rm --user $(id -u):$(id -g) \
--volume $YOCTO_ROOT:/yocto/root \
--volume $YOCTO_CACHE:/yocto/cache \
--volume $YOCTO_PUBLISH:/yocto/publish \
yocto-bitbaker --script scripts/my-build-script.sh
will execute: *~/my-yocto/workdir/scripts/my-build-script.sh
or you can run interactively.
$ docker run --rm --user $(id -u):$(id -g) \
--volume $YOCTO_ROOT:/yocto/root \
--volume $YOCTO_CACHE:/yocto/cache \
--volume $YOCTO_PUBLISH:/yocto/publish \
--interactive --tty yocto-bitbaker
The environment variables are set for interactive and script convenience:
whereby the VOLUME_PUBLISH_DIR is not set if no volume is injected. whereby the VOLUME_YOCTO_DIR is like Container workdir.
You can also overwrite the workdir to your favorite yocto-root dir. and provide a different another internal mount dir for Yocto root:
I.e. /yocto/root can be changed. like:
$ WORKDIR=/new/work/dir
$ docker run --rm --memory 6G --user $(id -u) \
--workdir $WORKDIR \
--volume $YOCTO_ROOT:$WORKDIR \
--volume $YOCTO_CACHE:/yocto/cache \
--volume $YOCTO_PUBLISH:/yocto/publish \
--interactive --tty yocto-bitbaker
A very simple script (without publishing) might look as follows:
#!/usr/bin/env bash
source sources/luminos/scripts/init-build-env
build core-image-minimal
Content type
Image
Digest
sha256:ee4a80df1…
Size
329.1 MB
Last updated
over 3 years ago
docker pull almedso/yocto-bitbaker