Add coreboot version to id area
There was no good way to extract the build version from an image. This change will be mostly backward compatible: The only assumption that could break is that the board name string ends directly before the 3 dwords that represent .id's "header". Change-Id: I325491a0c42911d9d6ecd59e21ee1b756c987693 Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/537 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
a31bb0779a
commit
950f20a404
|
@ -321,15 +321,15 @@ $(obj)/bootblock/ldscript.ld: $$(bootblock_lds) $(obj)/ldoptions
|
||||||
$(obj)/bootblock/bootblock.S: $$(bootblock_inc)
|
$(obj)/bootblock/bootblock.S: $$(bootblock_inc)
|
||||||
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
||||||
mkdir -p $(obj)/bootblock
|
mkdir -p $(obj)/bootblock
|
||||||
printf '$(foreach crt0,config.h $(bootblock_inc),#include "$(crt0)"\n)' > $@
|
printf '$(foreach crt0,$(bootblock_inc),#include "$(crt0)"\n)' > $@
|
||||||
|
|
||||||
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s
|
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||||
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
||||||
|
|
||||||
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.S
|
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.S $(obj)/config.h $(obj)/build.h
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||||
$(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/bootblock -include $(obj)/config.h -I. -I$(src) $< -o $@
|
$(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/bootblock -include $(obj)/build.h -include $(obj)/config.h -I. -I$(src) $< -o $@
|
||||||
|
|
||||||
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H)
|
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H)
|
||||||
@printf " ROMCC $(subst $(obj)/,,$(@))\n"
|
@printf " ROMCC $(subst $(obj)/,,$(@))\n"
|
||||||
|
@ -371,15 +371,15 @@ $(obj)/romstage/ldscript.ld: $$(ldscripts) $(obj)/ldoptions
|
||||||
$(obj)/romstage/crt0.S: $$(crt0s)
|
$(obj)/romstage/crt0.S: $$(crt0s)
|
||||||
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
||||||
mkdir -p $(obj)/romstage
|
mkdir -p $(obj)/romstage
|
||||||
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
|
printf '$(foreach crt0,$(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
|
||||||
|
|
||||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.romstage.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
|
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.romstage.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||||
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
||||||
|
|
||||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/romstage/crt0.S
|
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/romstage/crt0.S $(obj)/config.h $(obj)/build.h
|
||||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||||
$(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< -o $@
|
$(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -include $(obj)/build.h -I. -I$(src) $< -o $@
|
||||||
|
|
||||||
seabios:
|
seabios:
|
||||||
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \
|
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
.globl __id_start
|
.globl __id_start
|
||||||
__id_start:
|
__id_start:
|
||||||
|
ver:
|
||||||
|
.asciz COREBOOT_VERSION
|
||||||
vendor:
|
vendor:
|
||||||
.asciz CONFIG_MAINBOARD_VENDOR
|
.asciz CONFIG_MAINBOARD_VENDOR
|
||||||
part:
|
part:
|
||||||
.asciz CONFIG_MAINBOARD_PART_NUMBER
|
.asciz CONFIG_MAINBOARD_PART_NUMBER
|
||||||
|
.long __id_end + CONFIG_ID_SECTION_OFFSET - ver /* Reverse offset to the vendor id */
|
||||||
.long __id_end + CONFIG_ID_SECTION_OFFSET - vendor /* Reverse offset to the vendor id */
|
.long __id_end + CONFIG_ID_SECTION_OFFSET - vendor /* Reverse offset to the vendor id */
|
||||||
.long __id_end + CONFIG_ID_SECTION_OFFSET - part /* Reverse offset to the part number */
|
.long __id_end + CONFIG_ID_SECTION_OFFSET - part /* Reverse offset to the part number */
|
||||||
.long CONFIG_ROM_SIZE /* Size of this romimage */
|
.long CONFIG_ROM_SIZE /* Size of this romimage */
|
||||||
|
|
Loading…
Reference in New Issue