Message ID | 20221214145737.31849-1-neal.frager@amd.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v1,1/1] board/zynqmp/kria/uboot.fragment: remove unnecessary configs | expand |
Hi Michal, > Reduce the configs in the kria/uboot.fragment to only what is necessary. > > This patch has been build and run tested on a kria kv260 starter kit. > > Signed-off-by: Neal Frager <neal.frager@amd.com> > --- > board/zynqmp/kria/uboot.fragment | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/board/zynqmp/kria/uboot.fragment b/board/zynqmp/kria/uboot.fragment > index 9e32edfb36..f91baa2d8b 100644 > --- a/board/zynqmp/kria/uboot.fragment > +++ b/board/zynqmp/kria/uboot.fragment > @@ -1,14 +1,9 @@ > CONFIG_SYS_SPI_U_BOOT_OFFS=0xF80000 > -CONFIG_DTB_RESELECT=y > This should be enabled only for kria but not for others. For some reason, the CONFIG_MULTI_DTB_FIT option is not building properly with buildroot. Could you look into it? I get the following error on first build with CONFIG_MULTI_DTB_FIT enabled: FATAL ERROR: Couldn't open "fit-dtb.blob": No such file or directory ./tools/mkimage: Can't open u-boot.itb.tmp: No such file or directory Makefile:1429: recipe for target 'u-boot.itb' failed make[1]: *** [u-boot.itb] Error 255 When the CONFIG_MULTI_DTB_FIT is not enabled, the CONFIG_DTB_RESELECT does not exist as an option. I work around the issue in buildroot by overlaying the carrier board dtbo directly into the som dtb as you can see here: https://git.busybox.net/buildroot/tree/board/zynqmp/kria/kv260/kv260.sh Could you look into why the CONFIG_MULTI_DTB_FIT option fails to build with the buildroot compiler? Best regards, Neal Frager AMD
Hi Michal, > Reduce the configs in the kria/uboot.fragment to only what is necessary. > > This patch has been build and run tested on a kria kv260 starter kit. > > Signed-off-by: Neal Frager <neal.frager@amd.com> > --- > board/zynqmp/kria/uboot.fragment | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/board/zynqmp/kria/uboot.fragment b/board/zynqmp/kria/uboot.fragment > index 9e32edfb36..f91baa2d8b 100644 > --- a/board/zynqmp/kria/uboot.fragment > +++ b/board/zynqmp/kria/uboot.fragment > @@ -1,14 +1,9 @@ > CONFIG_SYS_SPI_U_BOOT_OFFS=0xF80000 > -CONFIG_DTB_RESELECT=y > This should be enabled only for kria but not for others. > For some reason, the CONFIG_MULTI_DTB_FIT option is not building properly with buildroot. Could you look into it? > I get the following error on first build with CONFIG_MULTI_DTB_FIT enabled: > FATAL ERROR: Couldn't open "fit-dtb.blob": No such file or directory > ./tools/mkimage: Can't open u-boot.itb.tmp: No such file or directory > Makefile:1429: recipe for target 'u-boot.itb' failed > make[1]: *** [u-boot.itb] Error 255 > When the CONFIG_MULTI_DTB_FIT is not enabled, the CONFIG_DTB_RESELECT does not exist as an option. > I work around the issue in buildroot by overlaying the carrier board dtbo directly into the som dtb as you can see here: > https://git.busybox.net/buildroot/tree/board/zynqmp/kria/kv260/kv260.sh I have identified another way of dealing with this issue. The problem appears to be compiler related in that the buildroot compiler attempts to generate the u-boot.itb too soon after the fit-dtb.blob is built. Using the Xilinx compiler, the mkimage call to create the u-boot.itb is the very last step after building the spl, so there is plenty of time between building the fit-dtb.blob and u-boot.itb. However, even if we fix this, the u-boot.itb that is built will be wrong anyway because the fit-dtb.blob will not have a dtb containing the kria som dtb along with the carrier board dtbo. So to solve the problem, I propose the following: 1. We turn off creation of the u-boot.itb at u-boot build time by adding the following to uboot.fragment: CONFIG_BUILD_TARGET="" 2. We use the kv260.sh for generating the correct fit-dtb.blob and u-boot.itb files: fdtoverlay -o ${UBOOT_DIR}/fit-dtb.blob -i ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb ${UBOOT_DIR}/arch/arm/dts/zynqmp-sck-kv-g-revB.dtbo ${UBOOT_DIR}/tools/mkimage -E -f ${UBOOT_DIR}/u-boot.its -B 0x8 ${BINARIES_DIR}/u-boot.itb Using this method, we can include the following u-boot configs without any build failures: CONFIG_MULTI_DTB_FIT CONFIG_DTB_RESELECT Long term, the u-boot.itb build process is going to be re-worked anyway, so that a combined som dtb and carrier board dtb overlay be can be used at build time. When this happens, it should replace the above work around enabling us to generate a correct u-boot.itb without needing the kv260.sh post-build script. Is everyone ok with this this short term work around? Best regards, Neal Frager AMD
diff --git a/board/zynqmp/kria/uboot.fragment b/board/zynqmp/kria/uboot.fragment index 9e32edfb36..f91baa2d8b 100644 --- a/board/zynqmp/kria/uboot.fragment +++ b/board/zynqmp/kria/uboot.fragment @@ -1,14 +1,9 @@ CONFIG_SYS_SPI_U_BOOT_OFFS=0xF80000 -CONFIG_DTB_RESELECT=y CONFIG_DMA=y CONFIG_XILINX_DPDMA=y CONFIG_PHY=y CONFIG_PHY_XILINX_ZYNQMP=y CONFIG_PINCTRL=y CONFIG_PINCONF=y -CONFIG_POWER_DOMAIN=y -CONFIG_ZYNQMP_POWER_DOMAIN=y -CONFIG_DM_RESET=y -CONFIG_RESET_ZYNQMP=y CONFIG_VIDEO_ZYNQMP_DPSUB=y CONFIG_SF_DEFAULT_SPEED=40000000
Reduce the configs in the kria/uboot.fragment to only what is necessary. This patch has been build and run tested on a kria kv260 starter kit. Signed-off-by: Neal Frager <neal.frager@amd.com> --- board/zynqmp/kria/uboot.fragment | 5 ----- 1 file changed, 5 deletions(-)