@@ -1201,22 +1201,30 @@ endif
u-boot.bin: u-boot-fit-dtb.bin FORCE
$(call if_changed,copy)
+ifneq ($(CONFIG_TARGET_SOCRATES),y)
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
$(call if_changed,cat)
+endif
else ifeq ($(CONFIG_OF_SEPARATE).$(CONFIG_OF_OMIT_DTB),y.)
+ifneq ($(CONFIG_TARGET_SOCRATES),y)
u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
$(call if_changed,cat)
+endif
ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
+ifneq ($(CONFIG_TARGET_SOCRATES),y)
u-boot.bin: u-boot-dtb.bin FORCE
$(call if_changed,copy)
endif
+endif
else ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy)
+ifneq ($(CONFIG_TARGET_SOCRATES),y)
u-boot.bin: u-boot-nodtb.bin FORCE
$(call if_changed,copy)
endif
+endif
# we call Makefile in arch/arm/mach-imx which
# has targets which are dependent on targets defined
@@ -1601,6 +1609,9 @@ u-boot.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE
OBJCOPYFLAGS_u-boot-br.bin := -O binary -j .bootpg -j .resetvec
u-boot-br.bin: u-boot FORCE
$(call if_changed,objcopy)
+else ifeq ($(CONFIG_TARGET_SOCRATES),y)
+u-boot.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
+ $(call if_changed,binman)
endif
quiet_cmd_ldr = LD $@
@@ -5,7 +5,7 @@
*/
/ {
binman {
- filename = "u-boot-socrates.bin";
+ filename = "u-boot.bin";
pad-byte = <0xff>;
// Place dtb one sector before u-boot-nodtb.bin
blob {
U-Boot build process for socrates board produces final U-Boot binary in file u-boot-socrates.bin (by binman) And as a bonus it produces two unusable broken binaries u-boot-dtb.bin and u-boot.bin (by Makefile). So do not build broken u-boot-dtb.bin and u-boot.bin binaries and rename board specific u-boot-socrates.bin binary to u-boot.bin. Renaming requires to define a new socrates specific Makefile target for u-boot.bin (via binman) and also changing output name in socrates binman config file. With this change U-Boot build process for socrates board also produces final U-Boot binary in file u-boot.bin. Signed-off-by: Pali Rohár <pali@kernel.org> --- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)