arch/arm: Replace .id section with build_info in CBFS
For arch/arm[64], the offsets to board identification strings and CONFIG_ROM_SIZE inside .id were never really used; it was only a convenience to have the strings appear near the start of image. Add the same strings in an uncompressed file in CBFS. Change-Id: I35d3312336e9c66d657d2ca619cf30fd79e18fd4 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47602 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
4c0f5769f0
commit
3b3dd84fb1
10
Makefile.inc
10
Makefile.inc
|
@ -530,6 +530,12 @@ $(build_h): $$(shell $$(build_h_check))
|
|||
build-dirs $(objcbfs) $(objgenerated):
|
||||
mkdir -p $(objcbfs) $(objgenerated)
|
||||
|
||||
$(obj)/build_info:
|
||||
@echo 'COREBOOT_VERSION: $(call strip_quotes,$(KERNELVERSION))' > $@.tmp
|
||||
@echo 'MAINBOARD_VENDOR: $(call strip_quotes,$(CONFIG_MAINBOARD_VENDOR))' >> $@.tmp
|
||||
@echo 'MAINBOARD_PART_NUMBER: $(call strip_quotes,$(CONFIG_MAINBOARD_PART_NUMBER))' >> $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
#######################################################################
|
||||
# Build the tools
|
||||
CBFSTOOL:=$(objutil)/cbfstool/cbfstool
|
||||
|
@ -1208,6 +1214,10 @@ cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += revision
|
|||
revision-file := $(obj)/build.h
|
||||
revision-type := raw
|
||||
|
||||
cbfs-files-y += build_info
|
||||
build_info-file := $(obj)/build_info
|
||||
build_info-type := raw
|
||||
|
||||
BOOTSPLASH_SUFFIX=$(suffix $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE)))
|
||||
cbfs-files-$(CONFIG_BOOTSPLASH_IMAGE) += bootsplash$(BOOTSPLASH_SUFFIX)
|
||||
bootsplash$(BOOTSPLASH_SUFFIX)-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE))
|
||||
|
|
|
@ -27,11 +27,6 @@ endif # CONFIG_ARCH_ARM
|
|||
|
||||
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM),y)
|
||||
|
||||
decompressor-y += id.S
|
||||
bootblock-y += id.S
|
||||
$(call src-to-obj,decompressor,$(dir)/id.S): $(obj)/build.h
|
||||
$(call src-to-obj,bootblock,$(dir)/id.S): $(obj)/build.h
|
||||
|
||||
decompressor-y += boot.c
|
||||
bootblock-y += boot.c
|
||||
decompressor-y += div0.c
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <build.h>
|
||||
|
||||
.section ".id", "a", %progbits
|
||||
|
||||
.globl __id_start
|
||||
__id_start:
|
||||
ver:
|
||||
.asciz COREBOOT_VERSION
|
||||
vendor:
|
||||
.asciz CONFIG_MAINBOARD_VENDOR
|
||||
part:
|
||||
.asciz CONFIG_MAINBOARD_PART_NUMBER
|
||||
.long __id_end - ver /* Reverse offset to the vendor id */
|
||||
.long __id_end - vendor /* Reverse offset to the vendor id */
|
||||
.long __id_end - part /* Reverse offset to the part number */
|
||||
.long CONFIG_ROM_SIZE /* Size of this romimage */
|
||||
.globl __id_end
|
||||
|
||||
__id_end:
|
|
@ -26,10 +26,6 @@ decompressor-y += div0.c
|
|||
bootblock-y += div0.c
|
||||
decompressor-y += eabi_compat.c
|
||||
bootblock-y += eabi_compat.c
|
||||
decompressor-y += id.S
|
||||
bootblock-y += id.S
|
||||
$(call src-to-obj,decompressor,$(dir)/id.S): $(obj)/build.h
|
||||
$(call src-to-obj,bootblock,$(dir)/id.S): $(obj)/build.h
|
||||
|
||||
decompressor-$(CONFIG_ARM64_USE_ARCH_TIMER) += arch_timer.c
|
||||
bootblock-$(CONFIG_ARM64_USE_ARCH_TIMER) += arch_timer.c
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <build.h>
|
||||
|
||||
.section ".id", "a", %progbits
|
||||
|
||||
.globl __id_start
|
||||
__id_start:
|
||||
ver:
|
||||
.asciz COREBOOT_VERSION
|
||||
vendor:
|
||||
.asciz CONFIG_MAINBOARD_VENDOR
|
||||
part:
|
||||
.asciz CONFIG_MAINBOARD_PART_NUMBER
|
||||
.long __id_end - ver /* Reverse offset to the vendor id */
|
||||
.long __id_end - vendor /* Reverse offset to the vendor id */
|
||||
.long __id_end - part /* Reverse offset to the part number */
|
||||
.long CONFIG_ROM_SIZE /* Size of this romimage */
|
||||
.globl __id_end
|
||||
|
||||
__id_end:
|
|
@ -15,9 +15,6 @@
|
|||
_text = .;
|
||||
*(.text._start);
|
||||
*(.text.stage_entry);
|
||||
#if !ENV_X86 && (ENV_DECOMPRESSOR || ENV_BOOTBLOCK && !CONFIG(COMPRESS_BOOTBLOCK))
|
||||
KEEP(*(.id));
|
||||
#endif
|
||||
KEEP(*(.metadata_hash_anchor));
|
||||
*(.text);
|
||||
*(.text.*);
|
||||
|
|
Loading…
Reference in New Issue