From c8bb75f1726fc0081f15f6a8ad045f0096b9a1cc Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 27 May 2024 15:48:24 +0200 Subject: [PATCH] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot On systems where KERNEL_IMAGETYPE is not set to fitImage, one needs to either pass an DTB or a path to a directory where DTBs are located on the rootfs. When FDT property in extlinux is provided, FDTDIR isn't used (and actually u-boot-extlinux-config doesn't even write it to the configuration file). When relative paths are used, they are relative to the directory where extlinux.conf is stored[1]. Since the DTBs are stored in /boot, just providing the filename of the DTB won't work because extlinux in U-Boot will search for it in /boot/extlinux. We should therefore either use ../ prefix for relative paths or use /boot to make it absolute. /boot is more explicit and easily parseable, so let's use the latter. [1] https://wiki.syslinux.org/wiki/index.php?title=Config#Working_directory Fixes: d80fa46c42f2 ("rockchip-extlinux.inc: handle multiple DTs in KERNEL_DEVICETREE") Fixes: 3b51866f2251 ("remove /boot partition") Fixes: 13316b796814 ("KERNEL_DEVICETREE: 32-bit re-org") Reviewed-by: Trevor Woerner Signed-off-by: Quentin Schulz --- conf/machine/include/rockchip-extlinux.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/machine/include/rockchip-extlinux.inc b/conf/machine/include/rockchip-extlinux.inc index 1f036c4..fddab73 100644 --- a/conf/machine/include/rockchip-extlinux.inc +++ b/conf/machine/include/rockchip-extlinux.inc @@ -14,7 +14,7 @@ NONFITDT ?= "${@d.getVar('KERNEL_DEVICETREE').split()[0].split('/')[1]}" UBOOT_EXTLINUX ?= "1" UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=rootfsA" UBOOT_EXTLINUX_FDTDIR ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}" -UBOOT_EXTLINUX_FDT ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${NONFITDT}', d)}" +UBOOT_EXTLINUX_FDT ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot/${NONFITDT}', d)}" UBOOT_EXTLINUX_CONSOLE ?= "earlycon console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8" UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw rootfstype=ext4" UBOOT_EXTLINUX_KERNEL_IMAGE ?= "/boot/${KERNEL_IMAGETYPE}"