All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot
@ 2024-05-27 13:48 Quentin Schulz
  2024-05-30 14:11 ` [yocto-patches] " Trevor Woerner
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2024-05-27 13:48 UTC (permalink / raw)
  To: yocto-patches; +Cc: Quentin Schulz

From: Quentin Schulz <quentin.schulz@cherry.de>

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")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 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}"

---
base-commit: bf9ade59abc15a5f6fb5450265c214450f35857f
change-id: 20240527-non-fit-fdt-boot-ba5931dcbeb7

Best regards,
-- 
Quentin Schulz <quentin.schulz@cherry.de>



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot
  2024-05-27 13:48 [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot Quentin Schulz
@ 2024-05-30 14:11 ` Trevor Woerner
  2024-05-31  8:50   ` Quentin Schulz
  0 siblings, 1 reply; 4+ messages in thread
From: Trevor Woerner @ 2024-05-30 14:11 UTC (permalink / raw)
  To: yocto-patches; +Cc: Quentin Schulz

On Mon 2024-05-27 @ 03:48:24 PM, Quentin Schulz via lists.yoctoproject.org wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
> 
> 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")
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
>  conf/machine/include/rockchip-extlinux.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Trevor Woerner <twoerner@gmail.com>
Applied to meta-rockchip, master branch. Thanks!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot
  2024-05-30 14:11 ` [yocto-patches] " Trevor Woerner
@ 2024-05-31  8:50   ` Quentin Schulz
  2024-06-04 18:04     ` Trevor Woerner
  0 siblings, 1 reply; 4+ messages in thread
From: Quentin Schulz @ 2024-05-31  8:50 UTC (permalink / raw)
  To: Trevor Woerner, yocto-patches

Hi Trevor,

On 5/30/24 4:11 PM, Trevor Woerner wrote:
> On Mon 2024-05-27 @ 03:48:24 PM, Quentin Schulz via lists.yoctoproject.org wrote:
>> From: Quentin Schulz <quentin.schulz@cherry.de>
>>
>> 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")
>> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
>> ---
>>   conf/machine/include/rockchip-extlinux.inc | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Trevor Woerner <twoerner@gmail.com>
> Applied to meta-rockchip, master branch. Thanks!

Thanks!

Can we backport this to scarthgap too? How do you want to proceed? I 
send a new patch with [scarthgap] in the title?

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto-patches] [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot
  2024-05-31  8:50   ` Quentin Schulz
@ 2024-06-04 18:04     ` Trevor Woerner
  0 siblings, 0 replies; 4+ messages in thread
From: Trevor Woerner @ 2024-06-04 18:04 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: yocto-patches

On Fri 2024-05-31 @ 10:50:43 AM, Quentin Schulz wrote:
> Hi Trevor,
> 
> On 5/30/24 4:11 PM, Trevor Woerner wrote:
> > On Mon 2024-05-27 @ 03:48:24 PM, Quentin Schulz via lists.yoctoproject.org wrote:
> > > From: Quentin Schulz <quentin.schulz@cherry.de>
> > > 
> > > 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")
> > > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> > > ---
> > >   conf/machine/include/rockchip-extlinux.inc | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Reviewed-by: Trevor Woerner <twoerner@gmail.com>
> > Applied to meta-rockchip, master branch. Thanks!
> 
> Thanks!
> 
> Can we backport this to scarthgap too? How do you want to proceed? I send a
> new patch with [scarthgap] in the title?

Done!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-04 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 13:48 [PATCH meta-rockchip] rockchip-extlinux.inc: fix non-fit KERNEL_IMAGETYPE image boot Quentin Schulz
2024-05-30 14:11 ` [yocto-patches] " Trevor Woerner
2024-05-31  8:50   ` Quentin Schulz
2024-06-04 18:04     ` Trevor Woerner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.