* [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
@ 2025-01-28 10:23 Simon A. Eugster
2025-01-29 10:06 ` Antonin Godard
2025-01-30 15:57 ` [docs] " Quentin Schulz
0 siblings, 2 replies; 10+ messages in thread
From: Simon A. Eugster @ 2025-01-28 10:23 UTC (permalink / raw)
To: docs; +Cc: antonin.godard, Simon A. Eugster
This patch describes how to use overrides for grub-efi-cfg because that
is otherwise only clear after reading the .bbclass file. It also adds
a description for GRUB_TITLE.
Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
---
documentation/ref-manual/classes.rst | 16 ++++++++++++++++
documentation/ref-manual/variables.rst | 5 +++++
2 files changed, 21 insertions(+)
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 761be7b545..1d64ac2f28 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -991,6 +991,7 @@ This class supports several variables:
- :term:`INITRD`: Indicates list of filesystem images to
concatenate and use as an initial RAM disk (initrd) (optional).
+ Can be specified for each ``LABEL``.
- :term:`ROOTFS`: Indicates a filesystem image to include
as the root filesystem (optional).
@@ -1004,6 +1005,9 @@ This class supports several variables:
- :term:`APPEND`: An override list of append strings for
each ``LABEL``.
+- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
+ Defaults to ``LABEL`` if it is not defined.
+
- :term:`GRUB_OPTS`: Additional options to add to the
configuration (optional). Options are delimited using semi-colon
characters (``;``).
@@ -1011,6 +1015,18 @@ This class supports several variables:
- :term:`GRUB_TIMEOUT`: Timeout before executing
the default ``LABEL`` (optional).
+Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB boot
+entry, and some variables can be defined individually per ``LABEL``. The label
+specific override names are defined as ``grub_LABEL``.
+
+For example, for a label ``factory``, the override name would be
+``grub_factory``. A custom GRUB menu entry titled "Factory Install" with the
+additional parameter ``factory=yes`` can be achieved as follows::
+
+ LABELS:append = " factory"
+ APPEND:grub_factory = "factory=yes"
+ GRUB_TITLE:grub_factory = "Factory Install"
+
.. _ref-classes-gsettings:
``gsettings``
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 0c5c7aab97..4eb11abede 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -3320,6 +3320,11 @@ system and gives an overview of their function and contents.
:ref:`ref-classes-grub-efi` class for more information
on how this variable is used.
+ :term:`GRUB_TITLE`
+ Specifies custom titles for GRUB labels defined in :term:`LABELS`. See
+ the :ref:`ref-classes-grub-efi` class for more information on how this
+ variable is used.
+
:term:`GTKIMMODULES_PACKAGES`
When inheriting the :ref:`ref-classes-gtk-immodules-cache` class,
this variable specifies the packages that contain the GTK+ input
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-28 10:23 [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE Simon A. Eugster
@ 2025-01-29 10:06 ` Antonin Godard
2025-01-31 12:13 ` Simon Eugster
2025-01-30 15:57 ` [docs] " Quentin Schulz
1 sibling, 1 reply; 10+ messages in thread
From: Antonin Godard @ 2025-01-29 10:06 UTC (permalink / raw)
To: Simon A. Eugster, docs
Hi Simon,
On Tue Jan 28, 2025 at 11:23 AM CET, Simon A. Eugster wrote:
> This patch describes how to use overrides for grub-efi-cfg because that
> is otherwise only clear after reading the .bbclass file. It also adds
> a description for GRUB_TITLE.
>
> Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
> ---
> documentation/ref-manual/classes.rst | 16 ++++++++++++++++
> documentation/ref-manual/variables.rst | 5 +++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
> index 761be7b545..1d64ac2f28 100644
> --- a/documentation/ref-manual/classes.rst
> +++ b/documentation/ref-manual/classes.rst
> @@ -991,6 +991,7 @@ This class supports several variables:
>
> - :term:`INITRD`: Indicates list of filesystem images to
> concatenate and use as an initial RAM disk (initrd) (optional).
> + Can be specified for each ``LABEL``.
>
> - :term:`ROOTFS`: Indicates a filesystem image to include
> as the root filesystem (optional).
> @@ -1004,6 +1005,9 @@ This class supports several variables:
> - :term:`APPEND`: An override list of append strings for
> each ``LABEL``.
>
> +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
> + Defaults to ``LABEL`` if it is not defined.
> +
> - :term:`GRUB_OPTS`: Additional options to add to the
> configuration (optional). Options are delimited using semi-colon
> characters (``;``).
> @@ -1011,6 +1015,18 @@ This class supports several variables:
> - :term:`GRUB_TIMEOUT`: Timeout before executing
> the default ``LABEL`` (optional).
>
> +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB boot
:term:``LABELS`` is incorrect, it should be enclosed with single backticks only.
Regards,
Antonin
> +entry, and some variables can be defined individually per ``LABEL``. The label
> +specific override names are defined as ``grub_LABEL``.
> +
> +For example, for a label ``factory``, the override name would be
> +``grub_factory``. A custom GRUB menu entry titled "Factory Install" with the
> +additional parameter ``factory=yes`` can be achieved as follows::
> +
> + LABELS:append = " factory"
> + APPEND:grub_factory = "factory=yes"
> + GRUB_TITLE:grub_factory = "Factory Install"
> +
> .. _ref-classes-gsettings:
>
> ``gsettings``
> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
> index 0c5c7aab97..4eb11abede 100644
> --- a/documentation/ref-manual/variables.rst
> +++ b/documentation/ref-manual/variables.rst
> @@ -3320,6 +3320,11 @@ system and gives an overview of their function and contents.
> :ref:`ref-classes-grub-efi` class for more information
> on how this variable is used.
>
> + :term:`GRUB_TITLE`
> + Specifies custom titles for GRUB labels defined in :term:`LABELS`. See
> + the :ref:`ref-classes-grub-efi` class for more information on how this
> + variable is used.
> +
> :term:`GTKIMMODULES_PACKAGES`
> When inheriting the :ref:`ref-classes-gtk-immodules-cache` class,
> this variable specifies the packages that contain the GTK+ input
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-28 10:23 [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE Simon A. Eugster
2025-01-29 10:06 ` Antonin Godard
@ 2025-01-30 15:57 ` Quentin Schulz
2025-01-31 14:26 ` Simon Eugster
1 sibling, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2025-01-30 15:57 UTC (permalink / raw)
To: simon.eu, docs; +Cc: antonin.godard
Hi Simon,
On 1/28/25 11:23 AM, Simon A. Eugster via lists.yoctoproject.org wrote:
> This patch describes how to use overrides for grub-efi-cfg because that
> is otherwise only clear after reading the .bbclass file. It also adds
> a description for GRUB_TITLE.
>
> Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
> ---
> documentation/ref-manual/classes.rst | 16 ++++++++++++++++
> documentation/ref-manual/variables.rst | 5 +++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
> index 761be7b545..1d64ac2f28 100644
> --- a/documentation/ref-manual/classes.rst
> +++ b/documentation/ref-manual/classes.rst
> @@ -991,6 +991,7 @@ This class supports several variables:
>
> - :term:`INITRD`: Indicates list of filesystem images to
> concatenate and use as an initial RAM disk (initrd) (optional).
> + Can be specified for each ``LABEL``.
>
> - :term:`ROOTFS`: Indicates a filesystem image to include
> as the root filesystem (optional).
> @@ -1004,6 +1005,9 @@ This class supports several variables:
> - :term:`APPEND`: An override list of append strings for
> each ``LABEL``.
>
> +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
> + Defaults to ``LABEL`` if it is not defined.
> +
I would rather say that it defaults to label's name (``LABEL``) or
something like this. GRUB_TITLE does not defaults to LABEL, which is
what this may imply.
> - :term:`GRUB_OPTS`: Additional options to add to the
> configuration (optional). Options are delimited using semi-colon
> characters (``;``).
> @@ -1011,6 +1015,18 @@ This class supports several variables:
> - :term:`GRUB_TIMEOUT`: Timeout before executing
> the default ``LABEL`` (optional).
>
> +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB boot
> +entry, and some variables can be defined individually per ``LABEL``. The label
> +specific override names are defined as ``grub_LABEL``.
> +
> +For example, for a label ``factory``, the override name would be
> +``grub_factory``. A custom GRUB menu entry titled "Factory Install" with the
> +additional parameter ``factory=yes`` can be achieved as follows::
> +
> + LABELS:append = " factory"
> + APPEND:grub_factory = "factory=yes"
> + GRUB_TITLE:grub_factory = "Factory Install"
> +
FYI, I believe this is currently not properly handled by sstate-cache.
We use the same OVERRIDES trick on extlinux.conf generation for U-Boot
and we needed (it seems like, wasn't there when it was implemented)
explicitly list all variables with their OVERRIDES.
c.f. do_create_extlinux_config[vardeps] in
meta/classes-recipe/uboot-extlinux-config.bbclass.
An easy way to check that would be to only modify APPEND:grub_factory
and see if it regenerates the grub config file appropriately.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-29 10:06 ` Antonin Godard
@ 2025-01-31 12:13 ` Simon Eugster
0 siblings, 0 replies; 10+ messages in thread
From: Simon Eugster @ 2025-01-31 12:13 UTC (permalink / raw)
To: Antonin Godard; +Cc: docs
[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]
Hi Antonin,
On Wed, Jan 29, 2025 at 11:06 AM Antonin Godard <antonin.godard@bootlin.com>
wrote:
> Hi Simon,
>
> On Tue Jan 28, 2025 at 11:23 AM CET, Simon A. Eugster wrote:
> > This patch describes how to use overrides for grub-efi-cfg because that
> > is otherwise only clear after reading the .bbclass file. It also adds
> > a description for GRUB_TITLE.
> >
> > Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
> > ---
> > documentation/ref-manual/classes.rst | 16 ++++++++++++++++
> > documentation/ref-manual/variables.rst | 5 +++++
> > 2 files changed, 21 insertions(+)
> >
> > diff --git a/documentation/ref-manual/classes.rst
> b/documentation/ref-manual/classes.rst
> > index 761be7b545..1d64ac2f28 100644
> > --- a/documentation/ref-manual/classes.rst
> > +++ b/documentation/ref-manual/classes.rst
> > @@ -991,6 +991,7 @@ This class supports several variables:
> >
> > - :term:`INITRD`: Indicates list of filesystem images to
> > concatenate and use as an initial RAM disk (initrd) (optional).
> > + Can be specified for each ``LABEL``.
> >
> > - :term:`ROOTFS`: Indicates a filesystem image to include
> > as the root filesystem (optional).
> > @@ -1004,6 +1005,9 @@ This class supports several variables:
> > - :term:`APPEND`: An override list of append strings for
> > each ``LABEL``.
> >
> > +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
> > + Defaults to ``LABEL`` if it is not defined.
> > +
> > - :term:`GRUB_OPTS`: Additional options to add to the
> > configuration (optional). Options are delimited using semi-colon
> > characters (``;``).
> > @@ -1011,6 +1015,18 @@ This class supports several variables:
> > - :term:`GRUB_TIMEOUT`: Timeout before executing
> > the default ``LABEL`` (optional).
> >
> > +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB
> boot
>
> :term:``LABELS`` is incorrect, it should be enclosed with single backticks
> only.
>
Thanks, will fix that!
Simon
[-- Attachment #2: Type: text/html, Size: 2749 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-30 15:57 ` [docs] " Quentin Schulz
@ 2025-01-31 14:26 ` Simon Eugster
2025-01-31 14:34 ` Quentin Schulz
0 siblings, 1 reply; 10+ messages in thread
From: Simon Eugster @ 2025-01-31 14:26 UTC (permalink / raw)
To: Quentin Schulz; +Cc: docs
[-- Attachment #1: Type: text/plain, Size: 3574 bytes --]
Hi Quentin,
On Thu, Jan 30, 2025 at 4:57 PM Quentin Schulz <quentin.schulz@cherry.de>
wrote:
> Hi Simon,
>
> On 1/28/25 11:23 AM, Simon A. Eugster via lists.yoctoproject.org wrote:
> > This patch describes how to use overrides for grub-efi-cfg because that
> > is otherwise only clear after reading the .bbclass file. It also adds
> > a description for GRUB_TITLE.
> >
> > Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
> > ---
> > documentation/ref-manual/classes.rst | 16 ++++++++++++++++
> > documentation/ref-manual/variables.rst | 5 +++++
> > 2 files changed, 21 insertions(+)
> >
> > diff --git a/documentation/ref-manual/classes.rst
> b/documentation/ref-manual/classes.rst
> > index 761be7b545..1d64ac2f28 100644
> > --- a/documentation/ref-manual/classes.rst
> > +++ b/documentation/ref-manual/classes.rst
> > @@ -991,6 +991,7 @@ This class supports several variables:
> >
> > - :term:`INITRD`: Indicates list of filesystem images to
> > concatenate and use as an initial RAM disk (initrd) (optional).
> > + Can be specified for each ``LABEL``.
> >
> > - :term:`ROOTFS`: Indicates a filesystem image to include
> > as the root filesystem (optional).
> > @@ -1004,6 +1005,9 @@ This class supports several variables:
> > - :term:`APPEND`: An override list of append strings for
> > each ``LABEL``.
> >
> > +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
> > + Defaults to ``LABEL`` if it is not defined.
> > +
>
> I would rather say that it defaults to label's name (``LABEL``) or
> something like this. GRUB_TITLE does not defaults to LABEL, which is
> what this may imply.
>
> > - :term:`GRUB_OPTS`: Additional options to add to the
> > configuration (optional). Options are delimited using semi-colon
> > characters (``;``).
> > @@ -1011,6 +1015,18 @@ This class supports several variables:
> > - :term:`GRUB_TIMEOUT`: Timeout before executing
> > the default ``LABEL`` (optional).
> >
> > +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB
> boot
> > +entry, and some variables can be defined individually per ``LABEL``.
> The label
> > +specific override names are defined as ``grub_LABEL``.
> > +
> > +For example, for a label ``factory``, the override name would be
> > +``grub_factory``. A custom GRUB menu entry titled "Factory Install"
> with the
> > +additional parameter ``factory=yes`` can be achieved as follows::
> > +
> > + LABELS:append = " factory"
> > + APPEND:grub_factory = "factory=yes"
> > + GRUB_TITLE:grub_factory = "Factory Install"
> > +
>
> FYI, I believe this is currently not properly handled by sstate-cache.
> We use the same OVERRIDES trick on extlinux.conf generation for U-Boot
> and we needed (it seems like, wasn't there when it was implemented)
> explicitly list all variables with their OVERRIDES.
>
> c.f. do_create_extlinux_config[vardeps] in
> meta/classes-recipe/uboot-extlinux-config.bbclass.
>
> An easy way to check that would be to only modify APPEND:grub_factory
> and see if it regenerates the grub config file appropriately.
>
I checked briefly and first built the image, then I modified one single
variable by adding “modified”, and ran the build again. After both runs, I
did a bitbake -e, and the „modified” was not present after the first build,
but after the second build.
GRUB_TITLE:grub_install:append = "Another NEW title for the
grub_install label, modified"
Did I check correctly?
Thanks,
Simon
[-- Attachment #2: Type: text/html, Size: 4976 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-31 14:26 ` Simon Eugster
@ 2025-01-31 14:34 ` Quentin Schulz
2025-01-31 15:05 ` Simon Eugster
0 siblings, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2025-01-31 14:34 UTC (permalink / raw)
To: simon.eu; +Cc: docs
Hi Simon,
On 1/31/25 3:26 PM, Simon A. Eugster via lists.yoctoproject.org wrote:
> Hi Quentin,
>
> On Thu, Jan 30, 2025 at 4:57 PM Quentin Schulz <quentin.schulz@cherry.de>
> wrote:
>
>> Hi Simon,
>>
>> On 1/28/25 11:23 AM, Simon A. Eugster via lists.yoctoproject.org wrote:
>>> This patch describes how to use overrides for grub-efi-cfg because that
>>> is otherwise only clear after reading the .bbclass file. It also adds
>>> a description for GRUB_TITLE.
>>>
>>> Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
>>> ---
>>> documentation/ref-manual/classes.rst | 16 ++++++++++++++++
>>> documentation/ref-manual/variables.rst | 5 +++++
>>> 2 files changed, 21 insertions(+)
>>>
>>> diff --git a/documentation/ref-manual/classes.rst
>> b/documentation/ref-manual/classes.rst
>>> index 761be7b545..1d64ac2f28 100644
>>> --- a/documentation/ref-manual/classes.rst
>>> +++ b/documentation/ref-manual/classes.rst
>>> @@ -991,6 +991,7 @@ This class supports several variables:
>>>
>>> - :term:`INITRD`: Indicates list of filesystem images to
>>> concatenate and use as an initial RAM disk (initrd) (optional).
>>> + Can be specified for each ``LABEL``.
>>>
>>> - :term:`ROOTFS`: Indicates a filesystem image to include
>>> as the root filesystem (optional).
>>> @@ -1004,6 +1005,9 @@ This class supports several variables:
>>> - :term:`APPEND`: An override list of append strings for
>>> each ``LABEL``.
>>>
>>> +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
>>> + Defaults to ``LABEL`` if it is not defined.
>>> +
>>
>> I would rather say that it defaults to label's name (``LABEL``) or
>> something like this. GRUB_TITLE does not defaults to LABEL, which is
>> what this may imply.
>>
>>> - :term:`GRUB_OPTS`: Additional options to add to the
>>> configuration (optional). Options are delimited using semi-colon
>>> characters (``;``).
>>> @@ -1011,6 +1015,18 @@ This class supports several variables:
>>> - :term:`GRUB_TIMEOUT`: Timeout before executing
>>> the default ``LABEL`` (optional).
>>>
>>> +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB
>> boot
>>> +entry, and some variables can be defined individually per ``LABEL``.
>> The label
>>> +specific override names are defined as ``grub_LABEL``.
>>> +
>>> +For example, for a label ``factory``, the override name would be
>>> +``grub_factory``. A custom GRUB menu entry titled "Factory Install"
>> with the
>>> +additional parameter ``factory=yes`` can be achieved as follows::
>>> +
>>> + LABELS:append = " factory"
>>> + APPEND:grub_factory = "factory=yes"
>>> + GRUB_TITLE:grub_factory = "Factory Install"
>>> +
>>
>> FYI, I believe this is currently not properly handled by sstate-cache.
>> We use the same OVERRIDES trick on extlinux.conf generation for U-Boot
>> and we needed (it seems like, wasn't there when it was implemented)
>> explicitly list all variables with their OVERRIDES.
>>
>> c.f. do_create_extlinux_config[vardeps] in
>> meta/classes-recipe/uboot-extlinux-config.bbclass.
>>
>> An easy way to check that would be to only modify APPEND:grub_factory
>> and see if it regenerates the grub config file appropriately.
>>
>
> I checked briefly and first built the image, then I modified one single
> variable by adding “modified”, and ran the build again. After both runs, I
> did a bitbake -e, and the „modified” was not present after the first build,
> but after the second build.
>
> GRUB_TITLE:grub_install:append = "Another NEW title for the
> grub_install label, modified"
>
> Did I check correctly?
>
No :) bitbake -e is the result of parsing. Parsing isn't an issue here,
but rather what is going to invalidate the sstate-cache for a task or
not. Tasks are only rebuilt if their content changed (taskhask), the
variables they depend on change (this is done by checking the content of
variables stored in the task's vardeps varflag and also I believe by
some heuristic detecting ${VAR}, $VAR, d.getVar('VAR') and the likes),
or if a task they depend on has their output changed (see Hash
Equivalence in the docs).
You need to generate the grub config file once, change a value, generate
it a second time and then inspect the file before and after that change.
GRUB_TITLE for the install LABEL should be modified if everything works
correctly.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-31 14:34 ` Quentin Schulz
@ 2025-01-31 15:05 ` Simon Eugster
2025-01-31 15:09 ` Quentin Schulz
0 siblings, 1 reply; 10+ messages in thread
From: Simon Eugster @ 2025-01-31 15:05 UTC (permalink / raw)
To: Quentin Schulz; +Cc: docs
[-- Attachment #1: Type: text/plain, Size: 5121 bytes --]
Hi Quentin,
Ok, I see! That makes sense. So find found the grub.cfg file in the build
directory at
work/intel_corei7_64-poky-linux/IMAGENAME/1.0/IMAGENAME-1.0/grub_live.cfg
and now it is on modified. So I ran the build again after changing the
variable, and it was updated.
Was this a valid test now? :)
Simon
On Fri, Jan 31, 2025 at 3:34 PM Quentin Schulz <quentin.schulz@cherry.de>
wrote:
> Hi Simon,
>
> On 1/31/25 3:26 PM, Simon A. Eugster via lists.yoctoproject.org wrote:
> > Hi Quentin,
> >
> > On Thu, Jan 30, 2025 at 4:57 PM Quentin Schulz <quentin.schulz@cherry.de
> >
> > wrote:
> >
> >> Hi Simon,
> >>
> >> On 1/28/25 11:23 AM, Simon A. Eugster via lists.yoctoproject.org wrote:
> >>> This patch describes how to use overrides for grub-efi-cfg because that
> >>> is otherwise only clear after reading the .bbclass file. It also adds
> >>> a description for GRUB_TITLE.
> >>>
> >>> Signed-off-by: Simon A. Eugster <simon.eu@gmail.com>
> >>> ---
> >>> documentation/ref-manual/classes.rst | 16 ++++++++++++++++
> >>> documentation/ref-manual/variables.rst | 5 +++++
> >>> 2 files changed, 21 insertions(+)
> >>>
> >>> diff --git a/documentation/ref-manual/classes.rst
> >> b/documentation/ref-manual/classes.rst
> >>> index 761be7b545..1d64ac2f28 100644
> >>> --- a/documentation/ref-manual/classes.rst
> >>> +++ b/documentation/ref-manual/classes.rst
> >>> @@ -991,6 +991,7 @@ This class supports several variables:
> >>>
> >>> - :term:`INITRD`: Indicates list of filesystem images to
> >>> concatenate and use as an initial RAM disk (initrd) (optional).
> >>> + Can be specified for each ``LABEL``.
> >>>
> >>> - :term:`ROOTFS`: Indicates a filesystem image to include
> >>> as the root filesystem (optional).
> >>> @@ -1004,6 +1005,9 @@ This class supports several variables:
> >>> - :term:`APPEND`: An override list of append strings for
> >>> each ``LABEL``.
> >>>
> >>> +- :term:`GRUB_TITLE`: A custom title for each ```LABEL``.
> >>> + Defaults to ``LABEL`` if it is not defined.
> >>> +
> >>
> >> I would rather say that it defaults to label's name (``LABEL``) or
> >> something like this. GRUB_TITLE does not defaults to LABEL, which is
> >> what this may imply.
> >>
> >>> - :term:`GRUB_OPTS`: Additional options to add to the
> >>> configuration (optional). Options are delimited using semi-colon
> >>> characters (``;``).
> >>> @@ -1011,6 +1015,18 @@ This class supports several variables:
> >>> - :term:`GRUB_TIMEOUT`: Timeout before executing
> >>> the default ``LABEL`` (optional).
> >>>
> >>> +Each ``LABEL`` defined in the :term:``LABELS`` variable creates a GRUB
> >> boot
> >>> +entry, and some variables can be defined individually per ``LABEL``.
> >> The label
> >>> +specific override names are defined as ``grub_LABEL``.
> >>> +
> >>> +For example, for a label ``factory``, the override name would be
> >>> +``grub_factory``. A custom GRUB menu entry titled "Factory Install"
> >> with the
> >>> +additional parameter ``factory=yes`` can be achieved as follows::
> >>> +
> >>> + LABELS:append = " factory"
> >>> + APPEND:grub_factory = "factory=yes"
> >>> + GRUB_TITLE:grub_factory = "Factory Install"
> >>> +
> >>
> >> FYI, I believe this is currently not properly handled by sstate-cache.
> >> We use the same OVERRIDES trick on extlinux.conf generation for U-Boot
> >> and we needed (it seems like, wasn't there when it was implemented)
> >> explicitly list all variables with their OVERRIDES.
> >>
> >> c.f. do_create_extlinux_config[vardeps] in
> >> meta/classes-recipe/uboot-extlinux-config.bbclass.
> >>
> >> An easy way to check that would be to only modify APPEND:grub_factory
> >> and see if it regenerates the grub config file appropriately.
> >>
> >
> > I checked briefly and first built the image, then I modified one single
> > variable by adding “modified”, and ran the build again. After both runs,
> I
> > did a bitbake -e, and the „modified” was not present after the first
> build,
> > but after the second build.
> >
> > GRUB_TITLE:grub_install:append = "Another NEW title for the
> > grub_install label, modified"
> >
> > Did I check correctly?
> >
>
> No :) bitbake -e is the result of parsing. Parsing isn't an issue here,
> but rather what is going to invalidate the sstate-cache for a task or
> not. Tasks are only rebuilt if their content changed (taskhask), the
> variables they depend on change (this is done by checking the content of
> variables stored in the task's vardeps varflag and also I believe by
> some heuristic detecting ${VAR}, $VAR, d.getVar('VAR') and the likes),
> or if a task they depend on has their output changed (see Hash
> Equivalence in the docs).
>
> You need to generate the grub config file once, change a value, generate
> it a second time and then inspect the file before and after that change.
> GRUB_TITLE for the install LABEL should be modified if everything works
> correctly.
>
> Cheers,
> Quentin
>
[-- Attachment #2: Type: text/html, Size: 6784 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-31 15:05 ` Simon Eugster
@ 2025-01-31 15:09 ` Quentin Schulz
2025-01-31 15:16 ` Simon Eugster
0 siblings, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2025-01-31 15:09 UTC (permalink / raw)
To: Simon Eugster; +Cc: docs
Hi Simon,
On 1/31/25 4:05 PM, Simon Eugster wrote:
> Hi Quentin,
>
> Ok, I see! That makes sense. So find found the grub.cfg file in the build
> directory at
> work/intel_corei7_64-poky-linux/IMAGENAME/1.0/IMAGENAME-1.0/grub_live.cfg
> and now it is on modified. So I ran the build again after changing the
> variable, and it was updated.
>
> Was this a valid test now? :)
>
It should indeed, and I now have more questions than I started with :)
Will try to find time to figure out what's going on on my own.
Thanks for testing!
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-31 15:09 ` Quentin Schulz
@ 2025-01-31 15:16 ` Simon Eugster
2025-02-06 9:39 ` Quentin Schulz
0 siblings, 1 reply; 10+ messages in thread
From: Simon Eugster @ 2025-01-31 15:16 UTC (permalink / raw)
To: Quentin Schulz; +Cc: docs
[-- Attachment #1: Type: text/plain, Size: 972 bytes --]
Hi Quentin,
On Fri, Jan 31, 2025 at 4:09 PM Quentin Schulz <quentin.schulz@cherry.de>
wrote:
> Hi Simon,
>
> On 1/31/25 4:05 PM, Simon Eugster wrote:
> > Hi Quentin,
> >
> > Ok, I see! That makes sense. So find found the grub.cfg file in the build
> > directory at
> > work/intel_corei7_64-poky-linux/IMAGENAME/1.0/IMAGENAME-1.0/grub_live.cfg
> > and now it is on modified. So I ran the build again after changing the
> > variable, and it was updated.
> >
> > Was this a valid test now? :)
> >
>
> It should indeed, and I now have more questions than I started with :)
>
> Will try to find time to figure out what's going on on my own.
>
Let me know if I can test something else on my side too.
Also, I have added GRUB_TITLE to grub-bootconf.bb if that is relevant for
your case:
do_configure[vardeps] += "APPEND ROOT GRUB_TITLE"
(Thinking about it, INITRD should probably also be in this list, right?
Have a good week-end!
Simon
[-- Attachment #2: Type: text/html, Size: 1802 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [docs] [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE
2025-01-31 15:16 ` Simon Eugster
@ 2025-02-06 9:39 ` Quentin Schulz
0 siblings, 0 replies; 10+ messages in thread
From: Quentin Schulz @ 2025-02-06 9:39 UTC (permalink / raw)
To: Simon Eugster; +Cc: docs
Hi Simon,
On 1/31/25 4:16 PM, Simon Eugster wrote:
> Hi Quentin,
>
> On Fri, Jan 31, 2025 at 4:09 PM Quentin Schulz <quentin.schulz@cherry.de>
> wrote:
>
>> Hi Simon,
>>
>> On 1/31/25 4:05 PM, Simon Eugster wrote:
>>> Hi Quentin,
>>>
>>> Ok, I see! That makes sense. So find found the grub.cfg file in the build
>>> directory at
>>> work/intel_corei7_64-poky-linux/IMAGENAME/1.0/IMAGENAME-1.0/grub_live.cfg
>>> and now it is on modified. So I ran the build again after changing the
>>> variable, and it was updated.
>>>
>>> Was this a valid test now? :)
>>>
>>
>> It should indeed, and I now have more questions than I started with :)
>>
>> Will try to find time to figure out what's going on on my own.
>>
>
> Let me know if I can test something else on my side too.
If I could have instructions on how to prepare such an image, then it
would save me the time to look on how to do this (I never build for x86
and I've never done anything with grub/EFI).
Vanilla poky I guess, with which image, MACHINE and DISTRO? Anything to
add to the image or local.conf?
That way I can start a build while working on something else :)
> Also, I have added GRUB_TITLE to grub-bootconf.bb if that is relevant for
> your case:
>
> do_configure[vardeps] += "APPEND ROOT GRUB_TITLE"
>
> (Thinking about it, INITRD should probably also be in this list, right?
>
Wondering if we shouldn't have a variable that stores all variables to
add in a recipe's task[vardeps] when they are running build_efi_cfg.
Cheers,
Quentin
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-02-06 9:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 10:23 [PATCH v3] ref-manual: Describe grub-efi-cfg overrides and GRUB_TITLE Simon A. Eugster
2025-01-29 10:06 ` Antonin Godard
2025-01-31 12:13 ` Simon Eugster
2025-01-30 15:57 ` [docs] " Quentin Schulz
2025-01-31 14:26 ` Simon Eugster
2025-01-31 14:34 ` Quentin Schulz
2025-01-31 15:05 ` Simon Eugster
2025-01-31 15:09 ` Quentin Schulz
2025-01-31 15:16 ` Simon Eugster
2025-02-06 9:39 ` Quentin Schulz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox