mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 04:44:46 +00:00
Makefile: Reduce usage of custom mpc85xx u-boot.bin target
Building of final u-boot.bin binary for mpc85xx via binman is needed only when inserting DTB binary in the middle of the u-boot ELF binary (before .bootpg and .resetvec ELF sections). These requirements are met when CONFIG_MPC85XX_HAVE_RESET_VECTOR is enabled (= generating .bootpg/.resetvec sections) and CONFIG_OF_SEPARATE is enabled (= inserting DTB binary). So in all other cases use standard build procedure instead of custom mpc85xx u-boot.bin Makefile target via binman. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org>
This commit is contained in:
parent
d8fa0a7668
commit
5af42eafd7
3 changed files with 9 additions and 12 deletions
11
Makefile
11
Makefile
|
@ -1213,12 +1213,12 @@ else ifeq ($(CONFIG_OF_SEPARATE).$(CONFIG_OF_OMIT_DTB),y.)
|
||||||
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
|
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
|
||||||
$(call if_changed,cat)
|
$(call if_changed,cat)
|
||||||
|
|
||||||
ifneq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||||
u-boot.bin: u-boot-dtb.bin FORCE
|
u-boot.bin: u-boot-dtb.bin FORCE
|
||||||
$(call if_changed,copy)
|
$(call if_changed,copy)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else ifneq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
else ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||||
u-boot.bin: u-boot-nodtb.bin FORCE
|
u-boot.bin: u-boot-nodtb.bin FORCE
|
||||||
$(call if_changed,copy)
|
$(call if_changed,copy)
|
||||||
endif
|
endif
|
||||||
|
@ -1598,17 +1598,14 @@ u-boot-with-nand-spl.sfp: u-boot-spl-padx4.sfp u-boot.img FORCE
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
|
ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
|
||||||
u-boot.bin: u-boot-nodtb.bin u-boot.dtb \
|
u-boot.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE
|
||||||
$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR), u-boot-br.bin) FORCE
|
|
||||||
$(call if_changed,binman)
|
$(call if_changed,binman)
|
||||||
|
|
||||||
ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR),y)
|
|
||||||
OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec
|
OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec
|
||||||
u-boot-br.bin: u-boot FORCE
|
u-boot-br.bin: u-boot FORCE
|
||||||
$(call if_changed,objcopy)
|
$(call if_changed,objcopy)
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
quiet_cmd_ldr = LD $@
|
quiet_cmd_ldr = LD $@
|
||||||
cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
|
cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
|
||||||
|
|
|
@ -21,7 +21,7 @@ config MPC85xx
|
||||||
select SYS_FSL_DDR
|
select SYS_FSL_DDR
|
||||||
select SYS_FSL_DDR_BE
|
select SYS_FSL_DDR_BE
|
||||||
select SYS_FSL_IFC_BE
|
select SYS_FSL_IFC_BE
|
||||||
select BINMAN if OF_SEPARATE
|
select BINMAN if MPC85XX_HAVE_RESET_VECTOR && OF_SEPARATE
|
||||||
imply CMD_HASH
|
imply CMD_HASH
|
||||||
imply CMD_IRQ
|
imply CMD_IRQ
|
||||||
imply USB_EHCI_HCD if USB
|
imply USB_EHCI_HCD if USB
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#if defined(CONFIG_MPC85XX_HAVE_RESET_VECTOR) && defined(CONFIG_OF_SEPARATE)
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
binman {
|
binman {
|
||||||
filename = "u-boot.bin";
|
filename = "u-boot.bin";
|
||||||
|
@ -19,17 +21,15 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
u-boot-dtb-with-ucode {
|
u-boot-dtb-with-ucode {
|
||||||
#ifdef CONFIG_MPC85xx
|
|
||||||
align = <4>;
|
align = <4>;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
#ifdef CONFIG_MPC85XX_HAVE_RESET_VECTOR
|
|
||||||
#ifndef CONFIG_RESET_VECTOR_ADDRESS
|
#ifndef CONFIG_RESET_VECTOR_ADDRESS
|
||||||
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
|
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
|
||||||
#endif
|
#endif
|
||||||
powerpc-mpc85xx-bootpg-resetvec {
|
powerpc-mpc85xx-bootpg-resetvec {
|
||||||
offset = <(CONFIG_RESET_VECTOR_ADDRESS - 0xffc)>;
|
offset = <(CONFIG_RESET_VECTOR_ADDRESS - 0xffc)>;
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue