From 580db7fd9036134b1da4fe7340e306fee4681659 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Tue, 12 Jul 2016 00:29:37 +0200 Subject: chromeos: Fill in the firmware id (RO, RW A, RW B) FMAP sections This fills up the RO_FRID, RW_FWID_A and RW_FWID_B FMAP sections with the relevant version from KERNELVERSION, padded to the right size and gap-filled with zeros. Change-Id: I45c724555f8e41be02b92ef2990bf6710be805c2 Signed-off-by: Paul Kocialkowski Reviewed-on: https://review.coreboot.org/15604 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- src/vendorcode/google/chromeos/Makefile.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/vendorcode') diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc index 2b579d1587..18ce13eb38 100644 --- a/src/vendorcode/google/chromeos/Makefile.inc +++ b/src/vendorcode/google/chromeos/Makefile.inc @@ -155,6 +155,19 @@ $(obj)/VBLOCK_%.bin: $(obj)/FW_MAIN_%.bin $(FUTILITY) --kernelkey "$(CONFIG_VBOOT_KERNEL_KEY)" \ --flags $(CONFIG_VBOOT_KEYBLOCK_PREAMBLE_FLAGS) -files_added:: $(obj)/VBLOCK_A.bin $(obj)/VBLOCK_B.bin +$(obj)/RO_FRID.bin: $(obj)/coreboot.rom + $(CBFSTOOL) $(obj)/coreboot.rom read -r $(basename $(notdir $@)) -f $@ + printf $(KERNELVERSION) > $@.tmp + objcopy -I binary -O binary --pad-to=$$( stat --printf="%s" $@ ) --gap-fill=0 $@.tmp $@ + +$(obj)/RW_FWID_%.bin: $(obj)/coreboot.rom + $(CBFSTOOL) $(obj)/coreboot.rom read -r $(basename $(notdir $@)) -f $@ + printf $(KERNELVERSION) > $@.tmp + objcopy -I binary -O binary --pad-to=$$( stat --printf="%s" $@ ) --gap-fill=0 $@.tmp $@ + +files_added:: $(obj)/VBLOCK_A.bin $(obj)/VBLOCK_B.bin $(obj)/RO_FRID.bin $(obj)/RW_FWID_A.bin $(obj)/RW_FWID_B.bin $(CBFSTOOL) $(obj)/coreboot.rom write -u -r VBLOCK_A -f $(obj)/VBLOCK_A.bin $(CBFSTOOL) $(obj)/coreboot.rom write -u -r VBLOCK_B -f $(obj)/VBLOCK_B.bin + $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RO_FRID -f $(obj)/RO_FRID.bin + $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RW_FWID_A -f $(obj)/RW_FWID_A.bin + $(CBFSTOOL) $(obj)/coreboot.rom write -u -r RW_FWID_B -f $(obj)/RW_FWID_B.bin -- cgit v1.2.3