This can be used not only for 64bit SoCs, but also for
large physical address extension on 32bit SoCs.
+config HAS_ROM
+ bool
+ select BINMAN
+ help
+ Enables building of a u-boot.rom target. This collects U-Boot and
+ any necessary binary blobs.
+
+config ROM_NEEDS_BLOBS
+ bool
+ depends on HAS_ROM
+ help
+ Enable this if building the u-boot.rom target needs binary blobs, and
+ so cannot be done normally. In this case, pass BUILD_ROM=1 to make
+ to tell U-Boot to build the ROM.
+
config BUILD_ROM
bool "Build U-Boot as BIOS replacement"
- depends on X86
+ depends on HAS_ROM
+ default y if !ROM_NEEDS_BLOBS
help
This option allows to build a ROM version of U-Boot.
The build process generally requires several binary blobs
ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
+ifneq ($(CONFIG_HAS_ROM),)
ifneq ($(BUILD_ROM)$(CONFIG_BUILD_ROM),)
-ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
+ALL-y += u-boot.rom
endif
+endif
+
ifeq ($(CONFIG_SYS_COREBOOT)$(CONFIG_SPL),yy)
ALL-$(CONFIG_BINMAN) += u-boot-x86-with-spl.bin
endif
# reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
# the middle. This is handled by binman based on an image description in the
# board's device tree.
-ifneq ($(CONFIG_X86_RESET_VECTOR),)
+ifneq ($(CONFIG_HAS_ROM),)
rom: u-boot.rom FORCE
refcode.bin: $(srctree)/board/$(BOARDDIR)/refcode.bin FORCE
cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
$(filter-out FORCE,$^) -o $@
-u-boot.rom: u-boot-x86-start16.bin u-boot-x86-reset16.bin u-boot.bin \
+rom-deps := u-boot.bin
+ifdef CONFIG_X86
+rom-deps += u-boot-x86-start16.bin u-boot-x86-reset16.bin \
$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
$(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) \
- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE
- $(call if_changed,binman)
+ $(if $(CONFIG_HAVE_REFCODE),refcode.bin)
OBJCOPYFLAGS_u-boot-x86-start16.bin := -O binary -j .start16
u-boot-x86-start16.bin: u-boot FORCE
$(call if_changed,objcopy)
endif
+u-boot.rom: $(rom-deps) FORCE
+ $(call if_changed,binman)
+endif
+
ifneq ($(CONFIG_ARCH_SUNXI),)
ifeq ($(CONFIG_ARM64),)
u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE