the Chromium logo

The Chromium Projects

The crosfw script

Firmware build/test script

crosfw is a python script which automates many of the tasks involved in building and testing firmware. It includes the following features:

Best of all, crosfw does not spam you with 800KB of build output, thus making it possible for you to see the warnings/errors.

crosfw is roughly parallel to using chromeos-u-boot and chromeos-bootimage and these must have been preivously emerged in order to use crosfw.

Why use the script?

How to use the script?

To build U-Boot with verified boot for pit, create and image and download over USB A-A:

$ crosfw -b peach_pit -V

Same, but download a magic flasher and flash the SPI

$ crosfw -b peach_pit -VF

Mimic chromeos-bootimage and create and flash a secure image with silent console:

$ crosfw -b peach_pit -VFSC

You can build sandbox with:

$ crosfw -b sandbox -w

You can also build any upstream config. The output files are in directory /tmp/crosfw for easy access and you can set a variable in your ~/.crosfw file to change this. You can also use -a to pass options to cros_bundle_firmware, and -h to get help.

Can I rely on this script for testing?

You can develop with this script, but before submitting CLs you must test with the ebuild system. This script does not necessary track changes there

and so inconsistencies may develop over time.

WARNING: Always emerge and test chromeos-u-boot and chromeos-bootimage before submitting U-Boot CLs to gerrit!