]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
properly integrate 'elftosb' into the build environment
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 9 Mar 2012 14:22:15 +0000 (15:22 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 9 Mar 2012 14:22:15 +0000 (15:22 +0100)
Makefile

index b734d3db1a7d0fa009bfb5c5c6dcaf766707aa2b..066545362cced67717e6900a9e081d54b99e5ad3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -442,9 +442,11 @@ $(obj)u-boot.ais:       $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
                        $(obj)u-boot.ais
                rm $(obj)spl/u-boot-spl{,-pad}.ais
 
-$(obj)u-boot.sb:       $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
-               elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
-                       -o $(obj)u-boot.sb
+$(obj)u-boot.bd:       $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd
+               sed "s:@@BUILD_DIR@@:$(obj):g" $< > $@
+
+$(obj)u-boot.sb:       $(obj)u-boot.bd elftosb $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
+               $(TOPDIR)/tools/elftosb/bld/linux/elftosb -zdf imx28 -c $< -o $@
 
 ifeq ($(CONFIG_SANDBOX),y)
 GEN_UBOOT = \
@@ -513,6 +515,8 @@ $(obj)spl/u-boot-spl.bin:   $(SUBDIR_TOOLS) depend
 
 updater:
                $(MAKE) -C tools/updater all
+elftosb:
+               $(MAKE) -C $(SUBDIR_TOOLS)/elftosb all
 
 # Explicitly make _depend in subdirs containing multiple targets to prevent
 # parallel sub-makes creating .depend files simultaneously.