mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-18 00:23:03 -04:00
Makefile: Add target for combined u-boot.img & spl/u-boot.bin
This new make target "u-boot-img-spl-at-end.bin" consists of the the real, full-blown U-Boot image and the U-Boot SPL binary directly attached to it. The full-blown U-Boot image has the mkimage header included, with its load-address and entry-point. This will be used by the upcoming lwmon5 PPC440EPx derivate board port. Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
98f99e9f16
commit
ecddccd006
12
Makefile
12
Makefile
@ -554,6 +554,18 @@ endif
|
|||||||
$(obj)u-boot-img.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
|
$(obj)u-boot-img.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
|
||||||
cat $(obj)spl/u-boot-spl.bin $(obj)u-boot.img > $@
|
cat $(obj)spl/u-boot-spl.bin $(obj)u-boot.img > $@
|
||||||
|
|
||||||
|
# PPC4xx needs the SPL at the end of the image, since the reset vector
|
||||||
|
# is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target
|
||||||
|
# and need to introduce a new build target with the full blown U-Boot
|
||||||
|
# at the start padded up to the start of the SPL image. And then concat
|
||||||
|
# the SPL image to the end.
|
||||||
|
$(obj)u-boot-img-spl-at-end.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img
|
||||||
|
tr "\000" "\377" < /dev/zero | dd ibs=1 count=$(CONFIG_UBOOT_PAD_TO) \
|
||||||
|
of=$(obj)u-boot-pad.img 2>/dev/null
|
||||||
|
dd if=$(obj)u-boot.img of=$(obj)u-boot-pad.img \
|
||||||
|
conv=notrunc 2>/dev/null
|
||||||
|
cat $(obj)u-boot-pad.img $(obj)spl/u-boot-spl.bin > $@
|
||||||
|
|
||||||
ifeq ($(CONFIG_SANDBOX),y)
|
ifeq ($(CONFIG_SANDBOX),y)
|
||||||
GEN_UBOOT = \
|
GEN_UBOOT = \
|
||||||
cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
|
cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
|
||||||
|
@ -222,6 +222,10 @@ ifneq ($(CONFIG_SPL_PAD_TO),)
|
|||||||
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
|
CPPFLAGS += -DCONFIG_SPL_PAD_TO=$(CONFIG_SPL_PAD_TO)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_UBOOT_PAD_TO),)
|
||||||
|
CPPFLAGS += -DCONFIG_UBOOT_PAD_TO=$(CONFIG_UBOOT_PAD_TO)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SPL_BUILD),y)
|
ifeq ($(CONFIG_SPL_BUILD),y)
|
||||||
CPPFLAGS += -DCONFIG_SPL_BUILD
|
CPPFLAGS += -DCONFIG_SPL_BUILD
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user