configs: orangepi-3b-rk3566_defconfig: Enable CONFIG_MULTI_DTB_FIT
PATCH 1/1 configs: orangepi-3b-rk3566_defconfig: Enable CONFIG_MULTI_DTB_FIT
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.
---
configs/orangepi-3b-rk3566_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/orangepi-3b-rk3566_defconfig +1 -0
@@ -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
Signature · 1 line
2.43.0
Hi,
Quoted 19 lines · Jianfeng Liu
Orange Pi 3B uses
board_fit_config_name_matchinrk_board_late_initto decide which kernel dtb to load. To make it work with system using grub, we have to enableCONFIG_MULTI_DTB_FIT.Tested with opensuse using grub2, without
CONFIG_MULTI_DTB_FITgrub will load rk3566-orangepi-3b.dtb in u-boot, which has no gmac ethernet enabled.Signed-off-by Jianfeng Liu <[email protected]>---
configs/orangepi-3b-rk3566_defconfig | 1 + 1 file changed, 1 insertion(+)configs/orangepi-3b-rk3566_defconfig +0
-0
configs/orangepi-3b-rk3566_defconfig CONFIG_SPL_OF_CONTROL=y · line 51
Quoted 4 lines
configs/orangepi-3b-rk3566_defconfig +1
-0@@ -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
Quoted 3 lines
configs/orangepi-3b-rk3566_defconfig +0
-0CONFIG_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,
Quoted 13 lines · Jonas
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 thisKconfigoption help U-Boot proper load correct FDT. It only made my debug log print out:
fit_find_config_node: Cannot find /configurations node: -1And U-Boot proper still used the base "Model: Xunlong Orange Pi 3B". Not sure if this behavior is different when vendor SPL is used.
Quoted 7 lines
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
Kconfigoption?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 thisKconfigoption.
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