[PATCH v2] Track explicit module dependencies in Makefile.core.def

2024-02-28 Thread Oliver Steffen
Make use of this new keyword in the bli module definition. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- v2: - fix out-of-source builds .gitignore | 1 - conf/Makefile.common| 1 + gentpl.py | 7 +++ grub-core/Makefile.am | 9

Re: [PATCH] build: Include grub-core/extra_deps.lst in dist

2024-02-22 Thread Oliver Steffen
gt; Fixes: 154dcb1ae (build: Allow explicit module dependencies) > > > > Signed-off-by: Oskari Pirhonen > > Reviewed-by: Daniel Kiper > > Daniel > I had assumed that this went in already. I think this is OK if we want the simple solution. For

[RFC PATCH] Track explicit module dependencies in Makefile.core.def

2024-02-22 Thread Oliver Steffen
Make use of this new keyword in the bli module definition. Signed-off-by: Oliver Steffen --- .gitignore | 1 - conf/Makefile.common| 1 + gentpl.py | 7 +++ grub-core/Makefile.am | 7 +-- grub-core/Makefile.core.def | 1 + grub-core/extra_dep

Re: [PATCH] build: Include grub-core/extra_deps.lst in dist

2023-12-21 Thread Oliver Steffen
Quoting Olaf Hering (2023-12-21 11:50:49) > Thu, 21 Dec 2023 02:42:46 -0800 Oliver Steffen : > > > Although its name suggests that it is a generated file (.lst ending!), > > extra_deps.lst is actually tracked in git and is not generated by the > > build system. > > I

Re: [PATCH] build: Include grub-core/extra_deps.lst in dist

2023-12-21 Thread Oliver Steffen
Quoting Oskari Pirhonen (2023-12-21 08:17:35) > Fixes build failure due to the extra_deps.lst file not existing in the > tarball. Found while trying to package GRUB 2.12 for Gentoo. > > make[3]: *** No rule to make target >

Re: [PATCH] build: Include grub-core/extra_deps.lst in dist

2023-12-21 Thread Oliver Steffen
Quoting Olaf Hering (2023-12-21 10:12:24) > Thu, 21 Dec 2023 01:17:35 -0600 Oskari Pirhonen : > > > Fixes build failure due to the extra_deps.lst file not existing in the > > tarball. > > Maybe maybe maybe this is another slight hint that this file needs to be > generated at build time, like all

Re: [PATCH v3 1/3] Allow explicit module dependencies

2023-12-11 Thread Oliver Steffen
Quoting Julian Andres Klode (2023-12-08 18:29:52) > On Fri, Dec 08, 2023 at 01:20:37PM +0100, Daniel Kiper wrote: > > On Wed, Dec 06, 2023 at 05:39:53PM +0100, Daniel Kiper wrote: > > > On Wed, Dec 06, 2023 at 04:39:29PM +0100, Olaf Hering wrote: > > > > Wed, 6 Dec 2023 16:24:53 +0100 Daniel Kiper

Re: [PATCH] grub-core/Makefile.am: Make path to extra_deps.lst relative to $(top_srcdir)/grub-core

2023-12-11 Thread Oliver Steffen
Quoting Mate Kukri (2023-12-08 18:20:12) > 154dcb1aea9f8fc42b2bce98bebed004d7783a7d broke out of tree builds by > introducing the extra_deps.lst file into the source tree but referencing > it just by name in grub-core/Makefile.am. > > Signed-off-by: Mate Kukri > --- > grub-core/Makefile.am | 4

[PATCH v3 2/3] bli: Add explicit dependency on the part_gpt module

2023-11-16 Thread Oliver Steffen
oot Loader Interface specification, which bli aims to implement, requires GPT formatted drives. The bli module ignores all other partition formats. Signed-off-by: Oliver Steffen --- grub-core/extra_deps.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/extra_deps.lst b/grub-core/extr

[PATCH v3 1/3] Allow explicit module dependencies

2023-11-16 Thread Oliver Steffen
are set to be ignored by git, add an exception for extra_deps.lst. Additionally, introduce a new keyword for the syminfo.lst syntax: "depends" allows specifying a module dependency directly: depends ... Signed-off-by: Oliver Steffen --- .gitignore | 1 + grub-core/M

[PATCH v3 0/3] Bli: fix hidden module dependency

2023-11-16 Thread Oliver Steffen
rub-devel/2023-11/msg00077.html [2] https://mail.gnu.org/archive/html/grub-devel/2023-11/msg00096.html Oliver Steffen (3): Allow explicit module dependencies bli: Add explicit dependency on the part_gpt module bli: Improve documentation .gitignore | 1 + docs/grub.texi |

[PATCH v3 3/3] bli: Improve documentation

2023-11-16 Thread Oliver Steffen
Improve the documentation of the bli module, explain in more detail what it does. Make clear that GPT formatted drives are expected and other partition formats are ignored. Also reorder and reword this section a bit. Signed-off-by: Oliver Steffen --- docs/grub.texi | 17 + 1

[PATCH v2 0/3] Bli: fix hidden module dependency

2023-11-15 Thread Oliver Steffen
explicit_dependencies.lst -> extra_deps.lst - explain what bli does/why it needs part_gpt in the commit message - and in the module documentation as well. [1] https://mail.gnu.org/archive/html/grub-devel/2023-11/msg00077.html Oliver Steffen (3): Allow explicit module dependencies bli:

[PATCH v2 1/3] Allow explicit module dependencies

2023-11-15 Thread Oliver Steffen
, introduce a new keyword for the syminfo.lst syntax: "depends" allows specifying a module dependency directly: depends ... Signed-off-by: Oliver Steffen --- grub-core/Makefile.am| 4 ++-- grub-core/extra_deps.lst | 0 grub-core/genmoddep.awk | 4 3 files changed, 6 insert

[PATCH v2 3/3] bli: Improve documentation

2023-11-15 Thread Oliver Steffen
Improve the documentation of the bli module, explain in more detail what it does. Make clear that GPT formatted drives are expected and other partition formats are ignored. Also reorder and reword this section a bit. Signed-off-by: Oliver Steffen --- docs/grub.texi | 17 + 1

[PATCH v2 2/3] bli: Add explicit dependency on the part_gpt module

2023-11-15 Thread Oliver Steffen
oot Loader Interface specification, which bli aims to implement, requires GPT formatted drives. The bli module ignores all other partition formats. Signed-off-by: Oliver Steffen --- grub-core/extra_deps.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/extra_deps.lst b/grub-core/extr

Re: [PATCH 0/2] Bli: fix hidden module dependency

2023-11-15 Thread Oliver Steffen
Quoting Daniel Kiper (2023-11-15 15:14:50) > On Wed, Nov 15, 2023 at 03:12:44AM -0800, Oliver Steffen wrote: > > Quoting Vladimir 'phcoder' Serbinenko (2023-11-14 19:21:49) > > > In general series looks good. Few comments: > > > * I'm unsure about the name. It seems

Re: [PATCH 0/2] Bli: fix hidden module dependency

2023-11-15 Thread Oliver Steffen
is not GPT or otherwise not reachable, then it does not set the corresponding EFI variable, but c > Le mar. 14 nov. 2023, 17:45, Oliver Steffen a écrit : > > The bli module has a hidden/implicit dependency on the part_gpt module. > The part_gpt module has to be loaded before the b

[PATCH 1/2] Allow explicit module dependencies

2023-11-14 Thread Oliver Steffen
. Additionally, introduce a new keyword for the syminfo.lst syntax: "depends" allows specifying a module dependency directly: depends ... Signed-off-by: Oliver Steffen --- grub-core/Makefile.am | 4 ++-- grub-core/explicit_dependencies.lst | 0 grub-core/genmoddep.awk

[PATCH 0/2] Bli: fix hidden module dependency

2023-11-14 Thread Oliver Steffen
to parse GPT formatted disks. This series introduces a mechanism that allows specifying module dependencies explicitly in a new file called explicit_dependencies.lst. An explicit dependency is then added for the bli module on the part_gpt module. Oliver Steffen (2): Allow explicit module

[PATCH 2/2] bli: Add explicit dependency on the part_gpt module

2023-11-14 Thread Oliver Steffen
ed is also important: part_gpt needs to be loaded before the bli module. To solve this, track this dependency explicitly. Signed-off-by: Oliver Steffen --- grub-core/explicit_dependencies.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/explicit_dependencies.lst b

Re: Module dependencies

2023-10-19 Thread Oliver Steffen
to get the partition UUID of the ESP. Adding this dummy call to bli.c causes part_gpt to appear as a dependency: (void) grub_gpt_partition_map_iterate (NULL, NULL, NULL); Thanks, I understand the problem now. Oliver > > On 4 Oct 2023, at 8:31 pm, Oliver Steffen wrote: > > > &

[PATCH 4/4] guid: un-unifiy GUID types

2023-10-05 Thread Oliver Steffen
Signed-off-by: Oliver Steffen --- grub-core/commands/acpi.c| 4 +- grub-core/commands/bli.c | 2 +- grub-core/commands/efi/efifwsetup.c | 4 +- grub-core/commands/efi/loadbios.c| 14 +++--- grub-core/commands/efi/lsefi.c | 4 +- grub-core/commands/efi/lsefisys

[PATCH 0/4] Revert unified GUID struct

2023-10-05 Thread Oliver Steffen
.html [5] https://mail.gnu.org/archive/html/grub-devel/2023-08/msg00030.html [6] https://mail.gnu.org/archive/html/grub-devel/2023-09/msg00093.html [7] https://mail.gnu.org/archive/html/grub-devel/2023-10/msg0.html Oliver Steffen (4): bli: don't use %pG format specifier Revert "guid: Mak

[PATCH 3/4] Revert "kern/misc: Add a format specifier GUIDs"

2023-10-05 Thread Oliver Steffen
This reverts commit f82dbf2bd871e9cce327b511a393ffa543d7f69e. Signed-off-by: Oliver Steffen --- grub-core/kern/misc.c | 81 +++ 1 file changed, 21 insertions(+), 60 deletions(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index b57249acb

[PATCH 1/4] bli: don't use %pG format specifier

2023-10-05 Thread Oliver Steffen
We are about to revert the unified GUID type and it's printf format specifier, so do use the explicit printf statement for the partition UUID here instread. Signed-off-by: Oliver Steffen --- grub-core/commands/bli.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[PATCH 2/4] Revert "guid: Make use of GUID printf format specifier"

2023-10-05 Thread Oliver Steffen
This reverts commit 6ad116e5ff459ae06eb993d386da5e7589242667. Signed-off-by: Oliver Steffen --- grub-core/commands/efi/lsefi.c | 13 - grub-core/commands/efi/lsefisystab.c | 6 +- grub-core/commands/probe.c | 12 grub-core/kern/efi/efi.c

Re: [PATCH v9 02/11] Unify GUID types

2023-10-05 Thread Oliver Steffen
on GUIDs after the release. Oliver Quoting Oliver Steffen (2023-09-13 13:48:21) > On Wed, Sep 13, 2023 at 1:43 PM Ard Biesheuvel wrote: > > > > On Wed, 13 Sept 2023 at 13:42, Vladimir 'phcoder' Serbinenko > > wrote: > > > > > > > > > > > &

Module dependencies

2023-10-04 Thread Oliver Steffen
Hi, Is there a way to specify dependencies for a module? As in a list of other modules that need to be loaded before? I found a macro named GRUB_MOD_DEP in dh.h, but when I use it in the module's .c file I get errors about a missing .moddeps section. It also does not seem to be in use anywhere.

Re: bli module inclusion gives me just black screen on real hardware

2023-10-04 Thread Oliver Steffen
Quoting Oliver Steffen (2023-10-02 10:28:08) > On Sun, Oct 1, 2023 at 4:08 PM Tobias Powalowski > wrote: > > > > Am 27.09.23 um 09:43 schrieb Oliver Steffen: > > > Quoting Daniel Kiper (2023-09-26 17:57:05) > > >> On Sat, Aug 12, 2023 at 03:01:19PM +0200, T

Re: bli module inclusion gives me just black screen on real hardware

2023-10-02 Thread Oliver Steffen
On Mon, Oct 2, 2023 at 6:54 AM Tobias Powalowski wrote: > > Am 27.09.23 um 09:43 schrieb Oliver Steffen: > > Quoting Daniel Kiper (2023-09-26 17:57:05) > >> On Sat, Aug 12, 2023 at 03:01:19PM +0200, Tobias Powalowski via Grub-devel > >> wrote: > >>> A

Re: bli module inclusion gives me just black screen on real hardware

2023-10-02 Thread Oliver Steffen
On Sun, Oct 1, 2023 at 4:08 PM Tobias Powalowski wrote: > > Am 27.09.23 um 09:43 schrieb Oliver Steffen: > > Quoting Daniel Kiper (2023-09-26 17:57:05) > >> On Sat, Aug 12, 2023 at 03:01:19PM +0200, Tobias Powalowski via Grub-devel > >> wrote: > >>> A

Re: bli module inclusion gives me just black screen on real hardware

2023-09-27 Thread Oliver Steffen
Quoting Daniel Kiper (2023-09-26 17:57:05) > On Sat, Aug 12, 2023 at 03:01:19PM +0200, Tobias Powalowski via Grub-devel > wrote: > > Am 12.08.23 um 14:52 schrieb Oliver Steffen: > > > Quoting Daniel Kiper (2023-08-11 18:13:57) > > > > Hi, > > > > >

Re: [PATCH v9 02/11] Unify GUID types

2023-09-13 Thread Oliver Steffen
On Wed, Sep 13, 2023 at 12:20 PM John Paul Adrian Glaubitz wrote: > > Hi Oliver! > > On Wed, 2023-09-13 at 12:14 +0200, Oliver Steffen wrote: > > On Wed, Sep 13, 2023 at 6:10 AM Pedro Miguel Justo wrote: > > > > > > > > > I can confirm that,

Re: [PATCH v9 02/11] Unify GUID types

2023-09-13 Thread Oliver Steffen
Paul Adrian Glaubitz > >> wrote: > >> > > >> > Hi Oliver! > >> > > >> > On Wed, 2023-09-13 at 12:14 +0200, Oliver Steffen wrote: > >> > > On Wed, Sep 13, 2023 at 6:10 AM Pedro Miguel Justo > >> > > wrote: &g

Re: [PATCH v9 02/11] Unify GUID types

2023-09-13 Thread Oliver Steffen
On Wed, Sep 13, 2023 at 6:10 AM Pedro Miguel Justo wrote: > > > I can confirm that, taking [1][2] and making [3] on top of it, my > Montvale-based rx2660 machine still boots fine. Wonderful! Thanks for testing! Oliver > > [1] - https://github.com/phcoder/GRUB.git > [2] - cfa21b94e > [3] : > >

Re: [PATCH v9 02/11] Unify GUID types

2023-08-25 Thread Oliver Steffen
Quoting Vladimir 'phcoder' Serbinenko (2023-08-15 18:14:11) > > > Le mar. 15 août 2023, 14:00, Laszlo Ersek <[1]ler...@redhat.com> a écrit : > > On 8/15/23 10:17, Ard Biesheuvel wrote: > > On Tue, 15 Aug 2023 at 05:42, Vladimir 'phcoder' Serbinenko > > <[2]phco...@gmail.com> wrote: >

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Oliver Steffen
glaub...@physik.fu-berlin.de> wrote: > > > > Hi Daniel! > > > > On Fri, 2023-08-11 at 17:31 +0200, Daniel Kiper wrote: > >> On Fri, Aug 11, 2023 at 04:10:14AM -0700, Oliver Steffen wrote: > >>> Quoting Jo

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Oliver Steffen
l.com> a écrit : > > > > Le dim. 13 août 2023, 00:57, Pedro Miguel Justo <[6] > pm...@texair.net> a écrit : > > > > > On Aug 12, 2023, at 11:04, John Paul Adrian Glaubitz > <[7] > glaub

Re: bli module inclusion gives me just black screen on real hardware

2023-08-12 Thread Oliver Steffen
erruptible just after the line loading the bli module. This is to keep the messages visible for a moment before the menu clears the screen (should it get to there). This might give us a hint where it goes wrong. From cda95baaf0a3c0f277a5e37aff399574627b2263 Mon Sep 17 00:00:00 2001 From: Oliver St

Re: [PATCH v9 02/11] Unify GUID types

2023-08-11 Thread Oliver Steffen
Quoting John Paul Adrian Glaubitz (2023-08-11 10:32:17) > Hi Oliver! > > On Fri, 2023-05-26 at 13:35 +0200, Oliver Steffen wrote: > > There are 3 implementations of a GUID in Grub. Replace them with a > > common one, placed in types.h. > > > > It uses the &q

Re: [PATCH] util/grub.d/25_bli.in: fix shebang on unmerged-usr

2023-07-14 Thread Oliver Steffen
li.in > > > index 6e4538716..26e27a019 100644 > > > --- a/util/grub.d/25_bli.in > > > +++ b/util/grub.d/25_bli.in > > > @@ -1,4 +1,4 @@ > > > -#!/usr/bin/sh > > > +#! /bin/sh > > > set -e > > > > > > # grub-mkconfig helper scri

[PATCH v9 02/11] Unify GUID types

2023-05-26 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-cor

[PATCH v9 06/11] kern/misc, kern/efi: Extract UTF-8 to UTF-16 code

2023-05-26 Thread Oliver Steffen
, because it needs to be reachable from the kern/efi code. Add a check for integer overflow and remove redundant NUL-termination. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 21 ++--- grub-core/kern/misc.c| 32

[PATCH v9 04/11] grub-core: Make use of guid printf format specifier

2023-05-26 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command (missing 4th dash). Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi

[PATCH v9 10/11] Add a module for the Boot Loader Interface

2023-05-26 Thread Oliver Steffen
be the bli module there. [0] https://systemd.io/BOOT_LOADER_INTERFACE/ [1] https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html [2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Signed-off-by: Oliver Steffen --- docs

[PATCH v9 05/11] types.h: Add GRUB_SSIZE_MAX

2023-05-26 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h

[PATCH v9 00/11] Add basic Boot Loader Interface support

2023-05-26 Thread Oliver Steffen
Added config drop-in file that loads the module on EFI v1: - https://mail.gnu.org/archive/html/grub-devel/2023-01/msg00104.html Oliver Steffen (11): efi: Add grub_efi_set_variable_with_attributes() Unify GUID types kern/misc: Add a format specifier GUIDs grub-core: Make use of guid

[PATCH v9 11/11] util/grub.d: Activate bli module on EFI

2023-05-26 Thread Oliver Steffen
Add a new configuration drop-in file that loads the bli module and runs the command if booting on the EFI platform. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- Makefile.util.def | 6 ++ util/grub.d/25_bli.in | 24 2 files changed, 30 insertions

[PATCH v9 08/11] docs: Reword section headings

2023-05-26 Thread Oliver Steffen
Reword some section headings, remove "The List of" from titles. While grammatically correct, this phrase can be omitted to increase readability, especially in the table of contents. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- docs/grub.texi | 20 ++

[PATCH v9 09/11] kern: check for NULL when closing devices and disks

2023-05-26 Thread Oliver Steffen
Add checks for NULL pointers to grub_device_close() and grub_disk_close() to make these functions more robust. Signed-off-by: Oliver Steffen --- grub-core/kern/device.c | 3 +++ grub-core/kern/disk.c | 4 2 files changed, 7 insertions(+) diff --git a/grub-core/kern/device.c b/grub-core

[PATCH v9 03/11] kern/misc: Add a format specifier GUIDs

2023-05-26 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). Signed-off-by: Oliver

[PATCH v9 01/11] efi: Add grub_efi_set_variable_with_attributes()

2023-05-26 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 20 +--- include/grub/efi/efi.h

[PATCH v9 07/11] efi: Add grub_efi_set_variable_to_string()

2023-05-26 Thread Oliver Steffen
Add a function that sets an EFI variable to a string value. The string is converted from UTF-8 to UTF-16. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 22 ++ include/grub/efi/efi.h | 3 +++ 2 files changed, 25 insertions(+) diff

[PATCH v8 02/10] Unify GUID types

2023-05-24 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-cor

[PATCH v8 01/10] efi: Add grub_efi_set_variable_with_attributes()

2023-05-24 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 19 +-- include/grub/efi/efi.h

[PATCH v8 05/10] types.h: Add GRUB_SSIZE_MAX

2023-05-24 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h

[PATCH v8 08/10] docs: Reword section headings

2023-05-24 Thread Oliver Steffen
Reword some section headings, remove "The List of" from titles. While grammatically correct, this phrase can be omitted to increase readability, especially in the table of contents. Signed-off-by: Oliver Steffen --- docs/grub.texi | 20 ++-- 1 file changed, 10 inserti

[PATCH v8 09/10] Add a module for the Boot Loader Interface

2023-05-24 Thread Oliver Steffen
be the bli module there. [0] https://systemd.io/BOOT_LOADER_INTERFACE/ [1] https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html [2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Signed-off-by: Oliver Steffen --- docs

[PATCH v8 07/10] efi: Add grub_efi_set_variable_to_string()

2023-05-24 Thread Oliver Steffen
Add a function that sets an EFI variable to a string value. The string is converted from UTF-8 to UTF-16. Signed-off-by: Oliver Steffen --- grub-core/kern/efi/efi.c | 22 ++ include/grub/efi/efi.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/grub-core/kern/efi

[PATCH v8 10/10] util/grub.d: Activate bli module on EFI

2023-05-24 Thread Oliver Steffen
Add a new configuration drop-in file that loads the bli module and runs the command if booting on the EFI platform. Signed-off-by: Oliver Steffen --- Makefile.util.def | 6 ++ util/grub.d/25_bli.in | 24 2 files changed, 30 insertions(+) create mode 100644

[PATCH v8 00/10] Add basic Boot Loader Interface support

2023-05-24 Thread Oliver Steffen
ml/grub-devel/2023-02/msg00099.html - Addressed comments from Daniel - Added a print function for gpt guids` - Added integer overflow check in UTF16 conversion - Added config drop-in file that loads the module on EFI v1: - https://mail.gnu.org/archive/html/grub-devel/2023-01/msg00104.html Olive

[PATCH v8 03/10] kern/misc: Add a format specifier GUIDs

2023-05-24 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). Signed-off-by: Oliver

[PATCH v8 06/10] kern/misc, kern/efi: Extract UTF-8 to UTF-16 code

2023-05-24 Thread Oliver Steffen
, because it needs to be reachable from the kern/efi code. Add a check for integer overflow and remove redundant NUL-termination. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 21 ++--- grub-core/kern/misc.c| 32

[PATCH v8 04/10] grub-core: Make use of guid printf format specifier

2023-05-24 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command (missing 4th dash). Signed-off-by: Oliver Steffen --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi/lsefisystab.c | 6 +- grub-core

Re: [PATCH v7 00/10] Add basic Boot Loader Interface support

2023-05-24 Thread Oliver Steffen
Quoting Daniel Kiper (2023-05-19 16:19:28) > On Wed, May 03, 2023 at 03:50:09PM +0200, Oliver Steffen wrote: > > This is a step towards supporting unified kernel images (UKI) in Grub. [...] > Sadly there are still some problems with this patch set... :-( Sorry about that... > Firs

[PATCH v7 04/10] grub-core: Make use of guid printf format specifier

2023-05-03 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi/lsefisystab.c | 6 +- grub

[PATCH v7 07/10] efi: Add grub_efi_set_variable_to_string()

2023-05-03 Thread Oliver Steffen
Add a function that sets an EFI variable to a string value. The string is converted from UTF-8 to UTF-16. Signed-off-by: Oliver Steffen --- grub-core/kern/efi/efi.c | 22 ++ include/grub/efi/efi.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/grub-core/kern/efi

[PATCH v7 06/10] kern/misc, kern/efi: Extract UTF-8 to UTF-16 code

2023-05-03 Thread Oliver Steffen
, because it needs to be reachable from the kern/efi code. Add a check for integer overflow and remove redundant NUL-termination. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 21 ++--- grub-core/kern/misc.c| 32

[PATCH v7 09/10] Add a module for the Boot Loader Interface

2023-05-03 Thread Oliver Steffen
be the bli module there. [0] https://systemd.io/BOOT_LOADER_INTERFACE/ [1] https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html [2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Signed-off-by: Oliver Steffen --- docs

[PATCH v7 08/10] docs: Reword section headings

2023-05-03 Thread Oliver Steffen
Reword some section headings, remove "The List of" from titles. While grammatically correct, this phrase can be omitted to increase readability, especially in the table of contents. Signed-off-by: Oliver Steffen --- docs/grub.texi | 20 ++-- 1 file changed, 10 inserti

[PATCH v7 03/10] kern/misc: Add a format specifier GUIDs

2023-05-03 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). Signed-off-by: Oliver

[PATCH v7 01/10] efi: Add grub_efi_set_variable_with_attributes()

2023-05-03 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 19 +-- include/grub/efi/efi.h

[PATCH v7 10/10] util/grub.d: Activate bli module on EFI

2023-05-03 Thread Oliver Steffen
Add a new configuration drop-in file that loads the bli module and runs the command if booting on the EFI platform. Signed-off-by: Oliver Steffen --- Makefile.util.def | 6 ++ util/grub.d/25_bli.in | 24 2 files changed, 30 insertions(+) create mode 100644

[PATCH v7 00/10] Add basic Boot Loader Interface support

2023-05-03 Thread Oliver Steffen
3-01/msg00104.html Oliver Steffen (10): efi: Add grub_efi_set_variable_with_attributes() Unify GUID types kern/misc: Add a format specifier GUIDs grub-core: Make use of guid printf format specifier types.h: Add GRUB_SSIZE_MAX kern/misc, kern/efi: Extract UTF-8 to UTF-16 co

[PATCH v7 02/10] Unify GUID types

2023-05-03 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-cor

[PATCH v7 05/10] types.h: Add GRUB_SSIZE_MAX

2023-05-03 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h

Re: Installed Fedora 38 (sway) / grub2 on a new HD - boots OK but does not have a menuentry item in grub.cfg ?

2023-05-03 Thread Oliver Steffen
Hi Phil, Quoting Philip Rhoades via Grub-devel (2023-04-22 07:37:45) > People, > > My Fedora WS has 4 drive bays and I access old boot and other HDs in > bays 2-4. I just did a clean install of Fedora Sway to /dev/sda - > everything is fine and the system boots OK but I am confused: > > - cat

Re: [PATCH v5 8/8] util/grub.d: Activate bli module on EFI

2023-04-14 Thread Oliver Steffen
On Fri, Apr 14, 2023 at 4:01 PM Daniel Kiper wrote: > On Tue, Apr 11, 2023 at 05:51:42PM +0200, Oliver Steffen wrote: > > On Tue, Apr 11, 2023 at 4:10 PM Oliver Steffen > wrote: > > On Wed, Apr 5, 2023 at 5:57 PM Daniel Kiper > > wrote: > >

[PATCH v6 8/9] Add a module for the Boot Loader Interface

2023-04-14 Thread Oliver Steffen
/software/systemd/man/systemd-gpt-auto-generator.html [2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Signed-off-by: Oliver Steffen --- grub-core/Makefile.core.def | 6 ++ grub-core/commands/bli.c| 122 include/grub

[PATCH v6 3/9] kern/misc: Add a format specifier GUIDs

2023-04-14 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). Signed-off-by: Oliver

[PATCH v6 7/9] efi: Add grub_efi_set_variable_to_string()

2023-04-14 Thread Oliver Steffen
Add a function that sets an EFI variable to a string value. The string is converted from UTF-8 to UTF-16. Signed-off-by: Oliver Steffen --- grub-core/kern/efi/efi.c | 22 ++ include/grub/efi/efi.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/grub-core/kern/efi

[PATCH v6 2/9] Unify GUID types

2023-04-14 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-cor

[PATCH v6 4/9] grub-core: Make use of guid printf format specifier

2023-04-14 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi/lsefisystab.c | 6 +- grub

[PATCH v6 9/9] util/grub.d: Activate bli module on EFI

2023-04-14 Thread Oliver Steffen
Add a new configuration drop-in file that loads the bli module and runs the command if booting on the EFI platform. Signed-off-by: Oliver Steffen --- Makefile.util.def | 6 ++ util/grub.d/25_bli.in | 24 2 files changed, 30 insertions(+) create mode 100644

[PATCH v6 0/9] Add basic Boot Loader Interface support

2023-04-14 Thread Oliver Steffen
ile that loads the module on EFI v1: - https://mail.gnu.org/archive/html/grub-devel/2023-01/msg00104.html Oliver Steffen (9): efi: Add grub_efi_set_variable_with_attributes() Unify GUID types kern/misc: Add a format specifier GUIDs grub-core: Make use of guid printf format specifier types.h:

[PATCH v6 1/9] efi: Add grub_efi_set_variable_with_attributes()

2023-04-14 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 19 +-- include/grub/efi/efi.h

[PATCH v6 5/9] types.h: Add GRUB_SSIZE_MAX

2023-04-14 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h

[PATCH v6 6/9] kern/misc, kern/efi: Extract UTF-8 to UTF-16 code

2023-04-14 Thread Oliver Steffen
, because it needs to be reachable from the kern/efi code. Add a check for integer overflow and remove redundant NUL-termination. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 21 ++--- grub-core/kern/misc.c| 32

Re: [PATCH v5 8/8] util/grub.d: Activate bli module on EFI

2023-04-11 Thread Oliver Steffen
On Tue, Apr 11, 2023 at 4:10 PM Oliver Steffen wrote: > On Wed, Apr 5, 2023 at 5:57 PM Daniel Kiper wrote: > >> On Thu, Mar 30, 2023 at 01:18:13PM +0200, Oliver Steffen wrote: >> > Add a new configuration drop-in file that loads the bli module and runs >> > the

Re: [PATCH v5 8/8] util/grub.d: Activate bli module on EFI

2023-04-11 Thread Oliver Steffen
On Wed, Apr 5, 2023 at 5:57 PM Daniel Kiper wrote: > On Thu, Mar 30, 2023 at 01:18:13PM +0200, Oliver Steffen wrote: > > Add a new configuration drop-in file that loads the bli module and runs > > the command if booting on the EFI platform. > > > > Si

[PATCH v5 6/8] kern/misc, kern/efi: Extract UTF-8 to UTF-16 code

2023-03-30 Thread Oliver Steffen
, because it needs to be reachable from the kern/efi code. Add a check for integer overflow and remove redundant NUL-termination. Signed-off-by: Oliver Steffen --- grub-core/kern/efi/efi.c | 21 ++--- grub-core/kern/misc.c| 32 include/grub/misc.h

[PATCH v5 3/8] kern/misc: Add a format specifier GUIDs.

2023-03-30 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). Signed-off-by: Oliver

[PATCH v5 7/8] Add a module for the Boot Loader Interface

2023-03-30 Thread Oliver Steffen
] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/ Signed-off-by: Oliver Steffen --- docs/grub.texi | 22 + grub-core/Makefile.core.def | 6 ++ grub-core/commands/bli.c| 166 include/grub/efi/api.h

[PATCH v5 2/8] Unify GUID types

2023-03-30 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen --- grub-core/commands/acpi.c|

[PATCH v5 4/8] grub-core: Make use of guid printf format specifier

2023-03-30 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi/lsefisystab.c | 6 +- grub

[PATCH v5 5/8] types.h: Add GRUB_SSIZE_MAX

2023-03-30 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h

[PATCH v5 8/8] util/grub.d: Activate bli module on EFI

2023-03-30 Thread Oliver Steffen
Add a new configuration drop-in file that loads the bli module and runs the command if booting on the EFI platform. Signed-off-by: Oliver Steffen --- Makefile.util.def | 6 ++ util/grub.d/25_bli.in | 25 + 2 files changed, 31 insertions(+) create mode 100644

[PATCH v5 0/8] Add basic Boot Loader Interface support

2023-03-30 Thread Oliver Steffen
ids` - Added integer overflow check in UTF16 conversion - Added config drop-in file that loads the module on EFI v1: - https://mail.gnu.org/archive/html/grub-devel/2023-01/msg00104.html Oliver Steffen (8): efi: Add grub_efi_set_variable_with_attributes Unify GUID types kern/misc: Add a format specif

[PATCH v5 1/8] efi: Add grub_efi_set_variable_with_attributes

2023-03-30 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 19 +-- include/grub/efi/efi.h

  1   2   >