Message ID | 20241023085225.403545-1-liujianfeng1994@gmail.com |
---|---|
State | Handled Elsewhere |
Delegated to: | Kever Yang |
Headers | show |
Series | configs: orangepi-3b-rk3566_defconfig: Enable CONFIG_MULTI_DTB_FIT | expand |
Hi, On 2024-10-23 10:52, Jianfeng Liu wrote: > Orange Pi 3B uses board_fit_config_name_match in rk_board_late_init to > decide which kernel dtb to load. To make it work with system using grub, > we have to enable CONFIG_MULTI_DTB_FIT. > > Tested with opensuse using grub2, without CONFIG_MULTI_DTB_FIT grub will > load rk3566-orangepi-3b.dtb in u-boot, which has no gmac ethernet > enabled. > > Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com> > --- > > configs/orangepi-3b-rk3566_defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configs/orangepi-3b-rk3566_defconfig b/configs/orangepi-3b-rk3566_defconfig > index 2181c9caf58..e87849a9946 100644 > --- a/configs/orangepi-3b-rk3566_defconfig > +++ b/configs/orangepi-3b-rk3566_defconfig > @@ -48,6 +48,7 @@ CONFIG_SPL_OF_CONTROL=y > CONFIG_OF_LIVE=y > # CONFIG_OF_UPSTREAM is not set > CONFIG_OF_LIST="rk3566-orangepi-3b rk3566-orangepi-3b-v1.1 rk3566-orangepi-3b-v2.1" > +CONFIG_MULTI_DTB_FIT=y SPL should call spl_simple_fit_parse() -> fit_find_config_node() -> board_fit_config_name_match() to select correct FIT configuration and load correct FDT for U-Boot proper. Based on runtime testing making board_fit_config_name_match() always return EINVAL in SPL, I did not see this Kconfig option help U-Boot proper load correct FDT. It only made my debug log print out: fit_find_config_node: Cannot find /configurations node: -1 And U-Boot proper still used the base "Model: Xunlong Orange Pi 3B". Not sure if this behavior is different when vendor SPL is used. From my understanding your issue may have been because of a mixture of older SPL and newer U-Boot proper, and was not really fixed by this Kconfig option? Unless there is other uses for MULTI_DTB_FIT, e.g. if it is required to load correct FDT from a kernel FIT with multiple FDTs, I think we can skip adding this Kconfig option. Regards, Jonas > CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" > CONFIG_SYS_RELOC_GD_ENV_ADDR=y > CONFIG_SPL_DM_SEQ_ALIAS=y
Hi, On Wed, 23 Oct 2024 21:09:34 +0200, Jonas wrote: >SPL should call spl_simple_fit_parse() -> fit_find_config_node() -> >board_fit_config_name_match() to select correct FIT configuration and >load correct FDT for U-Boot proper. > >Based on runtime testing making board_fit_config_name_match() always >return EINVAL in SPL, I did not see this Kconfig option help U-Boot >proper load correct FDT. It only made my debug log print out: > > fit_find_config_node: Cannot find /configurations node: -1 > >And U-Boot proper still used the base "Model: Xunlong Orange Pi 3B". >Not sure if this behavior is different when vendor SPL is used. > >From my understanding your issue may have been because of a mixture of >older SPL and newer U-Boot proper, and was not really fixed by this >Kconfig option? > >Unless there is other uses for MULTI_DTB_FIT, e.g. if it is required to >load correct FDT from a kernel FIT with multiple FDTs, I think we can >skip adding this Kconfig option. Yes, please ignore this patch. I was using an old version of mainlie u-boot on emmc which did not set correct fit when booting from sd card. Now without this patch I can boot without issue when booting with emmc or sd card only. I am sorry for your time on my mistake. Regards, Jianfeng
diff --git a/configs/orangepi-3b-rk3566_defconfig b/configs/orangepi-3b-rk3566_defconfig index 2181c9caf58..e87849a9946 100644 --- a/configs/orangepi-3b-rk3566_defconfig +++ b/configs/orangepi-3b-rk3566_defconfig @@ -48,6 +48,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_LIST="rk3566-orangepi-3b rk3566-orangepi-3b-v1.1 rk3566-orangepi-3b-v2.1" +CONFIG_MULTI_DTB_FIT=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SPL_DM_SEQ_ALIAS=y
Orange Pi 3B uses board_fit_config_name_match in rk_board_late_init to decide which kernel dtb to load. To make it work with system using grub, we have to enable CONFIG_MULTI_DTB_FIT. Tested with opensuse using grub2, without CONFIG_MULTI_DTB_FIT grub will load rk3566-orangepi-3b.dtb in u-boot, which has no gmac ethernet enabled. Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com> --- configs/orangepi-3b-rk3566_defconfig | 1 + 1 file changed, 1 insertion(+)