summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/uboot-extlinux-config.bbclass
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2024-12-19 16:25:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-08 12:37:20 +0000
commite77f8ca209d81d64b5d33af64481eccc241ad13d (patch)
treebffa949678207577040ebb4762bd9276c932166a /meta/classes-recipe/uboot-extlinux-config.bbclass
parentbd88ecae63e6b654239e549aa09ef118867403eb (diff)
downloadpoky-e77f8ca209d81d64b5d33af64481eccc241ad13d.tar.gz
uboot-extlinux-config.bbclass: add support for DTBOs
Also known as FDTO, DTO or Device Tree Overlay. This adds a new property per label in extlinux.conf for which device tree overlays to apply on top of the base device tree (the one specified in FDT or guessed by the bootloader if only FDTDIR is set). It is a space-separated list of paths to the .dtbo file(s). Note that the base FDT needs to have symbols enabled (DTC_FLAGS needs to have -@ in it) for an overlay to be applicable. This is only applicable for non-FIT setups. (From OE-Core rev: 3ac21b32b5f5616cc7c0641fb3132eec9b27e5b7) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/uboot-extlinux-config.bbclass')
-rw-r--r--meta/classes-recipe/uboot-extlinux-config.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes-recipe/uboot-extlinux-config.bbclass b/meta/classes-recipe/uboot-extlinux-config.bbclass
index a6938ab063..2fa83b2c8b 100644
--- a/meta/classes-recipe/uboot-extlinux-config.bbclass
+++ b/meta/classes-recipe/uboot-extlinux-config.bbclass
@@ -15,6 +15,7 @@
15# UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name. 15# UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name.
16# UBOOT_EXTLINUX_FDTDIR - Device tree directory. 16# UBOOT_EXTLINUX_FDTDIR - Device tree directory.
17# UBOOT_EXTLINUX_FDT - Device tree file. 17# UBOOT_EXTLINUX_FDT - Device tree file.
18# UBOOT_EXTLINUX_FDTOVERLAYS - Device tree overlay files. Space-separated list.
18# UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to 19# UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to
19# concatenate and use as an initrd (optional). 20# concatenate and use as an initrd (optional).
20# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description. 21# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description.
@@ -66,6 +67,7 @@
66UBOOT_EXTLINUX_CONSOLE ??= "console=${console},${baudrate}" 67UBOOT_EXTLINUX_CONSOLE ??= "console=${console},${baudrate}"
67UBOOT_EXTLINUX_LABELS ??= "linux" 68UBOOT_EXTLINUX_LABELS ??= "linux"
68UBOOT_EXTLINUX_FDT ??= "" 69UBOOT_EXTLINUX_FDT ??= ""
70UBOOT_EXTLINUX_FDTOVERLAYS ??= ""
69UBOOT_EXTLINUX_FDTDIR ??= "../" 71UBOOT_EXTLINUX_FDTDIR ??= "../"
70UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}" 72UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}"
71UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw" 73UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw"
@@ -136,6 +138,7 @@ python do_create_extlinux_config() {
136 fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR') 138 fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR')
137 139
138 fdt = localdata.getVar('UBOOT_EXTLINUX_FDT') 140 fdt = localdata.getVar('UBOOT_EXTLINUX_FDT')
141 fdtoverlays = localdata.getVar('UBOOT_EXTLINUX_FDTOVERLAYS')
139 142
140 cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image)) 143 cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image))
141 144
@@ -144,6 +147,9 @@ python do_create_extlinux_config() {
144 elif fdtdir: 147 elif fdtdir:
145 cfgfile.write('\tFDTDIR %s\n' % (fdtdir)) 148 cfgfile.write('\tFDTDIR %s\n' % (fdtdir))
146 149
150 if fdtoverlays:
151 cfgfile.write('\tFDTOVERLAYS %s\n' % (' '.join(fdtoverlays.split())))
152
147 kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS') 153 kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS')
148 154
149 initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD') 155 initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD')