tree: 2839a9ea8dbc68b9e4e60254a28a48beaf2b24bd [path history] [tgz]
  1. Dockerfile.firmware
  2. Dockerfile.updater
  3. firmware_build.sh
  4. README.generate_compiled.md
  5. README.md
  6. requirements.compiled
  7. zephyr_yaml_edit.py
dockerfiles/README.md

These dockerfiles and instructions allow you to build the dolos firmware and firmware updater without any special setup or tooling install.

This guide assumes you have docker installed on you machine and that you have access to third_party/dolos.

Note these dockerfiles do not work on checkouts that have been created by repo as they use git commands. .git directories for repo checkouts are symlinks and the result of the symlink is not available to the docker build.

Create a directory to checkout the dolos source

mkdir dolos_source
cd dolos_source

Get the source code

git clone https://chromium.googlesource.com/chromiumos/platform/dolos
cd dolos

Build the docker image used to compile firmware. This may take some time, please be patient. It is only needed to call this once, NOT everytime the build is done.

docker build -f dockerfiles/Dockerfile.firmware -t dolos .

To build the firmware, execute command from the root of the dolos repository:

docker run --rm --user $(id -u):$(id -g) -v `pwd`:/repo -it dolos

In case of any compilation error, you may need to remove the old build directory that was created before building the docker image. Just execute:

rm -rf firmware-zephyr/build

And then try executing the docker run ... command again to compile the firmware.

It will create the zephyr.txt firmware file in the firmware-zephyr/build/zephyr directory. All other build artifacts will be present in the firmware-zephyr/build in case of the need of debugging the firmware.

Build the updater.

export DOCKER_BUILDKIT=1
docker build --output "./build_result" \
             --target copytohost \
             -f dockerfiles/Dockerfile.updater .

The output of the build(s) should be in the build_result directory. To flash firmware built earlier, you need to execute command:

./build_result/fw-updater firmware-zephyr/build/zephyr/zephyr.txt