Commit Graph

10 Commits

Author SHA1 Message Date
Quentin Schulz
51ffd381e3 uboot-extlinux-config.bbclass: invalidate do_create_extlinux_config on changes to UBOOT_EXTLINUX_FDTOVERLAYS:x
do_create_extlinux_config is using a bit of an odd mechanism which
doesn't work well with sstate cache invalidation.

BitBake will detect changes to UBOOT_EXTLINUX_FDTOVERLAYS because it's
explicitly mentioned in the task, but it'll miss changes to
UBOOT_EXTLINUX_FDTOVERLAYS:label because this OVERRIDES is set within
the task, so the value of UBOOT_EXTLINUX_FDTOVERLAYS for the label
OVERRIDES will only ever change from within the task, while it is
running, much later than during parsing.

For that to work properly, we need to add the entire variable (including
the OVERRIDES part) to the vardeps varflag of the task so that its value
is monitored. This is already done for all possible label variables but
FDTOVERLAYS was forgotten.

Fixes: 3ac21b32b5f5 ("uboot-extlinux-config.bbclass: add support for DTBOs")
(From OE-Core rev: a41fd633786a2404b5eee399ed0602e229c4be77)

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>
2025-01-20 13:39:00 +00:00
Quentin Schulz
e77f8ca209 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>
2025-01-08 12:37:20 +00:00
Quentin Schulz
bd88ecae63 uboot-extlinux-config.bbclass: simplify FDT/FDTDIR logic
The three blocks share the same LABEL and KERNEL content, so let's
factor that part out.

(From OE-Core rev: 544c0f72774e17d1dca4664c0bc21f8281dade5b)

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>
2025-01-08 12:37:20 +00:00
Quentin Schulz
8d8c9078c6 uboot-extlinux-config.bbclass: fix missed override syntax migration
uboot-extlinux-config allows to specify multiple "labels" (entries in a
menu, à-la grub) and each of them have their own values for some fields.
Each "base" variable, e.g. UBOOT_EXTLINUX_FDT can be overridden for each
label. This is done via the OVERRIDES mechanism based on the label name,
e.g. UBOOT_EXTLINUX_FDT:linux if linux is a label.

However, OVERRIDES doesn't contain the label globally because it's only
necessary in one task. Therefore, the OVERRIDES itself is modified
within the task. This means that the sigdata will not be told the
dependency on UBOOT_EXTLINUX_FDT:linux, because it cannot know about it.

For this reason, we need to explicitly specify which variables this task
depends on via vardeps varflag for the task.

This was done in the past, but we missed updating it during the override
syntax migration so the cache wouldn't get invalidated if someone
modifies UBOOT_EXTLINUX_FDT:linux from a configuration file or a
bbappend for example.

Let's fix this by migrating it to the new syntax.

(From OE-Core rev: b4dd9d873508128adbbf5ff6cf0a3df3d2ffbcf6)

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-05 21:09:10 +01:00
Daniel Semkowicz
056fe7fad4 uboot-extlinux-config.bbclass: Add menu title configuration
Add new UBOOT_EXTLINUX_MENU_TITLE variable that allows configuring
the "MENU TITLE" entry.

If set to empty, "MENU TITLE" will not be added to the output file.

(From OE-Core rev: 23026911142585fde9290e21b07934fc583b6540)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
8676ca858b uboot-extlinux-config.bbclass: Uppercase "menu title" entry
All other extlinux.conf entries are written to the output file
in uppercase.

(From OE-Core rev: 6c89654cf37da95aeea07e1645f2cdffe320c8bc)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
67cf43618f uboot-extlinux-config.bbclass: Remove repeated space character
(From OE-Core rev: e8a7a8d93c20f966bc2845d23696d01234cbb227)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-04 23:55:12 +01:00
Daniel Semkowicz
047eea40f5 uboot-extlinux-config.bbclass: Add missing variable descriptions
Description of UBOOT_EXTLINUX and UBOOT_EXTLINUX_CONFIG was missing.
Describe these two variables in class comment.

(From OE-Core rev: fb1c2cae3dbd37ad25d26efb09e80480d49063f9)

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-01 08:12:59 +01:00
Quentin Schulz
84ed8b20d4 uboot-extlinux-config.bbclass: fix old override syntax in comment
The comment specifies how to use the variables but uses the older and
now unsupported override syntax. Let's update to match the newer syntax.

Cc: Quentin Schulz <foss+yocto@0leil.net>
(From OE-Core rev: 0a381eea4d50ff1c6e7c7d0d4df62eb581454b48)

(From OE-Core rev: bb64f3fed29b9532e6ddc9a2ba0283d373622d87)

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-10 11:36:34 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00