Skip to content

Commit

Permalink
Merge tag 'efi-2022-10-rc1-2' of https://source.denx.de/u-boot/custod…
Browse files Browse the repository at this point in the history
…ians/u-boot-efi

Pull request for efi-2022-10-rc1-2

Documentation:

* doc: add package uuid-dev to build dependencies

UEFI:

* remove support for CONFIG_LCD
* fix authenticated capsules tests

Others:

* pxe: simplify label_boot()
* cli: support bracketed paste
  • Loading branch information
trini committed Jul 23, 2022
2 parents fd41c8f + 052e8ca commit 03662dc
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 15 deletions.
9 changes: 4 additions & 5 deletions boot/pxe_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label)
}

initrd_addr_str = env_get("ramdisk_addr_r");
strcpy(initrd_filesize, simple_xtoa(size));

strncpy(initrd_str, initrd_addr_str, 18);
strcat(initrd_str, ":");
strncat(initrd_str, initrd_filesize, 9);
size = snprintf(initrd_str, sizeof(initrd_str), "%s:%lx",
initrd_addr_str, size);
if (size >= sizeof(initrd_str))
return 1;
}

if (get_relfile_envaddr(ctx, label->kernel, "kernel_addr_r",
Expand Down
22 changes: 20 additions & 2 deletions common/cli_readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
act = ESC_CONVERTED;
break; /* pass off to ^N handler */
case '1':
case '2':
case '3':
case '4':
case '7':
Expand All @@ -332,7 +333,8 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
break;
}
} else if (esc_len == 3) {
if (ichar == '~') {
switch (ichar) {
case '~':
switch (esc_save[2]) {
case '3': /* Delete key */
ichar = CTL_CH('d');
Expand All @@ -349,9 +351,25 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len,
act = ESC_CONVERTED;
break; /* pass to ^E handler */
}
break;
case '0':
if (esc_save[2] == '2')
act = ESC_SAVE;
break;
}
} else if (esc_len == 4) {
switch (ichar) {
case '0':
case '1':
act = ESC_SAVE;
break; /* bracketed paste */
}
} else if (esc_len == 5) {
if (ichar == '~') { /* bracketed paste */
ichar = 0;
act = ESC_CONVERTED;
}
}

switch (act) {
case ESC_SAVE:
esc_save[esc_len++] = ichar;
Expand Down
2 changes: 1 addition & 1 deletion doc/build/gcc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Depending on the build targets further packages maybe needed
pkg-config python3 python3-asteval python3-coverage \
python3-pkg-resources python3-pycryptodome python3-pyelftools \
python3-pytest python3-sphinxcontrib.apidoc python3-sphinx-rtd-theme \
python3-subunit python3-testtools python3-virtualenv swig
python3-subunit python3-testtools python3-virtualenv swig uuid-dev
SUSE based
~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion doc/develop/codingstyle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following rules apply:

* The exception here is Python which requires 4 spaces instead.

* All source files need to be in "Unix" and not "DOS" or "Windows" formatted,
* All source files need to be in "Unix" and not "DOS" or "Windows" format,
with respect to line ends.

* Do not add more than 2 consecutive empty lines to source files
Expand Down
1 change: 0 additions & 1 deletion lib/efi_loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ obj-$(CONFIG_EFI_VARIABLES_PRESEED) += efi_var_seed.o
endif
obj-y += efi_watchdog.o
obj-$(CONFIG_EFI_ESRT) += efi_esrt.o
obj-$(CONFIG_LCD) += efi_gop.o
obj-$(CONFIG_DM_VIDEO) += efi_gop.o
obj-$(CONFIG_BLK) += efi_disk.o
obj-$(CONFIG_NET) += efi_net.o
Expand Down
5 changes: 0 additions & 5 deletions lib/efi_loader/efi_gop.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <common.h>
#include <dm.h>
#include <efi_loader.h>
#include <lcd.h>
#include <log.h>
#include <malloc.h>
#include <video.h>
Expand Down Expand Up @@ -459,11 +458,7 @@ efi_status_t EFIAPI gop_blt(struct efi_gop *this, struct efi_gop_pixel *buffer,
if (ret != EFI_SUCCESS)
return EFI_EXIT(ret);

#ifdef CONFIG_DM_VIDEO
video_sync_all();
#else
lcd_sync();
#endif

return EFI_EXIT(EFI_SUCCESS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_efi_capsule_auth1(
with u_boot_console.log.section('Test Case 1-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
Expand Down Expand Up @@ -115,6 +116,7 @@ def test_efi_capsule_auth2(
with u_boot_console.log.section('Test Case 2-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
Expand Down Expand Up @@ -192,6 +194,7 @@ def test_efi_capsule_auth3(
with u_boot_console.log.section('Test Case 3-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def test_efi_capsule_auth2(
with u_boot_console.log.section('Test Case 2-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
Expand Down Expand Up @@ -189,6 +190,7 @@ def test_efi_capsule_auth3(
with u_boot_console.log.section('Test Case 3-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
Expand Down

0 comments on commit 03662dc

Please sign in to comment.