Zheng Bao has uploaded this change for review. ( https://review.coreboot.org/29158
Change subject: Macro for adding raw integer into CBFS. ......................................................................
Macro for adding raw integer into CBFS.
To add integer into CBFS, just add lines like below. cbfs-files-y += etc/boot-menu-wait etc/boot-menu-wait-file := $(call int2cbfs,500) etc/boot-menu-wait-type := raw
Change-Id: Id82950031063e1b0ceee80fff0553ea93dfa331a Signed-off-by: Zheng Bao fishbaozi@gmail.com --- M Makefile.inc 1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/29158/1
diff --git a/Makefile.inc b/Makefile.inc index 1e58967..1acc253 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1120,6 +1120,20 @@ bootsplash$(BOOTSPLASH_SUFFIX)-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE)) bootsplash$(BOOTSPLASH_SUFFIX)-type := bootsplash
+int2hex=$(shell printf %016x $(call _toint,$(1))) +splithex=$(shell echo $(call int2hex,$(1)) | sed -e 's/../& /g') +int2cbfs = $(obj)/int2cbfs_$(1).bin \ + $(eval $(obj)/int2cbfs_$(1).bin: $(obj)/config.h; \ + printf \$(shell printf %03o 0x$(word 8,$(call splithex,$(1)))) > $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 7,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 6,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 5,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 4,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 3,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 2,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + printf \$(shell printf %03o 0x$(word 1,$(call splithex,$(1)))) >> $(obj)/int2cbfs_$(1).bin.tmp; \ + mv $(obj)/int2cbfs_$(1).bin.tmp $(obj)/int2cbfs_$(1).bin ) + # Ensure that no payload segment overlaps with memory regions used by ramstage # (not for x86 since it can relocate itself in that case) ifneq ($(CONFIG_ARCH_X86),y)