RE: [External] : Re: [PATCH] Allow background to be set when theme is set

2024-11-05 Thread Alec Brown via Grub-devel
Hey, So a few suggestions. You should use git send-email to send your patch. This will format the patch nicely and make it easier to apply your patch to the rest of the GRUB code. Also, when sending an update of your patch, instead of replying to the initial patch, you should send a separate email

RE: [External] : [PATCH v3 8/8] i386: Add CRx, MMIO, MSR and extend CPUID definitions

2024-10-01 Thread Alec Brown via Grub-devel
On 9/22/24 1:18 PM, Sergii Dmytruk wrote: > From: Ross Philipson > > Control registers and flags: > - CR0 read/write and flags (PE, MP, EM, TS, PG, NE, WP, AM, NW, CD) > - CR4 read/write and flags (VME, PVI, TSD, DE, PSE, PAE, MCE, PGE, PCE, >FXSR, XMM, VMXE, SMXE, PCIDE) > - EFLAGS read/

[PATCH 0/3] Add commands to load BLS and UKI files

2025-02-14 Thread Alec Brown via Grub-devel
This patch set is introducing BootLoaderSpec support to upstream GRUB from Fedora GRUB. I've also added a uki command to load Unified Kernel Images since it shares similar code to loading BLS config files. Alec Brown Alec Brown (1): blsuki: Add uki command to load Unified Kernel Image entri

[PATCH v2 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-03-25 Thread Alec Brown via Grub-devel
A Unified Kernel Image is a single UEFI PE file that combines a UEFI boot stub, a Linux kernel image, an initrd, and further resources. The uki command will locate where the uki file is and create a GRUB menu entry to load it. Signed-off-by: Alec Brown --- docs/grub.texi | 26 +++

RE: [PATCH v2 2/3] blsuki: Check for mounted /boot in emu

2025-03-27 Thread Alec Brown via Grub-devel
On Tue, Mar 25, 2025 at 8:26 AM, Vladimir 'phcoder' Serbinenko wrote: > Le mar. 25 mars 2025, 10:15, Alec Brown a écrit : > >> Irritatingly, BLS defines paths relatives to the mountpoint of the >> filesystem which contains its snippets, not / or any other fixed >> location. So grub2-emu needs to

RE: [PATCH v2 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-03-27 Thread Alec Brown via Grub-devel
On Wed, Mar 26, 2025 at 5:43 AM, Vladimir 'phcoder' Serbinenko wrote: >> >> >> >> +#ifdef GRUB_MACHINE_EFI >> +#include >> +#include >> +#include >> +#endif >> + >> > Can UKI work without EFI? I think of scenario of putting e.g. EFI disk into > coreboot or BIOS machine. No UKI only works EFI

[PATCH v3 2/3] blsuki: Check for mounted /boot in emu

2025-04-11 Thread Alec Brown via Grub-devel
Irritatingly, BLS defines paths relatives to the mountpoint of the filesystem which contains its snippets, not / or any other fixed location. So grub2-emu needs to know whether /boot is a separate filesystem from / and conditionally prepend a path. Signed-off-by: Robbie Harwood Signed-off-by: Ale

[PATCH v3 0/3] Add commands to load BLS and UKI files

2025-04-11 Thread Alec Brown via Grub-devel
v3: - Added --enable-fallback option to check the default directory if the --path option isn't able to find entries. - Added the function blsuki_set_find_entry_info() to help set the path and device of BLS and UKI entries. - Removed grub_strchr uses in uki_read_osrel(). - Converted the st

[PATCH v3 1/3] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-04-11 Thread Alec Brown via Grub-devel
The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas Signed-off-by: Will Thompson Signed

[PATCH v3 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-04-11 Thread Alec Brown via Grub-devel
A Unified Kernel Image is a single UEFI PE file that combines a UEFI boot stub, a Linux kernel image, an initrd, and further resources. The uki command will locate where the uki file is and create a GRUB menu entry to load it. Signed-off-by: Alec Brown --- docs/grub.texi | 26 +++

RE: [PATCH v2 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-04-11 Thread Alec Brown via Grub-devel
On Tue, Apr 1, 2025 at 6:35 AM, Vladimir 'phcoder' Serbinenko wrote: > Le jeu. 27 mars 2025, 23:44, Alec Brown a écrit : > >> On Wed, Mar 26, 2025 at 5:43 AM, Vladimir 'phcoder' Serbinenko < >> phco...@gmail.com> wrote: >> >> >> >> >> >> >> >> +#ifdef GRUB_MACHINE_EFI >> >> +#include >> >> +#in

[PATCH 1/3] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-02-14 Thread Alec Brown via Grub-devel
The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas Signed-off-by: Will Thompson Signed

[PATCH 2/3] blsuki: Check for mounted /boot in emu

2025-02-14 Thread Alec Brown via Grub-devel
Irritatingly, BLS defines paths relatives to the mountpoint of the filesystem which contains its snippets, not / or any other fixed location. So grub2-emu needs to know whether /boot is a separate filesysem from / and conditionally prepend a path. Signed-off-by: Robbie Harwood Signed-off-by: Ale

[PATCH 3/3] blsuki: Add uki command to load Unified Kernel Image entries

2025-02-14 Thread Alec Brown via Grub-devel
A Unified Kernel Image is a single UEFI PE file that combines a UEFI boot stub, a Linux kernel image, an initrd, and further resources. The uki command will locate where the uki file is and create a GRUB menu entry to load it. Signed-off-by: Alec Brown --- docs/grub.texi | 26 ++ g

[PATCH v2 1/3] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-03-25 Thread Alec Brown via Grub-devel
The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas Signed-off-by: Will Thompson Signed

[PATCH v2 2/3] blsuki: Check for mounted /boot in emu

2025-03-25 Thread Alec Brown via Grub-devel
Irritatingly, BLS defines paths relatives to the mountpoint of the filesystem which contains its snippets, not / or any other fixed location. So grub2-emu needs to know whether /boot is a separate filesystem from / and conditionally prepend a path. Signed-off-by: Robbie Harwood Signed-off-by: Ale

[PATCH v2 0/3] Add commands to load BLS and UKI files

2025-03-25 Thread Alec Brown via Grub-devel
v2: - Improved function prefixes to indicate internal blsuki functions. - Added enums to indicate output from vercmp functions. - Separated bls and uki create_entry functions to improve readability. - Updated uki code to only store keyvals of necessary PE sections. - Fixed a bug where an extr

[PATCH v4 1/4] kern/vercmp: Add functionality to compare kernel versions

2025-05-21 Thread Alec Brown via Grub-devel
Add functionality to compare alpha and numeric version segments for kernels. This can be useful in sorting newer from older kernels. Signed-off-by: Alec Brown --- Makefile.util.def| 16 ++ grub-core/kern/vercmp.c | 316 +++ include/grub/vercmp.h|

[PATCH v4 2/4] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-05-21 Thread Alec Brown via Grub-devel
From: Peter Jones The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files. The BLS Specification: https://uapi-group.org/specifications/specs/boot_loader_specif

[PATCH v4 0/4] Add commands to load BLS and UKI files

2025-05-21 Thread Alec Brown via Grub-devel
v4: - Added comments to describe what most functions are trying to achieve in grub-core/commands/blsuki.c. - Moved vercmp.c code to it's own patch. - Moved all EMU support to the patch 3 (blsuki: Check for mounted /boot in emu) - Split up code in bls_create_entry() into multiple helper funct

[PATCH v4 4/4] blsuki: Add uki command to load Unified Kernel Image entries

2025-05-21 Thread Alec Brown via Grub-devel
A Unified Kernel Image is a single UEFI PE file that combines a UEFI boot stub, a Linux kernel image, an initrd, and further resources. The uki command will locate where the UKI file is and create a GRUB menu entry to load it. The Unified Kernel Image Specification: https://uapi-group.org/specific

[PATCH v4 3/4] blsuki: Check for mounted /boot in emu

2025-05-21 Thread Alec Brown via Grub-devel
From: Robbie Harwood Irritatingly, BLS defines paths relative to the mountpoint of the filesystem which contains its snippets, not / or any other fixed location. So grub2-emu needs to know whether /boot is a separate filesystem from / and conditionally prepend a path. Signed-off-by: Robbie Harwo

RE: [External] : Re: [PATCH v4 2/4] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-06-03 Thread Alec Brown via Grub-devel
On Thu, May 29, 2025 at 6:59 AM, Avnish Chouhan wrote: > On 2025-05-21 18:21, grub-devel-requ...@gnu.org wrote: [...] > > +static grub_err_t > > +blsuki_add_keyval (grub_blsuki_entry_t *entry, char *key, char *val) > > +{ > > + char *k, *v; > > + struct keyval **kvs, *kv; > > + grub_size_t si

[External] : Re: [PATCH v4 4/4] blsuki: Add uki command to load Unified Kernel Image entries

2025-06-03 Thread Alec Brown via Grub-devel
On Fri, May 30, 2025 at 2:47 AM, Avnish Chouhan wrote: > > Message: 1 > > Date: Wed, 21 May 2025 12:51:26 + > > From: Alec Brown > > To: grub-devel@gnu.org > > Cc: christopher.obb...@linaro.org, daniel.ki...@oracle.com, > > jan.setjeeil...@oracle.com, alec.r.br...@oracle.com, > > mate

[External] : Re: [PATCH v4 3/4] blsuki: Check for mounted /boot in emu

2025-06-03 Thread Alec Brown via Grub-devel
On Tue, June 3, 2025 at 5:04 AM, Avnish Chouhan wrote: > > Message: 1 > > Date: Wed, 21 May 2025 12:51:25 + > > From: Alec Brown > > To: grub-devel@gnu.org > > Cc: christopher.obb...@linaro.org, daniel.ki...@oracle.com, > > jan.setjeeil...@oracle.com, alec.r.br...@oracle.com, > > mate

RE: : Re: [PATCH v4 2/4] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-06-05 Thread Alec Brown via Grub-devel
On Thu, June 5, 2025 at 2:02 AM, Avnish Chouhan wrote: > On 2025-06-04 01:17, Alec Brown wrote: > > On Thu, May 29, 2025 at 6:59 AM, Avnish Chouhan > > wrote: > >> On 2025-05-21 18:21, grub-devel-requ...@gnu.org wrote: > [...] > >> > + while (*separator == ' ' || *separator == '\t'); > >> >

[PATCH 1/2] gnulib/regcomp: Fix resource leak

2025-06-10 Thread Alec Brown via Grub-devel
In the functions create_initial_state() and calc_eclosure_iter(), memory is allocated for the elems member of a re_node_set structure but that memory isn't freed on error. Before returning an error, a call to re_node_set_free() should be made to prevent the resource leak. This issue has been fixed

[PATCH 0/2] Fix resource leaks in gnulib

2025-06-10 Thread Alec Brown via Grub-devel
Coverity found a couple resource leaks in gnulib code that the GRUB is using. These fixes have been made in the latest version of gnulib and I've backported these changes to maintain consistency. This patch set fixes the following CIDs: CID: 473869 CID: 473887 CID: 473888 Alec Brown (2): gn

[PATCH 2/2] gnulib/regexec: Fix resource leak

2025-06-10 Thread Alec Brown via Grub-devel
In the function merge_state_with_log(), memory is allocated for the variable next_nodes when creating a union of the variables table_nodes and log_nodes. However, if next_state->entrance_nodes is NULL, then table_nodes becomes NULL and we still allocate memory to copy the content of log_nodes. This

[PATCH v5 2/5] blsuki: Add blscfg command to parse Boot Loader Specification snippets

2025-07-26 Thread Alec Brown via Grub-devel
From: Peter Jones The BootLoaderSpec (BLS) defines a scheme where different bootloaders can share a format for boot items and a configuration directory that accepts these common configurations as drop-in files. The BLS Specification: https://uapi-group.org/specifications/specs/boot_loader_specif

[PATCH v5 0/5] Add commands to load BLS and UKI files

2025-07-26 Thread Alec Brown via Grub-devel
v5: - Added grub_strtok() to the GRUB. - Removed vercmp patch and instead utilize filevercmp from gnulib. - Adjusted documentation to include GRUB specific features. - Removed environmental variables such as grub_env_get ("default_kernelopts"), grub_env_get ("early_initrd"), etc. - Added artifici

[PATCH v5 3/5] util/misc.c: Change offset type for grub_util_write_image_at()

2025-07-26 Thread Alec Brown via Grub-devel
Adding filevercmp support to grub-core/commands/blsuki.c from gnulib will cause issues with the type of the offset parameter for grub_util_write_image_at() for EMU builds. To fix this issue, we can change the type from off_t to grub_off_t. Signed-off-by: Alec Brown --- include/grub/util/misc.h |

[PATCH v5 4/5] blsuki: Check for mounted /boot in emu

2025-07-26 Thread Alec Brown via Grub-devel
From: Robbie Harwood Irritatingly, BLS defines paths relative to the mountpoint of the filesystem which contains its snippets, not / or any other fixed location. So grub2-emu needs to know whether /boot is a separate filesystem from / and conditionally prepend a path. Signed-off-by: Robbie Harwo

[PATCH v5 5/5] blsuki: Add uki command to load Unified Kernel Image entries

2025-07-26 Thread Alec Brown via Grub-devel
A Unified Kernel Image is a single UEFI PE file that combines a UEFI boot stub, a Linux kernel image, an initrd, and further resources. The uki command will locate where the UKI file is and create a GRUB menu entry to load it. The Unified Kernel Image Specification: https://uapi-group.org/specific

[PATCH v5 1/5] kern/misc: Implement grub_strtok()

2025-07-26 Thread Alec Brown via Grub-devel
Add the functions grub_strtok() and grub_strtok_r() to help parse strings into tokens separated by characters in the 'delim' parameter. These functions are present in gnulib but calling them directly from the gnulib code is quite challenging since the call "#include " would include the header file