Skip to content
Snippets Groups Projects
Commit c7016234 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

x86: Refactor u-boot.rom build rules


Refactor u-boot.rom build rules by utilizing quiet_cmd_ and cmd_
macros. Also make writing mrc.bin and pci option rom to u-boot.rom
optional and remove mrc.bin from its dependent file list as not
every x86 board port needs mrc binary blob.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 7dfb172d
No related branches found
No related tags found
No related merge requests found
...@@ -946,27 +946,33 @@ u-boot-nand.gph: u-boot.bin FORCE ...@@ -946,27 +946,33 @@ u-boot-nand.gph: u-boot.bin FORCE
ifneq ($(CONFIG_X86_RESET_VECTOR),) ifneq ($(CONFIG_X86_RESET_VECTOR),)
rom: u-boot.rom FORCE rom: u-boot.rom FORCE
u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin \ IFDTOOL=$(objtree)/tools/ifdtool
$(srctree)/board/$(BOARDDIR)/mrc.bin IFDTOOL_FLAGS = -w $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-dtb.bin
$(objtree)/tools/ifdtool -c -r $(CONFIG_ROM_SIZE) u-boot.tmp IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
if [ -n "$(CONFIG_HAVE_INTEL_ME)" ]; then \
$(objtree)/tools/ifdtool -D \ ifneq ($(CONFIG_HAVE_INTEL_ME),)
$(srctree)/board/$(BOARDDIR)/descriptor.bin u-boot.tmp; \ IFDTOOL_ME_FLAGS = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin
$(objtree)/tools/ifdtool \ IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin
-i ME:$(srctree)/board/$(BOARDDIR)/me.bin u-boot.tmp; \ endif
fi
$(objtree)/tools/ifdtool -w \ ifneq ($(CONFIG_HAVE_MRC),)
$(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-dtb.bin u-boot.tmp IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_START):$(srctree)/board/$(BOARDDIR)/mrc.bin
$(objtree)/tools/ifdtool -w \ endif
$(CONFIG_X86_MRC_START):$(srctree)/board/$(BOARDDIR)/mrc.bin \
u-boot.tmp ifneq ($(CONFIG_X86_OPTION_ROM_ADDR),)
$(objtree)/tools/ifdtool -w \ IFDTOOL_FLAGS += -w $(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILENAME)
$(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin \ endif
u-boot.tmp
$(objtree)/tools/ifdtool -w \ quiet_cmd_ifdtool = IFDTOOL $@
$(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILENAME) \ cmd_ifdtool = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp;
u-boot.tmp ifneq ($(CONFIG_HAVE_INTEL_ME),)
mv u-boot.tmp $@ cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp;
endif
cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp;
cmd_ifdtool += mv u-boot.tmp $@
u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin
$(call if_changed,ifdtool)
OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
u-boot-x86-16bit.bin: u-boot FORCE u-boot-x86-16bit.bin: u-boot FORCE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment