Commit 714dc001fcd99809f5166b4383343a7b0d16fd6b
Committed by
Stefano Babic
1 parent
dd3ecf020e
Exists in
master
and in
53 other branches
arm: mxs: Preprocess u-boot.bd so they contain full path
The u-boot-imx23.bd and u-boot-imx28.bd need to be preprocessed, otherwise they have issues with out-of-tree build where elftosb tool couldn't sometimes find the u-boot.bin and spl/u-boot-spl.bin . Preprocess these .bd files with sed and insert full path to u-boot.bin and spl/u-boot-spl.bin to prevent this issue. Moreover, to avoid adding more churn into main Makefile, move all this preprocessing and u-boot.sb generation into CPU directory instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Showing 5 changed files with 17 additions and 9 deletions Side-by-side Diff
.gitignore
Makefile
... | ... | @@ -512,13 +512,9 @@ |
512 | 512 | cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.img > \ |
513 | 513 | $(obj)u-boot.ais |
514 | 514 | |
515 | -# Specify the target for use in elftosb call | |
516 | -ELFTOSB_TARGET-$(CONFIG_MX23) = imx23 | |
517 | -ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 | |
518 | 515 | |
519 | 516 | $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin |
520 | - elftosb -zf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \ | |
521 | - -o $(obj)u-boot.sb | |
517 | + $(MAKE) -C $(SRCTREE)/$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb | |
522 | 518 | |
523 | 519 | # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. |
524 | 520 | # Both images are created using mkimage (crc etc), so that the ROM |
... | ... | @@ -849,6 +845,7 @@ |
849 | 845 | @rm -f $(obj)u-boot.ais |
850 | 846 | @rm -f $(obj)u-boot.dtb |
851 | 847 | @rm -f $(obj)u-boot.sb |
848 | + @rm -f $(obj)u-boot.bd | |
852 | 849 | @rm -f $(obj)u-boot.spr |
853 | 850 | @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map} |
854 | 851 | @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map} |
arch/arm/cpu/arm926ejs/mxs/Makefile
... | ... | @@ -40,6 +40,16 @@ |
40 | 40 | $(LIB): $(OBJS) |
41 | 41 | $(call cmd_link_o_target, $(OBJS)) |
42 | 42 | |
43 | +# Specify the target for use in elftosb call | |
44 | +ELFTOSB_TARGET-$(CONFIG_MX23) = imx23 | |
45 | +ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 | |
46 | + | |
47 | +$(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd | |
48 | + sed "s@OBJTREE@$(OBJTREE)@g" $^ > $@ | |
49 | + | |
50 | +$(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd | |
51 | + elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb | |
52 | + | |
43 | 53 | ######################################################################### |
44 | 54 | |
45 | 55 | # defines $(obj).depend target |
arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd