
On Fri, Dec 30, 2022 at 01:48:11PM +0100, Pali Rohár wrote:
On Thursday 29 December 2022 16:39:11 Simon Glass wrote:
Hi Pali,
On Wed, 28 Dec 2022 at 14:06, Pali Rohár pali@kernel.org wrote:
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.
Signed-off-by: Pali Rohár pali@kernel.org
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/20221228181839.22003-1-pali...
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?