Re: [PATCH] kern/main: Fix cmdpath in root directory

2024-10-31 Thread Michael Chang via Grub-devel
On Wed, Oct 30, 2024 at 05:12:48PM GMT, Daniel Kiper wrote: > Adding Leo... > > On Tue, Oct 29, 2024 at 03:57:18PM +0800, Michael Chang via Grub-devel wrote: > > The "cmdpath" environment variable is set at startup to the location > > from which the grub image is loaded. It includes a device part

[PATCH v1 11/15] grub-install: disable support for EFI platforms

2024-10-31 Thread Leo Sandoval
From: Jan Hlavac For each platform, GRUB is shipped as a kernel image and a set of modules. These files are then used by the grub-install utility to install GRUB on a specific device. However, in order to support UEFI Secure Boot, the resulting EFI binary must be signed by a recognized private ke

[PATCH v1 01/15] misc: Make "exit" take a return code.

2024-10-31 Thread Leo Sandoval
From: Peter Jones This adds "exit" with a return code. With this patch, any "exit" command /may/ include a return code, and on platforms that support returning with an exit status, we will do so. By default we return the same exit status we did before this patch. Signed-off-by: Peter Jones --

[PATCH v1 1/5] btrfs: Add ability to boot from subvolumes

2024-10-31 Thread Leo Sandoval
From: Jeff Mahoney This patch adds the ability to specify a different root on a btrfs filesystem too boot from other than the default one. btrfs-list-snapshots will list the subvolumes available on the filesystem. set btrfs_subvol= and set btrfs_subvolid= will specify which subvolume to use an

[PATCH v1 02/15] efi/init: Make efi machines load an env block from a variable

2024-10-31 Thread Leo Sandoval
From: Peter Jones Signed-off-by: Peter Jones --- grub-core/Makefile.core.def | 1 + grub-core/kern/efi/init.c | 34 ++ 2 files changed, 35 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 1571421d7..0bffbfea9 100644 -

[PATCH v1 10/15] env: Add efi-export-env and efi-load-env commands

2024-10-31 Thread Leo Sandoval
From: Peter Jones This adds "efi-export-env VARIABLE" and "efi-load-env", which manipulate the environment block stored in the EFI variable GRUB_ENV-91376aff-cba6-42be-949d-06fde81128e8. Signed-off-by: Peter Jones --- grub-core/Makefile.core.def | 6 ++ grub-core/commands/efi/env.c | 170 ++

[PATCH v1 05/15] efi/api: Add PRIxGRUB_EFI_STATUS and use it.

2024-10-31 Thread Leo Sandoval
From: Peter Jones This avoids syntax checkers getting confused about if it's llx or lx. Signed-off-by: Peter Jones --- include/grub/efi/api.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h index d44d00ad7..5f3cd4cc0 100644 --- a/inc

[PATCH v1 08/15] misc: align struct efi_variable better...

2024-10-31 Thread Leo Sandoval
From: Peter Jones --- include/grub/efiemu/runtime.h | 2 +- include/grub/types.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h index 2ff429845..6363fd522 100644 --- a/include/grub/efiemu/runtime.h +++ b

[PATCH v1 12/15] connectefi: new 'connectefi' command

2024-10-31 Thread Leo Sandoval
From: Renaud Métrich When efi.quickboot is enabled on VMWare (which is the default for hardware release 16 and later), it may happen that not all EFI devices are connected. Due to this, browsing the devices in make_devices() just fails to find devices, in particular disks or partitions for a give

[PATCH v1 2/5] btrfs: fix a bad null check

2024-10-31 Thread Leo Sandoval
From: Peter Jones current gcc complains: grub-core/fs/btrfs.c: In function ‘grub_cmd_btrfs_info’: grub-core/fs/btrfs.c:2745:7: error: the comparison will always evaluate as ‘true’ for the address of ‘label’ will never be NULL [-Werror=address] 2745 | if (data->sblock.label) |

[PATCH v1 4/5] btrfs: Allow specifying btrfs_relative_path to follow the default subvolume

2024-10-31 Thread Leo Sandoval
From: Michael Chang This patch enables the use of a relative path to the btrfs default subvolume by setting the environment variable btrfs_relative_path=[y1]. In contrast to using an absolute path from the toplevel root, which always reads files consistently from a fixed location, the relative pa

[PATCH v1 3/5] btrfs: export btrfs_subvol and btrfs_subvolid

2024-10-31 Thread Leo Sandoval
From: Michael Chang We should export btrfs_subvol and btrfs_subvolid to have both visible to subsidiary configuration files loaded using configfile. Signed-off-by: Michael Chang --- grub-core/fs/btrfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/b

[PATCH v1 13/15] nx: set the nx compatible flag in EFI grub images

2024-10-31 Thread Leo Sandoval
From: Peter Jones For NX, we need the grub binary to announce that it is compatible with the NX feature. This implies that when loading the executable grub image, several attributes are true: - the binary doesn't need an executable stack - the binary doesn't need sections to be both executable

[PATCH v1 04/15] chainloader: Use grub_efi_...() memory helpers where reasonable.

2024-10-31 Thread Leo Sandoval
From: Peter Jones This uses grub_efi_allocate_pool(), grub_efi_free_pool(), and grub_efi_free_pages() instead of open-coded efi_call_N() calls, so we get more reasonable type checking. Signed-off-by: Peter Jones --- grub-core/loader/efi/chainloader.c | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH v1 03/15] efi: Add grub_efi_allocate_pool() and grub_efi_free_pool() wrappers.

2024-10-31 Thread Leo Sandoval
From: Peter Jones Signed-off-by: Peter Jones --- include/grub/efi/efi.h | 36 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h index a5cd99e5a..8d98203a7 100644 --- a/include/grub/efi/efi.h +++ b/

[PATCH v1 07/15] grub-install: Don't guess /boot/efi/ as HFS+ on ppc machines in grub-install

2024-10-31 Thread Leo Sandoval
From: Peter Jones This should never be trying this, and since we've consolidated the grubenv to always be on /boot/efi/EFI/fedora/, this code causes it to always make the wrong decision. Resolves: rhbz#1484474 Signed-off-by: Peter Jones --- util/grub-install.c | 12 +--- 1 file change

[PATCH v1 06/15] efi: don't use int for efi status

2024-10-31 Thread Leo Sandoval
From: Peter Jones --- grub-core/kern/efi/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 885d7c642..2bb8a0e7a 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c @@ -177,7 +177,7 @@ grub_reboot (

[PATCH v1 14/15] grub-install: install on EFI if forced

2024-10-31 Thread Leo Sandoval
From: Marta Lewandowska UEFI Secure Boot requires signed grub binaries to work, so grub- install should not be used. However, users who have Secure Boot disabled and wish to use the command should not be prevented from doing so if they invoke --force. fixes bz#1917213 / bz#2240994 Signed-off-by

[PATCH v1 0/5] Fedora Rawhide BTRFS patches

2024-10-31 Thread Leo Sandoval
This series contains BTRFS patches taken from Fedora Rawhide [1]. Some of these patches have already being sent [2][3] however, as suggested by Daniel Kiper, to make the review easier, I took only BTRFS related patches from [1][2][3] and create the series. [1] https://src.fedoraproject.org/rpms/gr

[PATCH v1 15/15] 25_bli.in 30_uefi_firmware.in: load EFI commands inside test expressions

2024-10-31 Thread Leo Sandoval
These two commands may fail interrumping the normal boot process, so placing these inside test expressions is a safer approach. Resolves: #2305291 Suggested-by: Kan-Ru Chen: Signed-off-by: Leo Sandoval --- util/grub.d/25_bli.in | 4 +++- util/grub.d/30_uefi-firmware.in | 3 +-- 2 file

[PATCH v1 09/15] console: Work around some minor include path weirdnesses

2024-10-31 Thread Leo Sandoval
From: Peter Jones Signed-off-by: Peter Jones --- include/grub/arm/efi/console.h| 24 include/grub/arm64/efi/console.h | 24 include/grub/i386/efi/console.h | 24 include/grub/x86_64/efi/console.h | 24

[PATCH v1 00/15] Fedora Rawhide (non-network) EFI patches

2024-10-31 Thread Leo Sandoval
This series contains non-network related EFI patches taken from Fedora Rawhide [1]. Some of these patches have already being sent [2][3] however, as suggested by Daniel Kiper, to make the review easier, I took only EFI related patches (ignoring those related to networking) from [1][2][3] and crea

[PATCH v1 5/5] btrfs: Fixup for newer compiler

2024-10-31 Thread Leo Sandoval
From: Peter Jones --- grub-core/fs/btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index d47f9ab03..7024decf5 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c @@ -217,7 +217,7 @@ struct grub_btrfs_inode grub_u

[PATCH] efi/tpcm: Add TPCM module support

2024-10-31 Thread chench246
From: chench246 TPCM(Trusted Platform Control Module) is a Chinese standard and has similar function to tpm, but tpcm adds the function of active monitoring and control to the system. It can realize active startup measurement when the system starts,as well as dynamic measurement and monitoring