arm: mxs: Preprocess u-boot.bd so they contain full path
Subsystems (3)
PATCH 1/1 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.
--- Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-)
Makefile +2 -5
@@ -512,13 +512,9 @@ $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.img > \ $(obj)u-boot.ais -# Specify the target for use in elftosb call -ELFTOSB_TARGET-$(CONFIG_MX23) = imx23 -ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin - elftosb -zf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \ - -o $(obj)u-boot.sb + $(MAKE) -C $(SRCTREE)/$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. # Both images are created using mkimage (crc etc), so that the ROM
@@ -861,6 +857,7 @@ clobber: tidy @rm -f $(obj)u-boot.ais @rm -f $(obj)u-boot.dtb @rm -f $(obj)u-boot.sb + @rm -f $(obj)u-boot.bd @rm -f $(obj)u-boot.spr @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map} @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map}
arch/arm/cpu/arm926ejs/mxs/Makefile +10 -0
@@ -40,6 +40,16 @@ all: $(obj).depend $(LIB) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) +# Specify the target for use in elftosb call +ELFTOSB_TARGET-$(CONFIG_MX23) = imx23 +ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 + +$(OBJTREE)/u-boot.bd: $(SRCTREE)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd + sed "s at OBJTREE@$(OBJTREE)@g" $^ > $@ + +$(OBJTREE)/u-boot.sb: $(OBJTREE)/u-boot.bin $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/u-boot.bd + elftosb -zf $(ELFTOSB_TARGET-y) -c $(OBJTREE)/u-boot.bd -o $(OBJTREE)/u-boot.sb + ######################################################################### # defines $(obj).depend target
arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd +2 -2
@@ -4,8 +4,8 @@ options { } sources { - u_boot_spl="spl/u-boot-spl.bin"; - u_boot="u-boot.bin"; + u_boot_spl="OBJTREE/spl/u-boot-spl.bin"; + u_boot="OBJTREE/u-boot.bin"; } section (0) {
arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd +2 -2
@@ -1,6 +1,6 @@ sources { - u_boot_spl="spl/u-boot-spl.bin"; - u_boot="u-boot.bin"; + u_boot_spl="OBJTREE/spl/u-boot-spl.bin"; + u_boot="OBJTREE/u-boot.bin"; } section (0) {
Signature · 1 line
1.7.10.4
PATCH 1/1 arm: mxs: Preprocess u-boot.bd so they contain full path
Quoted 4 lines · Marek Vasut
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 .
Quoted 8 lines
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 <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>
Please Cc me in 'mxs' patches.
Quoted 4 lines
Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++--
As you'll be processing this '.bd' files with sed, I think naming the u-boot.imx2[38].bd.in could make it easier to understand when someone not familiar with the code looks at it.
Just due curiosity how did you find it failed? I did try to build it with out-of-tree using MAKEALL and had no issues. Is it reproducable with higher number of parallel tasks?
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH 1/1 arm: mxs: Preprocess u-boot.bd so they contain full path
Dear Otavio Salvador,
Quoted 16 lines · Marek Vasut
Quoted 4 lines
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 .
Quoted 8 lines
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 <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Please Cc me in 'mxs' patches.
Quoted 8 lines
Quoted 4 lines
Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++--As you'll be processing this '.bd' files with sed, I think naming the u-boot.imx2[38].bd.in could make it easier to understand when someone not familiar with the code looks at it.
Not really, just keep them as they were.
Quoted 3 lines
Just due curiosity how did you find it failed? I did try to build it with out-of-tree using MAKEALL and had no issues. Is it reproducable with higher number of parallel tasks?
Not sure anymore, I had this fix on my todo so I did it.
Best regards,
Marek Vasut
PATCH 1/1 arm: mxs: Preprocess u-boot.bd so they contain full path
Quoted 23 lines · Marek Vasut
Dear Otavio Salvador,
Quoted 21 lines · Marek Vasut
Quoted 4 lines
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 .
Quoted 8 lines
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 <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Please Cc me in 'mxs' patches.
Quoted 4 lines
Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++--
Quoted 5 lines
Quoted 3 lines
As you'll be processing this '.bd' files with sed, I think naming the u-boot.imx2[38].bd.in could make it easier to understand when someone not familiar with the code looks at it.
Not really, just keep them as they were.
When doing 'in-tree' build it will end changing the file itself, won't it?
Quoted 5 lines
Quoted 3 lines
Just due curiosity how did you find it failed? I did try to build it with out-of-tree using MAKEALL and had no issues. Is it reproducable with higher number of parallel tasks?
Not sure anymore, I had this fix on my todo so I did it.
Right; no problem. This approach does makes sense, but I'd prefer a '.in' file.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
PATCH 1/1 arm: mxs: Preprocess u-boot.bd so they contain full path
Dear Otavio Salvador,
Quoted 24 lines · Marek Vasut
Quoted 23 lines
Dear Otavio Salvador,
Quoted 21 lines · Marek Vasut
Quoted 4 lines
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 .
Quoted 8 lines
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 <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Please Cc me in 'mxs' patches.
Quoted 4 lines
Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++--
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
As you'll be processing this '.bd' files with sed, I think naming the u-boot.imx2[38].bd.in could make it easier to understand when someone not familiar with the code looks at it.
Not really, just keep them as they were.
When doing 'in-tree' build it will end changing the file itself, won't it?
$OBJTREE/u-boot.bd will be produced, so no, read the patch again.
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Just due curiosity how did you find it failed? I did try to build it with out-of-tree using MAKEALL and had no issues. Is it reproducable with higher number of parallel tasks?
Not sure anymore, I had this fix on my todo so I did it.
Quoted 7 lines
Right; no problem. This approach does makes sense, but I'd prefer a '.in' file.
--
Otavio SalvadorO.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
Best regards,
Marek Vasut
PATCH 1/1 arm: mxs: Preprocess u-boot.bd so they contain full path
Quoted 30 lines · Marek Vasut
Dear Otavio Salvador,
Quoted 28 lines · Marek Vasut
Quoted 27 lines
Dear Otavio Salvador,
Quoted 24 lines · Marek Vasut
Quoted 4 lines
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 .
Quoted 8 lines
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 <[email protected]>Cc Fabio Estevam <[email protected]>Cc Stefano Babic <[email protected]>Please Cc me in 'mxs' patches.
Quoted 4 lines
Makefile | 7 ++----- arch/arm/cpu/arm926ejs/mxs/Makefile | 10 ++++++++++ arch/arm/cpu/arm926ejs/mxs/u-boot-imx23.bd | 4 ++-- arch/arm/cpu/arm926ejs/mxs/u-boot-imx28.bd | 4 ++--As you'll be processing this '.bd' files with sed, I think naming the u-boot.imx2[38].bd.in could make it easier to understand when someone not familiar with the code looks at it.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Not really, just keep them as they were.
When doing 'in-tree' build it will end changing the file itself, won't it?
$OBJTREE/u-boot.bd will be produced, so no, read the patch again.
You're right however, please add the u-boot.bd to .gitignore or it is listed in git status after build.
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Just due curiosity how did you find it failed? I did try to build it with out-of-tree using MAKEALL and had no issues. Is it reproducable with higher number of parallel tasks?
Not sure anymore, I had this fix on my todo so I did it.
Right; no problem. This approach does makes sense, but I'd prefer a '.in' file.
Quoted 7 lines
Quoted 4 lines
--
Otavio SalvadorO.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.brBest regards,
Marek Vasut
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br