cros_bundle_firmware: Add defaults to fdt for cros_write_firmware

The Pit firmware branch is missing a number of nodes and properties that are
used by cros_bundle_firmware and cros_write_firmware. In particular, the
location of IRAM is now used to decide where to write the image during USB
A-A download.

cros_bundle_firmware already adds these missing nodes automatically. Move
the code that does this into SelectFdt() so that this step is done for
cros_write_firmware also. This makes it possible to flash the the firmware
branch while using ToT cros-devutils.

Also work around a buggy /memory node in the pit firmware branch.

With firmware branch of U-Boot, but everything else ToT:

$ USE=dev emerge-peach_pit chromeos-u-boot chromeos-bootimage
$ cros_write_firmware -b peach_pit \
	 -i /build/peach_pit/firmware/image-peach-pit.bin -F spi

See that the flasher runs correctly.

Change-Id: I60d22e5cdecd770e259aee7d4f0533df1e52d352
Signed-off-by: Simon Glass <>
Reviewed-by: Randall Spangler <>
1 file changed