[coreboot-gerrit] Patch set updated for coreboot: chromeos: Fill in the firmware id (RO, RW A, RW B) FMAP sections
Paul Kocialkowski (contact@paulk.fr)
gerrit at coreboot.org
Tue Jul 12 13:37:59 CEST 2016
Paul Kocialkowski (contact at paulk.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15604
-gerrit
commit acec82ac9fbbe0cfe25507dfa6ae6951f65c96a8
Author: Paul Kocialkowski <contact at paulk.fr>
Date: Tue Jul 12 00:29:37 2016 +0200
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 <contact at paulk.fr>
---
src/vendorcode/google/chromeos/Makefile.inc | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index 2b579d1..18ce13e 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
More information about the coreboot-gerrit
mailing list