powerpc/mpc85xx: socrates: Rename u-boot-socrates.bin to u-boot.bin
PATCH 1/2 powerpc/mpc85xx: socrates: Rename u-boot-socrates.bin to u-boot.bin
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.
--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
Makefile +11 -0
@@ -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 $@
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -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 {
Signature · 1 line
2.20.1
PATCH 2/2 Makefile: Build working u-boot-dtb.bin target also for mpc85xx
U-Boot build process currently always produces broken u-boot-dtb.bin binary for PowerPC mpc85xx architecture on boards which needs mpc85xx reset vector. For these boards this (intermediate) binary is not used as input for any other Makefile target on this architecture, so there is no real problem with it.
But it is not a good idea to produce broken binaries during build phase. So try to improve it. Binary u-boot-dtb.bin should contains u-boot code with DTB blob. Such binary for those boards is build by binman. So change binman output file name from u-boot.bin to u-boot-dtb.bin and then let generic Makefile rule to generate final u-boot.bin from u-boot-dtb.bin. And finally disable generic u-boot-dtb.bin rule for mpc85xx.
--- Makefile | 17 ++++++++--------- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- arch/powerpc/dts/u-boot.dtsi | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-)
Makefile +8 -9
@@ -1201,30 +1201,29 @@ endif u-boot.bin: u-boot-fit-dtb.bin FORCE $(call if_changed,copy) +ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) ifneq ($(CONFIG_TARGET_SOCRATES),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) endif +endif else ifeq ($(CONFIG_OF_SEPARATE).$(CONFIG_OF_OMIT_DTB),y.) + +ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) ifneq ($(CONFIG_TARGET_SOCRATES),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) endif +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) +else 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
@@ -1603,14 +1602,14 @@ u-boot-with-nand-spl.sfp: u-boot-spl-padx4.sfp u-boot.img FORCE endif ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) -u-boot.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE $(call if_changed,binman) 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 +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,binman) endif
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -5,7 +5,7 @@ */ / { binman { - filename = "u-boot.bin"; + filename = "u-boot-dtb.bin"; pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob {
arch/powerpc/dts/u-boot.dtsi +1 -1
@@ -9,7 +9,7 @@ / { binman { - filename = "u-boot.bin"; + filename = "u-boot-dtb.bin"; skip-at-start = <CONFIG_TEXT_BASE>; sort-by-offset; pad-byte = <0xff>;
Signature · 1 line
2.20.1
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 14 lines · Pali Rohár
U-Boot build process currently always produces broken u-boot-dtb.bin binary for PowerPC mpc85xx architecture on boards which needs mpc85xx reset vector. For these boards this (intermediate) binary is not used as input for any other
Makefiletarget on this architecture, so there is no real problem with it.But it is not a good idea to produce broken binaries during build phase. So try to improve it. Binary u-boot-dtb.bin should contains u-boot code with DTB blob. Such binary for those boards is build by binman. So change binman output file name from u-boot.bin to u-boot-dtb.bin and then let generic
Makefilerule to generate final u-boot.bin from u-boot-dtb.bin. And finally disable generic u-boot-dtb.bin rule for mpc85xx.
Quoted 6 lines
Signed-off-by Pali Rohár <[email protected]>--- Makefile | 17 ++++++++--------- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- arch/powerpc/dts/u-boot.dtsi | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-)
Can you instead use a new filename, like u-boot-powerpc.bin for this?
I'm not fan of adding SoC-specific rules in the Makefile - in fact one of the goals of binman is to drop these.
Regards,
Simon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 17 lines · On Thursday 29 December 2022 16:39:11 Simon Glass wrote:
Hi Pali,
Quoted 14 lines · Pali Rohár
U-Boot build process currently always produces broken u-boot-dtb.bin binary for PowerPC mpc85xx architecture on boards which needs mpc85xx reset vector. For these boards this (intermediate) binary is not used as input for any other
Makefiletarget on this architecture, so there is no real problem with it.But it is not a good idea to produce broken binaries during build phase. So try to improve it. Binary u-boot-dtb.bin should contains u-boot code with DTB blob. Such binary for those boards is build by binman. So change binman output file name from u-boot.bin to u-boot-dtb.bin and then let generic
Makefilerule to generate final u-boot.bin from u-boot-dtb.bin. And finally disable generic u-boot-dtb.bin rule for mpc85xx.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Pali Rohár <[email protected]>--- Makefile | 17 ++++++++--------- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- arch/powerpc/dts/u-boot.dtsi | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-)Can you instead use a new filename, like u-boot-powerpc.bin for this?
This would lead to the same situation as described here:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 2 lines
I'm not fan of adding SoC-specific rules in the
Makefile- in fact one of the goals of binman is to drop these.
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in Makefile.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 27 lines · Pali Rohár
Quoted 17 lines · On Thursday 29 December 2022 16:39:11 Simon Glass wrote:
Hi Pali,
Quoted 14 lines · Pali Rohár
U-Boot build process currently always produces broken u-boot-dtb.bin binary for PowerPC mpc85xx architecture on boards which needs mpc85xx reset vector. For these boards this (intermediate) binary is not used as input for any other
Makefiletarget on this architecture, so there is no real problem with it.But it is not a good idea to produce broken binaries during build phase. So try to improve it. Binary u-boot-dtb.bin should contains u-boot code with DTB blob. Such binary for those boards is build by binman. So change binman output file name from u-boot.bin to u-boot-dtb.bin and then let generic
Makefilerule to generate final u-boot.bin from u-boot-dtb.bin. And finally disable generic u-boot-dtb.bin rule for mpc85xx.Quoted 8 lines
Quoted 6 lines
Signed-off-by Pali Rohár <[email protected]>--- Makefile | 17 ++++++++--------- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- arch/powerpc/dts/u-boot.dtsi | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-)Can you instead use a new filename, like u-boot-powerpc.bin for this?
Quoted 8 lines
This would lead to the same situation as described here:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/Quoted 2 lines
I'm not fan of adding SoC-specific rules in the
Makefile- in fact one of the goals of binman is to drop these.In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.
This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from Makefile to binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.
Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 8 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 7 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Quoted 8 lines
Quoted 4 lines
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 15 lines · Pali Rohár
Quoted 13 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.
Quoted 7 lines
Quoted 3 lines
Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases. See [1]. I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration. But perhaps most boards don't actually use u-boot.bin anyway?
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Regards,
SImon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 26 lines · Simon Glass
Hi Pali,
Quoted 15 lines · Pali Rohár
Quoted 13 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Quoted 7 lines
Quoted 3 lines
Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
Quoted 5 lines
It does have this access and already updates symbols in some cases. See [1]. I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration. But perhaps most boards don't actually use u-boot.bin anyway?
Well, we should just convert everyone at once since we should get identical binaries before / after.
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
I thought the thread about fixing the alignment of the dtb noted problems with that approach?
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
In reply to Simon GlassQuoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbols
I just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Linker script files in any case would have to be adjusted / fixed to align _end symbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...
As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/
Quoted 3 lines
Regards,
SImon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 48 lines · Pali Rohár
Quoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbolsI just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Quoted 6 lines
Linker script files in any case would have to be adjusted / fixed to align
_endsymbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/
I think that would work. It is a little like the BINARY_SIZE_CHECK thing we have. It is the closest thing to what we have. As you saw I was happy with your original 'trunc' solution too.
After some more thought, perhaps the binman solution makes sense, so long as we do what you say above (make the _end symbol aligned). Of course binman can fix that up, but it feels more like a build thing than a packaging thing to me. It could be quite confusing for people to see a symbol change between build-time and run-time.
So the steps would be something like this:
1. Update the align before _end in each .lds to use a constant like #define END_ALIGN 8
2. Update binman's dtb etypes to align to 8 bytes
3. Add a common binman image for u-boot.bin (used by every board)
4. Enable binman by default
5. Drop the current 'cat' rules in Makefile, so that only u-boot and u-boot-nodtb.bin are produced
6. Optionally consider moving .img files to binman also
Regards,
Simon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 58 lines · On Friday 30 December 2022 11:43:44 Simon Glass wrote:
Hi Pali,
Quoted 48 lines · Pali Rohár
Quoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbolsI just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Quoted 6 lines
Linker script files in any case would have to be adjusted / fixed to align
_endsymbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/
Quoted 8 lines
I think that would work. It is a little like the
BINARY_SIZE_CHECKthing we have. It is the closest thing to what we have. As you saw I was happy with your original 'trunc' solution too.After some more thought, perhaps the binman solution makes sense, so long as we do what you say above (make the
_endsymbol aligned). Of course binman can fix that up, but it feels more like a build thing than a packaging thing to me.
Yes, this is build thing/issue, not packaging one.
Quoted 2 lines
It could be quite confusing for people
to see a symbol change between build-time and run-time.
Yes, symbol change is confusing. So I would propose to not change any symbol between build and run time.
Quoted 5 lines
So the steps would be something like this:
1. Update the align before
_endin each .lds to use a constant like #defineEND_ALIGN8
2. Update binman's dtb etypes to align to 8 bytes
This is not enough. Some boards/platform may have stricter alignment (e.g. to SD card sector size = 512 bytes). So binman should not align image and instead of that, it should read _exact_ address of _end symbol and put DTB etype to this address. Step 1. already ensures that _end is aligned to 8 bytes.
Quoted 1 line
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
Quoted 3 lines
4. Enable binman by default
5. Drop the current 'cat' rules inMakefile, so that only u-boot and u-boot-nodtb.bin are produced
(cat rule is only for u-boot-dtb.bin)
Quoted 4 lines
6. Optionally consider moving .img files to binman also
Regards,
Simon
With slightly modified/improved step 2. I agree that this improves current situation. And should these issues.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 83 lines · Pali Rohár
Quoted 58 lines · On Friday 30 December 2022 11:43:44 Simon Glass wrote:
Hi Pali,
Quoted 48 lines · Pali Rohár
Quoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbolsI just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Quoted 6 lines
Linker script files in any case would have to be adjusted / fixed to align
_endsymbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/Quoted 8 lines
I think that would work. It is a little like the
BINARY_SIZE_CHECKthing we have. It is the closest thing to what we have. As you saw I was happy with your original 'trunc' solution too.After some more thought, perhaps the binman solution makes sense, so long as we do what you say above (make the
_endsymbol aligned). Of course binman can fix that up, but it feels more like a build thing than a packaging thing to me.Yes, this is build thing/issue, not packaging one.
Quoted 2 lines
It could be quite confusing for people
to see a symbol change between build-time and run-time.Yes, symbol change is confusing. So I would propose to not change any symbol between build and run time.
Quoted 5 lines
So the steps would be something like this:
1. Update the align before
_endin each .lds to use a constant like #defineEND_ALIGN8
2. Update binman's dtb etypes to align to 8 bytes
Quoted 5 lines
This is not enough. Some boards/platform may have stricter alignment (e.g. to SD card sector size = 512 bytes). So binman should not align image and instead of that, it should read _exact_ address of
_endsymbol and put DTB etype to this address. Step 1. already ensures that_endis aligned to 8 bytes.
OK, we can do that I suppose, perhaps with a new binman property:
u_boot: u-boot-nodtb {
};
u-boot-dtb {
align-to-sym = <&u_boot> ,"_end";
};
or using expanding just:
u-boot {
align-dtb-to-sym = <&u_boot> ,"_end";
};
(which we could perhaps make the default?)
Quoted 6 lines
Quoted 2 lines
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
ad1ecd2063d fdt: Build a U-Boot binary without device tree
Quoted 7 lines
Quoted 4 lines
4. Enable binman by default
5. Drop the current 'cat' rules inMakefile, so that only u-boot and u-boot-nodtb.bin are produced(cat rule is only for u-boot-dtb.bin)
Quoted 7 lines
Quoted 4 lines
6. Optionally consider moving .img files to binman also
Regards,
SimonWith slightly modified/improved step 2. I agree that this improves current situation. And should these issues.
Regards,
Simon
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#expanded-entries
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 100 lines · On Friday 30 December 2022 12:51:03 Simon Glass wrote:
Hi Pali,
Quoted 83 lines · Pali Rohár
Quoted 58 lines · On Friday 30 December 2022 11:43:44 Simon Glass wrote:
Hi Pali,
Quoted 48 lines · Pali Rohár
Quoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbolsI just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Quoted 6 lines
Linker script files in any case would have to be adjusted / fixed to align
_endsymbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/Quoted 8 lines
I think that would work. It is a little like the
BINARY_SIZE_CHECKthing we have. It is the closest thing to what we have. As you saw I was happy with your original 'trunc' solution too.After some more thought, perhaps the binman solution makes sense, so long as we do what you say above (make the
_endsymbol aligned). Of course binman can fix that up, but it feels more like a build thing than a packaging thing to me.Yes, this is build thing/issue, not packaging one.
Quoted 2 lines
It could be quite confusing for people
to see a symbol change between build-time and run-time.Yes, symbol change is confusing. So I would propose to not change any symbol between build and run time.
Quoted 5 lines
So the steps would be something like this:
1. Update the align before
_endin each .lds to use a constant like #defineEND_ALIGN8
2. Update binman's dtb etypes to align to 8 bytesQuoted 5 lines
This is not enough. Some boards/platform may have stricter alignment (e.g. to SD card sector size = 512 bytes). So binman should not align image and instead of that, it should read _exact_ address of
_endsymbol and put DTB etype to this address. Step 1. already ensures that_endis aligned to 8 bytes.OK, we can do that I suppose, perhaps with a new binman property:
u_boot: u-boot-nodtb {
};u-boot-dtb { align-to-sym = <&u_boot> ,"_end"; };
Quoted 7 lines
or using expanding just:
u-boot { align-dtb-to-sym = <&u_boot> ,"_end"; };(which we could perhaps make the default?)
Something like that looks reasonable. And must be enabled by default.
I'm not sure if calling it "align" is a good idea. Because if property is in u-boot node then it it is "padding". And if that property is in dtb node then it is "placing" binary to the absolute address.
From reading binman.html documentation I see that for placing image at absolute address there is already "offset" property. And for padding there is "pad-after" property. What about consistency?
So maybe 'pad-after-to-sym = "_end";' in u-boot node? Or 'offset-from-sym = <&u_boot>, "_end";' in dtb node?
Quoted 10 lines
Quoted 6 lines
Quoted 2 lines
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
ad1ecd2063dfdt: Build a U-Boot binary without device tree
I just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Quoted 20 lines
Quoted 7 lines
Quoted 4 lines
4. Enable binman by default
5. Drop the current 'cat' rules inMakefile, so that only u-boot and u-boot-nodtb.bin are produced(cat rule is only for u-boot-dtb.bin)
Quoted 7 lines
Quoted 4 lines
6. Optionally consider moving .img files to binman also
Regards,
SimonWith slightly modified/improved step 2. I agree that this improves current situation. And should these issues.
Regards,
Simon[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#expanded-entries
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 116 lines · Pali Rohár
Quoted 100 lines · On Friday 30 December 2022 12:51:03 Simon Glass wrote:
Hi Pali,
Quoted 83 lines · Pali Rohár
Quoted 58 lines · On Friday 30 December 2022 11:43:44 Simon Glass wrote:
Hi Pali,
Quoted 48 lines · Pali Rohár
Quoted 22 lines · On Friday 30 December 2022 09:49:08 Simon Glass wrote:
Hi Pali,
Quoted 19 lines · Pali Rohár
Quoted 16 lines · On Friday 30 December 2022 10:41:47 Tom Rini wrote:
Quoted 11 lines · Pali Rohár
Quoted 5 lines · On Friday 30 December 2022 10:21:04 Tom Rini wrote:
Quoted 2 lines
In this case it would be better to build u-boot-dts.bin only by binman (for all platforms) instead of cat-ing rules in
Makefile.This would also be an easier path forward perhaps for making sure that the dtb is always 8 byte aligned?
Well, no. With DTB the problem is that it is not put to the correct offset as can be specified in linker script. So moving this code from
Makefileto binman also moves this problem to another location. 8 byte alignment is just subset of the "correct offset" problem.Right, the high level answer is binman is intended to be the tool to assemble binaries, and has to deal with "make sure binary X is at offset Y, which also has a linker symbol for run-time references".
Quoted 7 lines
Quoted 3 lines
Ok, if this tool has access to ELF/linker symbols (or will have in future in case it does not have yet) then this problem could be solved here.
It does have this access and already updates symbols in some cases.
See [1].
[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#access-to-binman-entry-offsets-at-run-time-symbolsI just do not see how to do it, but ok, maybe something more is needed.
Quoted 3 lines
I am a little nervous about a complete move to binman in this area even for simple things like u-boot.bin, since it would set off yet another migration.
Yes, it sounds like a big change.
Quoted 1 line
But perhaps most boards don't actually use u-boot.bin anyway?
I think that most boards _use_ u-boot.bin. Or wrap u-boot.bin into some own container (by mkimage).
Quoted 2 lines
Part of me thinks we should solve this in the .lds files, since otherwise we are blurring the line between building and packaging.
Quoted 6 lines
Linker script files in any case would have to be adjusted / fixed to align
_endsymbol. Without it ELF symbol would not be correct and so obviously any solution depending on ELF symbols would not work...As I wrote recently, I proposed alternative solution without binman:
https://lore.kernel.org/u-boot/20221217235913.w7ihsktbplbp2j7z@pali/Quoted 8 lines
I think that would work. It is a little like the
BINARY_SIZE_CHECKthing we have. It is the closest thing to what we have. As you saw I was happy with your original 'trunc' solution too.After some more thought, perhaps the binman solution makes sense, so long as we do what you say above (make the
_endsymbol aligned). Of course binman can fix that up, but it feels more like a build thing than a packaging thing to me.Yes, this is build thing/issue, not packaging one.
Quoted 2 lines
It could be quite confusing for people
to see a symbol change between build-time and run-time.Yes, symbol change is confusing. So I would propose to not change any symbol between build and run time.
Quoted 5 lines
So the steps would be something like this:
1. Update the align before
_endin each .lds to use a constant like #defineEND_ALIGN8
2. Update binman's dtb etypes to align to 8 bytesQuoted 5 lines
This is not enough. Some boards/platform may have stricter alignment (e.g. to SD card sector size = 512 bytes). So binman should not align image and instead of that, it should read _exact_ address of
_endsymbol and put DTB etype to this address. Step 1. already ensures that_endis aligned to 8 bytes.OK, we can do that I suppose, perhaps with a new binman property:
u_boot: u-boot-nodtb {
};u-boot-dtb { align-to-sym = <&u_boot> ,"_end"; };Quoted 7 lines
or using expanding just:
u-boot { align-dtb-to-sym = <&u_boot> ,"_end"; };(which we could perhaps make the default?)
Something like that looks reasonable. And must be enabled by default.
I'm not sure if calling it "align" is a good idea. Because if property is in u-boot node then it it is "padding". And if that property is in dtb node then it is "placing" binary to the absolute address.
Quoted 6 lines
From reading binman.html documentation I see that for placing image at absolute address there is already "offset" property. And for padding there is "pad-after" property. What about consistency?
So maybe 'pad-after-to-sym = "
_end";' in u-boot node? Or 'offset-from-sym = <&u_boot>, "_end";' in dtb node?
Yes that makes sense. I'll take a look at this at some point.
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 3 lines
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
Quoted 8 lines
Quoted 1 line
ad1ecd2063dfdt: Build a U-Boot binary without device treeI just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Actually u-boot-dtb.bin is a hangover from that commit, left in to allow people to adjust. So I think we should remove creation of u-boot-dtb.bin
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
4. Enable binman by default
5. Drop the current 'cat' rules inMakefile, so that only u-boot and u-boot-nodtb.bin are produced(cat rule is only for u-boot-dtb.bin)
Quoted 4 lines
6. Optionally consider moving .img files to binman also
Regards,
Simon
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
With slightly modified/improved step 2. I agree that this improves current situation. And should these issues.
Regards,
Simon[1] https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#expanded-entries
Regards,
Simon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 14 lines · On Tuesday 03 January 2023 11:02:17 Simon Glass wrote:
Quoted 14 lines
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
ad1ecd2063dfdt: Build a U-Boot binary without device treeI just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
Quoted 6 lines
Quoted 2 lines
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Actually u-boot-dtb.bin is a hangover from that commit, left in to allow people to adjust. So I think we should remove creation of u-boot-dtb.bin
Ok, complete remove of u-boot-dtb.bin creation also works.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hi Pali,
Quoted 16 lines · Pali Rohár
Quoted 14 lines · On Tuesday 03 January 2023 11:02:17 Simon Glass wrote:
Quoted 14 lines
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
ad1ecd2063dfdt: Build a U-Boot binary without device treeI just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Actually u-boot-dtb.bin is a hangover from that commit, left in to allow people to adjust. So I think we should remove creation of u-boot-dtb.bin
Ok, complete remove of u-boot-dtb.bin creation also works.
OK good.
- Simon
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 26 lines · On Friday 06 January 2023 17:13:41 Simon Glass wrote:
Hi Pali,
Quoted 23 lines · Pali Rohár
Quoted 20 lines · On Tuesday 03 January 2023 11:02:17 Simon Glass wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
Quoted 8 lines
Quoted 1 line
ad1ecd2063dfdt: Build a U-Boot binary without device treeI just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Actually u-boot-dtb.bin is a hangover from that commit, left in to allow people to adjust. So I think we should remove creation of u-boot-dtb.bin
Quoted 6 lines
Quoted 1 line
Ok, complete remove of u-boot-dtb.bin creation also works.
OK good.
- Simon
I would suggest to take patch 1/2 to have all mpc85xx boards standard output file u-boot.bin. And prevent to repeat issue that building of the final image with custom name was unintentionally turned off as a side effect of some change.
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hello Pali,
Quoted 32 lines · Pali Rohár
Quoted 31 lines · On Friday 06 January 2023 17:13:41 Simon Glass wrote:
Hi Pali,
Quoted 16 lines · Pali Rohár
Quoted 14 lines · On Tuesday 03 January 2023 11:02:17 Simon Glass wrote:
Quoted 14 lines
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
3. Add a common binman image for u-boot.bin (used by every board)
It should be u-boot-dtb.bin (not u-boot.bin). At least this is the current file name. (See this my patch series again, which aligns this naming also for powerpc/mpc85xx).
We changed this 6 years ago and I'm not keen on going back.
ad1ecd2063dfdt: Build a U-Boot binary without device treeI just do not understand you because in that commit is exactly what I wrote. In file u-boot-dtb.bin is u-boot binary with DTB and in file u-boot-nodtb.bin is u-boot binary without DTB.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
So binman should take input files u-boot-nodtb.bin and DTB binary. And should produce output file u-boot-dtb.bin. Is there any issue with it?
Actually u-boot-dtb.bin is a hangover from that commit, left in to allow people to adjust. So I think we should remove creation of u-boot-dtb.bin
Ok, complete remove of u-boot-dtb.bin creation also works.
OK good.
Quoted 7 lines
Quoted 1 line
- Simon
I would suggest to take patch 1/2 to have all mpc85xx boards standard output file u-boot.bin. And prevent to repeat issue that building of the final image with custom name was unintentionally turned off as a side effect of some change.
I just tried the patches (based on my rework of socrates board):
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
and they work fine for me...
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
and get errors for powerpc build:
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
@Tom: Do you know if v2023.01 builds fine for powerpc @Pali: Did you made a global build with your 2 patches?
for reference, you find my tree here:
https://github.com/hsdenx/u-boot-test/tree/socrates-2023.01-v1
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 8 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 6 lines
and get errors for powerpc build:
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5ne
kmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS MPC8548CDS_36BIT MPC8548CDS_legacy P1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2041RDB P2041RDB_NAND P2041RDB_SDCARD P2041RDB_SPIFLASH T1024RDB T1024RDB_NAND T1024RDB_SDCARD T1024RDB_SPIFLASH T1042D4RDB T1042D4RDB_NAND T1042D4RDB_SDCARD T1042D4RDB_SPIFLASH T2080QDS T2080QDS_NAND T2080QDS_SDCARD T2080QDS_SECURE_BOOT T2080QDS_SPIFLASH T2080QDS_SRIO_PCIE_BOOT T2080RDB T2080RDB_NAND T2080RDB_revD T2080RDB_revD_NAND T2080RDB_revD_SDCARD T2080RDB_revD_SPIFLASH T2080RDB_SDCARD T2080RDB_SPIFLASH T4240RDBT4240RDB_SDCARD + socrates kmcent2
Quoted 1 line
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 6 lines
Quoted 6 lines
and get errors for powerpc build:
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
Quoted 30 lines
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5nekmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS
MPC8548CDS_36BITMPC8548CDS_legacyP1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2041RDBP2041RDB_NANDP2041RDB_SDCARDP2041RDB_SPIFLASHT1024RDBT1024RDB_NANDT1024RDB_SDCARDT1024RDB_SPIFLASHT1042D4RDBT1042D4RDB_NANDT1042D4RDB_SDCARDT1042D4RDB_SPIFLASHT2080QDST2080QDS_NANDT2080QDS_SDCARDT2080QDS_SECURE_BOOTT2080QDS_SPIFLASHT2080QDS_SRIO_PCIE_BOOTT2080RDBT2080RDB_NANDT2080RDB_revDT2080RDB_revD_NANDT2080RDB_revD_SDCARDT2080RDB_revD_SPIFLASHT2080RDB_SDCARDT2080RDB_SPIFLASHT4240RDBT4240RDB_SDCARD+ socrates kmcent2Quoted 1 line
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 18 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 2 lines
Quoted 2 lines
and get errors for powerpc build:
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7
Quoted 32 lines
Quoted 30 lines
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5nekmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS
MPC8548CDS_36BITMPC8548CDS_legacyP1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2041RDBP2041RDB_NANDP2041RDB_SDCARDP2041RDB_SPIFLASHT1024RDBT1024RDB_NANDT1024RDB_SDCARDT1024RDB_SPIFLASHT1042D4RDBT1042D4RDB_NANDT1042D4RDB_SDCARDT1042D4RDB_SPIFLASHT2080QDST2080QDS_NANDT2080QDS_SDCARDT2080QDS_SECURE_BOOTT2080QDS_SPIFLASHT2080QDS_SRIO_PCIE_BOOTT2080RDBT2080RDB_NANDT2080RDB_revDT2080RDB_revD_NANDT2080RDB_revD_SDCARDT2080RDB_revD_SPIFLASHT2080RDB_SDCARDT2080RDB_SPIFLASHT4240RDBT4240RDB_SDCARD+ socrates kmcent2Quoted 1 line
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 24 lines · On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote:
Quoted 23 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 6 lines
Quoted 6 lines
and get errors for powerpc build:
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
Quoted 7 lines
Quoted 3 lines
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7
And now I think I see the reason why it is failing also for socrates board. Error in the build log is:
2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1
u-boot.dtb builds make by Makefile rule:
u-boot.dtb: dts/dt.dtb
$(call cmd,copy)
But socrates-u-boot.dtsi has specified that use dts/dt.dtb and this dependency is also specified in Makefile.
And it looks like that binman needs also u-boot.dtb file. So it is possible to hit a race condition, that make builds u-boot.dtb later than rule for binman.
I would suggest to try to apply this patch, which should instruct make to do not call binman until u-boot.dtb is correctly built:
Makefile +1 -1
@@ -1603,7 +1603,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endif
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";
Heiko, could you try to put commit 499fe577c8011dd8a9184548c419db42aef079a7 and above patch to your branch and retest it again?
Quoted 32 lines
Quoted 32 lines
Quoted 30 lines
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5nekmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS
MPC8548CDS_36BITMPC8548CDS_legacyP1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2041RDBP2041RDB_NANDP2041RDB_SDCARDP2041RDB_SPIFLASHT1024RDBT1024RDB_NANDT1024RDB_SDCARDT1024RDB_SPIFLASHT1042D4RDBT1042D4RDB_NANDT1042D4RDB_SDCARDT1042D4RDB_SPIFLASHT2080QDST2080QDS_NANDT2080QDS_SDCARDT2080QDS_SECURE_BOOTT2080QDS_SPIFLASHT2080QDS_SRIO_PCIE_BOOTT2080RDBT2080RDB_NANDT2080RDB_revDT2080RDB_revD_NANDT2080RDB_revD_SDCARDT2080RDB_revD_SPIFLASHT2080RDB_SDCARDT2080RDB_SPIFLASHT4240RDBT4240RDB_SDCARD+ socrates kmcent2Quoted 1 line
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Signature · 1 line
Tom
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
In reply to Tom RiniHello Tom,
Quoted 31 lines · Tom Rini
Quoted 8 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/Quoted 6 lines
and get errors for powerpc build:
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5nekmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS
MPC8548CDS_36BITMPC8548CDS_legacyP1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD
Quoted 8 lines
P2020RDB-PC_SPIFLASH P2041RDB
P2041RDB_NANDP2041RDB_SDCARDP2041RDB_SPIFLASHT1024RDBT1024RDB_NANDT1024RDB_SDCARDT1024RDB_SPIFLASHT1042D4RDBT1042D4RDB_NANDT1042D4RDB_SDCARDT1042D4RDB_SPIFLASHT2080QDST2080QDS_NANDT2080QDS_SDCARDT2080QDS_SECURE_BOOTT2080QDS_SPIFLASHT2080QDS_SRIO_PCIE_BOOTT2080RDBT2080RDB_NANDT2080RDB_revDT2080RDB_revD_NANDT2080RDB_revD_SDCARDT2080RDB_revD_SPIFLASHT2080RDB_SDCARDT2080RDB_SPIFLASHT4240RDBT4240RDB_SDCARD+ socrates kmcent2
Yep, noted this later ... and have local a fix for socrates board, but first just started a build with patches from pali to be sure, that I did not introduced some mistake ...
Quoted 4 lines
Quoted 2 lines
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Ok, fine, so I do not start one ... just started one with patches from pali.
Thanks for the info!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
In reply to Pali RohárHello Pali,
Quoted 20 lines · Pali Rohár
Quoted 19 lines · On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote:
Quoted 18 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 2 lines
Quoted 2 lines
and get errors for powerpc build:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
misreaded azure output, so socrates is failing because missing u-boot.dtb, sorry. Interesting is, that my yocto build works ...
Quoted 10 lines
Quoted 4 lines
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7And now I think I see the reason why it is failing also for socrates board. Error in the build log is:
2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1
Yup.
Quoted 11 lines
u-boot.dtb builds make by
Makefilerule:u-boot.dtb: dts/dt.dtb
$(call cmd,copy)But
socrates-u-boot.dtsihas specified that use dts/dt.dtb and this dependency is also specified inMakefile.And it looks like that binman needs also u-boot.dtb file. So it is possible to hit a race condition, that make builds u-boot.dtb later than rule for binman.
Exactly over this I stumbled yesterday in the evening and I made a local fix:
Makefile +1 -1
@@ -1609,7 +1609,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb u-boot.dtb FORCE $(call if_changed,binman) endif
Quoted 31 lines
I would suggest to try to apply this patch, which should instruct make to do not call binman until u-boot.dtb is correctly built:
Makefile +1
-1@@ -1603,7 +1603,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endifarch/powerpc/dts/socrates-u-boot.dtsi +1
-1@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";
Quoted 2 lines
Heiko, could you try to put commit
499fe577c8011dd8a9184548c419db42aef079a7and above patch to your branch and retest it again?
Of course! Just have to wait until other azure build finished...
In the meantime I rebased my patchset to current HEAD, so above commit is already in, and I had to adapt some patches for socrates.
I write the results hopefully soon.
bye,
Heikp
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
Quoted 30 lines
socrates is one of the two failing boards, in that link:
2023-01-11T12:16:04.4930367Z powerpc: w+ MPC837XERDB kmcoge5nekmeter1 kmopti2 kmsupx5 kmtepr2 tuge1 tuxx1 MPC8548CDS
MPC8548CDS_36BITMPC8548CDS_legacyP1010RDB-PA_36BIT_NAND P1010RDB-PA_36BIT_NOR P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_NAND P1010RDB-PA_NOR P1010RDB-PA_SDCARD P1010RDB-PA_SPIFLASH P1010RDB-PB_36BIT_NAND P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_SPIFLASH P1010RDB-PB_NAND P1010RDB-PB_NOR P1010RDB-PB_SDCARD P1010RDB-PB_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT P1020RDB-PC_36BIT_NAND P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_NAND P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PD P1020RDB-PD_NAND P1020RDB-PD_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC P2020RDB-PC_36BIT P2020RDB-PC_36BIT_NAND P2020RDB-PC_36BIT_SDCARD P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_NAND P2020RDB-PC_SDCARD P2020RDB-PC_SPIFLASH P2041RDBP2041RDB_NANDP2041RDB_SDCARDP2041RDB_SPIFLASHT1024RDBT1024RDB_NANDT1024RDB_SDCARDT1024RDB_SPIFLASHT1042D4RDBT1042D4RDB_NANDT1042D4RDB_SDCARDT1042D4RDB_SPIFLASHT2080QDST2080QDS_NANDT2080QDS_SDCARDT2080QDS_SECURE_BOOTT2080QDS_SPIFLASHT2080QDS_SRIO_PCIE_BOOTT2080RDBT2080RDB_NANDT2080RDB_revDT2080RDB_revD_NANDT2080RDB_revD_SDCARDT2080RDB_revD_SPIFLASHT2080RDB_SDCARDT2080RDB_SPIFLASHT4240RDBT4240RDB_SDCARD+ socrates kmcent2Quoted 1 line
@Tom: Do you know if v2023.01 builds fine for powerpc
Yes, CI is passing.
Signature · 1 line
Tom
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hello Pali,
Quoted 113 lines · Heiko Schocher
Hello Pali,
Quoted 20 lines · Pali Rohár
Quoted 19 lines · On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote:
Quoted 18 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 2 lines
Quoted 2 lines
and get errors for powerpc build:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
misreaded azure output, so socrates is failing because missing u-boot.dtb, sorry. Interesting is, that my yocto build works ...
Quoted 10 lines
Quoted 4 lines
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7And now I think I see the reason why it is failing also for socrates board. Error in the build log is:
2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1Yup.
Quoted 11 lines
u-boot.dtb builds make by
Makefilerule:u-boot.dtb: dts/dt.dtb
$(call cmd,copy)But
socrates-u-boot.dtsihas specified that use dts/dt.dtb and this dependency is also specified inMakefile.And it looks like that binman needs also u-boot.dtb file. So it is possible to hit a race condition, that make builds u-boot.dtb later than rule for binman.
Exactly over this I stumbled yesterday in the evening and I made a local fix:
Makefile +1
-1@@ -1609,7 +1609,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb u-boot.dtb FORCE $(call if_changed,binman) endifQuoted 32 lines
I would suggest to try to apply this patch, which should instruct make to do not call binman until u-boot.dtb is correctly built:
Makefile +1
-1@@ -1603,7 +1603,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endifarch/powerpc/dts/socrates-u-boot.dtsi +1
-1@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";Quoted 2 lines
Heiko, could you try to put commit
499fe577c8011dd8a9184548c419db42aef079a7and above patch to your branch and retest it again?Of course! Just have to wait until other azure build finished...
Quoted 4 lines
In the meantime I rebased my patchset to current HEAD, so above commit is already in, and I had to adapt some patches for socrates.
I write the results hopefully soon.
Azure build successfully finished:
https://dev.azure.com/hs0298/hs/_build/results?buildId=95&view=results
U-Boot tree (contains the discussed fix on top):
https://github.com/hsdenx/u-boot-test/commits/socrates-2023.01-v1
So, would you send a v2 of your 2 patches, including the above fix?
If so, I pick them than up, and run a second azure build with them, before I post the socrates board updates...
Else I can add the fix to my series...
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Quoted 119 lines · On Thursday 12 January 2023 11:50:32 Heiko Schocher wrote:
Hello Pali,
Quoted 116 lines · Heiko Schocher
Hello Pali,
Quoted 20 lines · Pali Rohár
Quoted 19 lines · On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote:
Quoted 18 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 2 lines
Quoted 2 lines
and get errors for powerpc build:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
misreaded azure output, so socrates is failing because missing u-boot.dtb, sorry. Interesting is, that my yocto build works ...
Quoted 10 lines
Quoted 4 lines
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7And now I think I see the reason why it is failing also for socrates board. Error in the build log is:
2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1Yup.
Quoted 11 lines
u-boot.dtb builds make by
Makefilerule:u-boot.dtb: dts/dt.dtb
$(call cmd,copy)But
socrates-u-boot.dtsihas specified that use dts/dt.dtb and this dependency is also specified inMakefile.And it looks like that binman needs also u-boot.dtb file. So it is possible to hit a race condition, that make builds u-boot.dtb later than rule for binman.
Exactly over this I stumbled yesterday in the evening and I made a local fix:
Makefile +1
-1@@ -1609,7 +1609,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb u-boot.dtb FORCE $(call if_changed,binman) endifQuoted 32 lines
I would suggest to try to apply this patch, which should instruct make to do not call binman until u-boot.dtb is correctly built:
Makefile +1
-1@@ -1603,7 +1603,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endifarch/powerpc/dts/socrates-u-boot.dtsi +1
-1@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";Quoted 2 lines
Heiko, could you try to put commit
499fe577c8011dd8a9184548c419db42aef079a7and above patch to your branch and retest it again?Of course! Just have to wait until other azure build finished...
In the meantime I rebased my patchset to current HEAD, so above commit is already in, and I had to adapt some patches for socrates.
Quoted 7 lines
Quoted 1 line
I write the results hopefully soon.
Azure build successfully finished:
https://dev.azure.com/hs0298/hs/_build/results?buildId=95&view=resultsU-Boot tree (contains the discussed fix on top):
https://github.com/hsdenx/u-boot-test/commits/socrates-2023.01-v1
Perfect, so it really fixed above issue.
Quoted 1 line
So, would you send a v2 of your 2 patches, including the above fix?
Above fix should be squashed into patch 1/2. I can do it and send v2.
But the question is if you want to include and merge also patch 2/2?
Quoted 14 lines
If so, I pick them than up, and run a second azure build with them, before I post the socrates board updates...
Else I can add the fix to my series...
Thanks!
bye,
HeikoSignature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH u-boot 2/2] Makefile: Build working u-boot-dtb.bin target also for mpc85xx
Hello Pali,
Quoted 122 lines · Pali Rohár
Quoted 121 lines · On Thursday 12 January 2023 11:50:32 Heiko Schocher wrote:
Hello Pali,
Quoted 117 lines · Heiko Schocher
Hello Pali,
Quoted 20 lines · Pali Rohár
Quoted 19 lines · On Wednesday 11 January 2023 19:02:38 Pali Rohár wrote:
Quoted 18 lines · On Wednesday 11 January 2023 18:55:40 Pali Rohár wrote:
Quoted 8 lines · On Wednesday 11 January 2023 09:01:37 Tom Rini wrote:
Quoted 7 lines · Heiko Schocher
Hello Pali, Tom,
I just tried azure build with my socrates board updates based on v2023.01 and the 2 patches from Pali:
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/At the time when I sent those two patches to ML, I checked that P1/P2 powerpc boards and also socrates board compiles successfully.
Now I imported those two patches on top of the current master branch and they still compiles without any problems for socrates board.
Quoted 2 lines
Quoted 2 lines
and get errors for powerpc build:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
https://dev.azure.com/hs0298/110c3e42-44d5-4db4-9bd5-8a8bbead15f3/_apis/build/builds/93/logs/601
socrates board builds fine ... my patches are socrates board specfic, so hopefully no impact for other boards ...
From that build log it looks like that u-boot fails for socrates and kmcent2 board. Which is strange as you said that too that socrates is building fine...
misreaded azure output, so socrates is failing because missing u-boot.dtb, sorry. Interesting is, that my yocto build works ...
Quoted 10 lines
Quoted 4 lines
kmcent2 is expected to fail with my above two patches on top of the v2023.01 without this kmcent2 commit which is now already in master:
https://source.denx.de/u-boot/u-boot/-/commit/499fe577c8011dd8a9184548c419db42aef079a7And now I think I see the reason why it is failing also for socrates board. Error in the build log is:
2023-01-11T12:16:04.4937207Z +binman: [Errno 2] No such file or directory: 'u-boot.dtb' 2023-01-11T12:16:04.4937685Z +make[1]: *** [Makefile:1613: u-boot-dtb.bin] Error 1Yup.
Quoted 11 lines
u-boot.dtb builds make by
Makefilerule:u-boot.dtb: dts/dt.dtb
$(call cmd,copy)But
socrates-u-boot.dtsihas specified that use dts/dt.dtb and this dependency is also specified inMakefile.And it looks like that binman needs also u-boot.dtb file. So it is possible to hit a race condition, that make builds u-boot.dtb later than rule for binman.
Exactly over this I stumbled yesterday in the evening and I made a local fix:
Makefile +1
-1@@ -1609,7 +1609,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb u-boot.dtb FORCE $(call if_changed,binman) endifQuoted 32 lines
I would suggest to try to apply this patch, which should instruct make to do not call binman until u-boot.dtb is correctly built:
Makefile +1
-1@@ -1603,7 +1603,7 @@ 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-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endifarch/powerpc/dts/socrates-u-boot.dtsi +1
-1@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";Quoted 2 lines
Heiko, could you try to put commit
499fe577c8011dd8a9184548c419db42aef079a7and above patch to your branch and retest it again?Of course! Just have to wait until other azure build finished...
In the meantime I rebased my patchset to current HEAD, so above commit is already in, and I had to adapt some patches for socrates.
I write the results hopefully soon.
Quoted 7 lines
Quoted 5 lines
Azure build successfully finished:
https://dev.azure.com/hs0298/hs/_build/results?buildId=95&view=resultsU-Boot tree (contains the discussed fix on top):
https://github.com/hsdenx/u-boot-test/commits/socrates-2023.01-v1Perfect, so it really fixed above issue.
Yep!
Quoted 3 lines
Quoted 1 line
So, would you send a v2 of your 2 patches, including the above fix?
Above fix should be squashed into patch 1/2. I can do it and send v2.
Great, so I wait for it and retest my patches with it.
Quoted 1 line
But the question is if you want to include and merge also patch 2/2?
I tested with this patch ... yes.
bye,
Heiko
Quoted 14 lines
Quoted 14 lines
If so, I pick them than up, and run a second azure build with them, before I post the socrates board updates...
Else I can add the fix to my series...
Thanks!
bye,
HeikoSignature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
PATCH v2 1/3 powerpc/mpc85xx: socrates: Use u-boot.dtb instead of dts/dt.dtb
In reply to Pali Rohárbinman uses DTB file u-boot.dtb for building u-boot binaries. So use same DTB file for u-boot runtime on socrates board, instead of dts/dt.dtb file.
Note that u-boot.dtb is generated by simple Makefile rule which copies dts/dt.dtb to u-boot.dtb. So both files are same.
--- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -9,7 +9,7 @@ pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob { - filename = "dts/dt.dtb"; + filename = "u-boot.dtb"; }; u-boot-nodtb { filename = "u-boot-nodtb.bin";
Signature · 1 line
2.20.1
PATCH v2 3/3 Makefile: Build working u-boot-dtb.bin target also for mpc85xx
U-Boot build process currently always produces broken u-boot-dtb.bin binary for PowerPC mpc85xx architecture on boards which needs mpc85xx reset vector. For these boards this (intermediate) binary is not used as input for any other Makefile target on this architecture, so there is no real problem with it.
But it is not a good idea to produce broken binaries during build phase. So try to improve it. Binary u-boot-dtb.bin should contains u-boot code with DTB blob. Such binary for those boards is build by binman. So change binman output file name from u-boot.bin to u-boot-dtb.bin and then let generic Makefile rule to generate final u-boot.bin from u-boot-dtb.bin. And finally disable generic u-boot-dtb.bin rule for mpc85xx.
--- Makefile | 17 ++++++++--------- arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- arch/powerpc/dts/u-boot.dtsi | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-)
Makefile +8 -9
@@ -1195,30 +1195,29 @@ endif u-boot.bin: u-boot-fit-dtb.bin FORCE $(call if_changed,copy) +ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) ifneq ($(CONFIG_TARGET_SOCRATES),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) endif +endif else ifeq ($(CONFIG_OF_SEPARATE).$(CONFIG_OF_OMIT_DTB),y.) + +ifneq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) ifneq ($(CONFIG_TARGET_SOCRATES),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) endif +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) +else 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
@@ -1597,14 +1596,14 @@ u-boot-with-nand-spl.sfp: u-boot-spl-padx4.sfp u-boot.img FORCE endif ifeq ($(CONFIG_MPC85XX_HAVE_RESET_VECTOR)$(CONFIG_OF_SEPARATE),yy) -u-boot.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb u-boot-br.bin FORCE $(call if_changed,binman) 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 u-boot.dtb FORCE +u-boot-dtb.bin: u-boot-nodtb.bin u-boot.dtb FORCE $(call if_changed,binman) endif
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -5,7 +5,7 @@ */ / { binman { - filename = "u-boot.bin"; + filename = "u-boot-dtb.bin"; pad-byte = <0xff>; // Place dtb one sector before u-boot-nodtb.bin blob {
arch/powerpc/dts/u-boot.dtsi +1 -1
@@ -9,7 +9,7 @@ / { binman { - filename = "u-boot.bin"; + filename = "u-boot-dtb.bin"; skip-at-start = <CONFIG_TEXT_BASE>; sort-by-offset; pad-byte = <0xff>;
Signature · 1 line
2.20.1
PATCH v2 2/3 powerpc/mpc85xx: socrates: Rename u-boot-socrates.bin to u-boot.bin
In reply to Pali RohárU-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.
---
Added make dependency on u-boot.dtb
--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
Makefile +11 -0
@@ -1195,22 +1195,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
@@ -1595,6 +1603,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 u-boot.dtb FORCE + $(call if_changed,binman) endif quiet_cmd_ldr = LD $@
arch/powerpc/dts/socrates-u-boot.dtsi +1 -1
@@ -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 {
Signature · 1 line
2.20.1
Quoted 44 lines · Pali Rohár
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
Makefiletarget 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 <[email protected]>---
Added make dependency on u-boot.dtb--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)Makefile +5
-0@@ -1195,22 +1195,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
Makefile endif · line 1221
Quoted 10 lines
Makefile +3
-0$(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
Simon's point from before still stands. This is the opposite of what we want. There must not be CONFIG_TARGET_ logic introduced to the top-level Makefile. socrate is "just" another mpc85xx platform, it doesn't have a special ROM, we need to adjust it back to acting like other platforms.
Signature · 1 line
Tom
Quoted 49 lines · On Friday 13 January 2023 18:16:03 Tom Rini wrote:
Quoted 48 lines · Pali Rohár
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
Makefiletarget 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 <[email protected]>---
Added make dependency on u-boot.dtb--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)Makefile +6
-0@@ -1195,22 +1195,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
Quoted 12 lines
Makefile endif · line 1221
Quoted 6 lines
Makefile +2
-0else 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 +endifSimon's point from before still stands. This is the opposite of what we want. There must not be
CONFIG_TARGET_logic introduced to the top-levelMakefile. socrate is "just" another mpc85xx platform, it doesn't have a special ROM, we need to adjust it back to acting like other platforms.
socrates has its own flash layout, own build procedure and purpose of this patch is just to prevent another breakage (like it was done in the past) by throwing make errors.
Trying to adjust board code and changing its layout is really not up to me. I do not have this board.
One there is generic binman build rules from make then it can be switches to that generic binman rule. Until it happen there is not better option...
Quoted 67 lines · Pali Rohár
Quoted 49 lines · On Friday 13 January 2023 18:16:03 Tom Rini wrote:
Quoted 48 lines · Pali Rohár
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
Makefiletarget 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 <[email protected]>---
Added make dependency on u-boot.dtb--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)Makefile +6
-0@@ -1195,22 +1195,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 +endifQuoted 12 lines
Makefile endif · line 1221
Quoted 6 lines
Makefile +2
-0else 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 +endifSimon's point from before still stands. This is the opposite of what we want. There must not be
CONFIG_TARGET_logic introduced to the top-levelMakefile. socrate is "just" another mpc85xx platform, it doesn't have a special ROM, we need to adjust it back to acting like other platforms.socrates has its own flash layout, own build procedure and purpose of this patch is just to prevent another breakage (like it was done in the past) by throwing make errors.
Quoted 6 lines
Trying to adjust board code and changing its layout is really not up to me. I do not have this board.
One there is generic binman build rules from make then it can be switches to that generic binman rule. Until it happen there is not better option...
Yes, it should be Heiko, as the board maintainer, dealing with fixing this part. I don't understand the flash layout, and the partition table laid out in arch/powerpc/dts/socrates.dts confuses things even more to me. But, the board maintainer should be able to sort this all out. Because we do not want to add CONFIG_TARGET_ logic to the top-level Makefile.
Signature · 1 line
Tom
Hello Tom, Pali,
Quoted 75 lines · Tom Rini
Quoted 67 lines · Pali Rohár
Quoted 49 lines · On Friday 13 January 2023 18:16:03 Tom Rini wrote:
Quoted 48 lines · Pali Rohár
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
Makefiletarget 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 <[email protected]>---
Added make dependency on u-boot.dtb--- Makefile | 11 +++++++++++ arch/powerpc/dts/socrates-u-boot.dtsi | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)Makefile +6
-0@@ -1195,22 +1195,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 +endifQuoted 12 lines
Makefile endif · line 1221
Quoted 6 lines
Makefile +2
-0else 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 +endifSimon's point from before still stands. This is the opposite of what we want. There must not be
CONFIG_TARGET_logic introduced to the top-levelMakefile. socrate is "just" another mpc85xx platform, it doesn't have a special ROM, we need to adjust it back to acting like other platforms.socrates has its own flash layout, own build procedure and purpose of this patch is just to prevent another breakage (like it was done in the past) by throwing make errors.
Quoted 6 lines
Trying to adjust board code and changing its layout is really not up to me. I do not have this board.
One there is generic binman build rules from make then it can be switches to that generic binman rule. Until it happen there is not better option...
Quoted 6 lines
Yes, it should be Heiko, as the board maintainer, dealing with fixing this part. I don't understand the flash layout, and the partition table laid out in
arch/powerpc/dts/socrates.dtsconfuses things even more to me. But, the board maintainer should be able to sort this all out. Because we do not want to addCONFIG_TARGET_logic to the top-levelMakefile.
Seems I missed this point from Simon... I take a look into it!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]