Re: [PATCH 1/1] tools: efivar.py unused variable

2021-01-11 Thread Paulo Alcantara
Heinrich Schuchardt writes: > Unused variables should be called '_'. > > Signed-off-by: Heinrich Schuchardt > --- > tools/efivar.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Paulo Alcantara (SUSE)

Re: [PATCH 1/1] tools: efivar.py should check GUID when deleting

2021-01-11 Thread Paulo Alcantara
Heinrich Schuchardt writes: > When deleting a variable we must check that the GUID provided by the > user matches the GUID of the variable. > > Signed-off-by: Heinrich Schuchardt > --- > tools/efivar.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Paulo Alcantara (SUSE)

Re: [PATCH 1/1] tools: efivar.py: incorrect indentation

2021-01-11 Thread Paulo Alcantara
Heinrich Schuchardt writes: > According to https://pep8.org/#indentation we should use 4 spaces per > indentation level. > > Signed-off-by: Heinrich Schuchardt > --- > tools/efivar.py | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-

Re: [PATCH 1/1] tools: efivar.py without arguments

2021-01-11 Thread Paulo Alcantara
rgs) > AttributeError: 'Namespace' object has no attribute 'func' > > Show the online help if the arguments do not specify a function. > > Signed-off-by: Heinrich Schuchardt > --- > tools/efivar.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Paulo Alcantara (SUSE)

Re: [PATCH v4] tools: add a simple script to generate EFI variables

2020-12-22 Thread Paulo Alcantara
Heinrich Schuchardt writes: > efivar.py requires that 'set' is the first parameter. > I will fix the commit message. Thanks! > Could you, please, provide a man-page for the tool as restructured text > in doc/usage/. Please, check that it is correct with 'make htmldocs'. Yes, will do it.

[PATCH] lib/efi_loader: dynamically determine var store size

2020-12-09 Thread Paulo Alcantara
In order to support (ESP)/ubootefi.var and preseed variables greater than EFI_VAR_BUF_SIZE (0x4000), dynamically determine the variable list size that will fit both and the ones that are created at boot time. Signed-off-by: Paulo Alcantara (SUSE) --- include/efi_variable.h| 15

[PATCH v4] tools: add a simple script to generate EFI variables

2020-12-08 Thread Paulo Alcantara
nt -n var1 err: variable not found Signed-off-by: Paulo Alcantara (SUSE) --- v4: add 'sign' command for authenticated EFI payloads --- tools/efivar.py | 380 1 file changed, 380 insertions(+) create mode 100755 tools/efivar.py dif

Re: [PATCH] efi_loader: allow disabling EFI secure boot in User Mode

2020-12-04 Thread Paulo Alcantara
Hi Heinrich, Heinrich Schuchardt writes: > On 11/30/20 7:22 PM, Paulo Alcantara wrote: >> Heinrich Schuchardt writes: >> >>> On 11/30/20 3:58 PM, Paulo Alcantara wrote: >>>> Introduce a new config option CONFIG_EFI_SECURE_BOOT_VAR_DISABLE to >>&

[PATCH v3] tools: add a simple script to generate EFI variables

2020-12-02 Thread Paulo Alcantara
nt -n var1 err: variable not found Signed-off-by: Paulo Alcantara (SUSE) --- tools/efivar.py | 306 1 file changed, 306 insertions(+) create mode 100755 tools/efivar.py diff --git a/tools/efivar.py b/tools/efivar.py new file mode 100755

[PATCH v2] tools: add a simple script to generate EFI variables

2020-12-01 Thread Paulo Alcantara
EFI_GLOBAL_VARIABLE_GUID NV|BS, DataSize = 0x3 00: 66 6F 6Ffoo $ ./efivar.py -i ubootefi.var set -n var1 $ ./efivar.py -i ubootefi.var print -n var1 err: variable not found Signed-off-by: Paulo Alcantara (SUSE

Re: [PATCH] tools: add a simple script to generate EFI variables

2020-11-30 Thread Paulo Alcantara
Hi Heinrich, Heinrich Schuchardt writes: > On 11/30/20 4:16 PM, Paulo Alcantara wrote: >> This script generates EFI variables for U-Boot variable store format. > > Wouldn't it make sense to allow overwriting and deleting variables too? Absolutely. I'll repost it with those features. Thanks!

Re: [PATCH] efi_loader: allow disabling EFI secure boot in User Mode

2020-11-30 Thread Paulo Alcantara
Hi Heinrich, Heinrich Schuchardt writes: > On 11/30/20 3:58 PM, Paulo Alcantara wrote: >> Introduce a new config option CONFIG_EFI_SECURE_BOOT_VAR_DISABLE to >> allow disabling EFI secure boot when the platform is operating in User >> Mode and there is an NV+B

[PATCH] tools: add a simple script to generate EFI variables

2020-11-30 Thread Paulo Alcantara
ubootefi.var add -n kek -d foo.esl -t file $ efivar.py -i ubootefi.var add -n pk -d foo.esl -t file Signed-off-by: Paulo Alcantara (SUSE) --- tools/efivar.py | 141 1 file changed, 141 insertions(+) create mode 100755 tools/efivar.py diff --git a/tools

[PATCH] efi_loader: allow disabling EFI secure boot in User Mode

2020-11-30 Thread Paulo Alcantara
Introduce a new config option CONFIG_EFI_SECURE_BOOT_VAR_DISABLE to allow disabling EFI secure boot when the platform is operating in User Mode and there is an NV+BS EFI variable called "SecureBootDisable". Otherwise, keep it enabled by default. Signed-off-by: Paulo Alcantara (SUSE)

Re: [PATCH] efi_loader: improve detection of ESP for storing UEFI variables

2020-11-09 Thread Paulo Alcantara
Mark Kettenis writes: > The OpenBSD installation media for armv7 and arm64 use a FAT partition > of type 0x0c because the Raspberry Pi firmware doesn't support 0xef. > This allows us to have a single FAT partition with the Raspberry Pi > firmware, U-Boot and /EFI/BOOT/BOOT{ARCH}.EFI. Yeah, it is

Re: [PATCH] efi_loader: improve detection of ESP for storing UEFI variables

2020-11-09 Thread Paulo Alcantara
Heinrich Schuchardt writes: > On 09.11.20 00:58, Paulo Alcantara wrote: >> The UEFI specification does not restrict on the number and location of >> ESPs in a system. They are discovered as required by looking at the >> partition type, but firmware implementations are allow

[PATCH] efi_loader: improve detection of ESP for storing UEFI variables

2020-11-08 Thread Paulo Alcantara
, for non-removable media check if /EFI directory exists, otherwise check if /EFI/BOOT/BOOT{ARCH}.EFI file exists as specified in UEFI 2.8 "13.3.1.3 Directory Structure". Signed-off-by: Paulo Alcantara (SUSE) --- lib/efi_loader/efi_disk.c | 60 +

[PATCH] efi_loader: Add missing newline to log_{err,warning}

2020-11-06 Thread Paulo Alcantara
Add missing newline to log messages in efi_rng_register() otherwise something like below would be shown Scanning disk virtio-blk#31... Found 2 disks Missing RNG device for EFI_RNG_PROTOCOLNo EFI system partition Signed-off-by: Paulo Alcantara (SUSE) --- lib/efi_loader