Commit a80329fe authored by Guillaume Tucker's avatar Guillaume Tucker
Browse files

cros-build: add build script

Add script to set up the CrOS SDK chroot for octopus, build
a custom branch of Depthcharge and replace the payload in the Coreboot
firmware image.  The output is stored in a new file in
firmware/octopus-new.bin which can be accessed from the host.

Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <>
parent ac81dba8
......@@ -57,3 +57,4 @@ RUN git config --global
ARG cros_device
ENV CROS_DEVICE=$cros_device
ADD --chown=cros-build
ADD --chown=cros-build $cros_device.* src/scripts/
set -e
export BOARD=octopus
cmd_setup() {
./setup_board --board=$BOARD
cmd_checkout() {
echo "board: ${BOARD}"
cros_workon --board ${BOARD} start depthcharge
cd ../platform/depthcharge
git fetch \ \
git checkout FETCH_HEAD
cd -
cmd_build() {
emerge-${BOARD} depthcharge
cmd_image() {
local output=firmware/${BOARD}-new.bin
cp firmware/${BOARD}.bin ${output}
cbfstool \
${output} \
remove \
-n fallback/payload \
cbfstool \
${output} \
add-payload \
-n fallback/payload \
-f /build/octopus/firmware/depthcharge/dev.elf
ls -l ${output}
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment