]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tools: elftosb: use legacy elftosb instead of mkimage
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 21 Aug 2015 14:44:44 +0000 (16:44 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 21 Aug 2015 14:44:44 +0000 (16:44 +0200)
Makefile
arch/arm/cpu/arm926ejs/mxs/Makefile

index 92faed63fd1208897078d9dc1c88d8fa65e7fc55..d8b73076a45d051ea8d4efc75751142c1da9258e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -912,9 +912,12 @@ u-boot.ais: spl/u-boot-spl.ais u-boot.img FORCE
 
 u-boot-signed.sb: u-boot.bin spl/u-boot-spl.bin
        $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot-signed.sb
-u-boot.sb: u-boot.bin spl/u-boot-spl.bin
+u-boot.sb: u-boot.bin spl/u-boot-spl.bin elftosb
        $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot.sb
 
+elftosb:
+       $(MAKE) -C $(KBUILD_SRC)/tools/elftosb all
+
 # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
 # Both images are created using mkimage (crc etc), so that the ROM
 # bootloader can check its integrity. Padding needs to be done to the
index c457f32a4b0454e891a2f14599b2aab35042ecda..e80867ed602b619bd0e91c7d8d40fb9364980dfa 100644 (file)
@@ -78,8 +78,16 @@ quiet_cmd_mkimage_mxs = MKIMAGE $@
 cmd_mkimage_mxs = $(objtree)/tools/mkimage -n $< -T mxsimage $@ \
        $(if $(KBUILD_VERBOSE:1=), >/dev/null)
 
-u-boot.sb: $(src)/$(MKIMAGE_TARGET-y) u-boot.bin spl/u-boot-spl.bin FORCE
-       $(call if_changed,mkimage_mxs)
+#u-boot.sb: $(src)/$(MKIMAGE_TARGET-y) u-boot.bin spl/u-boot-spl.bin FORCE
+#      $(call if_changed,mkimage_mxs)
+ELFTOSB_TARGET-$(CONFIG_SOC_MX23) = imx23
+ELFTOSB_TARGET-$(CONFIG_SOC_MX28) = imx28
+
+u-boot.bd: $(KBUILD_SRC)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd
+       sed "s@OBJTREE@$(objtree)@g" $^ > $@
+
+u-boot.sb: u-boot spl/u-boot-spl $(objtree)/u-boot.bd $(KBUILD_SRC)/tools/elftosb/bld/linux/elftosb
+               $(KBUILD_SRC)/tools/elftosb/bld/linux/elftosb -V -zf $(ELFTOSB_TARGET-y) -c u-boot.bd -o u-boot.sb
 
 u-boot-signed.sb: $(src)/mxsimage-signed.cfg u-boot.ivt u-boot.sig spl/u-boot-spl.ivt spl/u-boot-spl.sig FORCE
        $(call if_changed,mkimage_mxs)