main/systemd-boot: upgrade to 255 (MR 4651)
- Dropped patch that was merged upstream - Rebased other patches [ci:skip-build]: Already built successfully in CI.
This commit is contained in:
parent
c8edef78a9
commit
e9ccc5ae23
4 changed files with 37 additions and 83 deletions
|
@ -1,51 +0,0 @@
|
|||
From 847a31aa8d6c76e966cb5eceaa57b02e651e2cfc Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Fri, 27 Oct 2023 12:50:50 -0700
|
||||
Subject: [PATCH] boot: load device tree even if no original config exists
|
||||
|
||||
Firmware may not have loaded a devicetree, for example if the device
|
||||
shipped with windows and exclusively supports ACPI.
|
||||
We should always load the specified devicetree regardless of firmware
|
||||
state to enable booting on platforms where Linux only supports DT.
|
||||
|
||||
Fixes #24059
|
||||
|
||||
Co-authored-by: Daniel Thompson <daniel.thompson@linaro.org>
|
||||
---
|
||||
src/boot/efi/devicetree.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/boot/efi/devicetree.c b/src/boot/efi/devicetree.c
|
||||
index 3916bca946..ef599bd7bc 100644
|
||||
--- a/src/boot/efi/devicetree.c
|
||||
+++ b/src/boot/efi/devicetree.c
|
||||
@@ -72,8 +72,6 @@ EFI_STATUS devicetree_install(struct devicetree_state *state, EFI_FILE *root_dir
|
||||
assert(name);
|
||||
|
||||
state->orig = find_configuration_table(MAKE_GUID_PTR(EFI_DTB_TABLE));
|
||||
- if (!state->orig)
|
||||
- return EFI_UNSUPPORTED;
|
||||
|
||||
err = root_dir->Open(root_dir, &handle, name, EFI_FILE_MODE_READ, EFI_FILE_READ_ONLY);
|
||||
if (err != EFI_SUCCESS)
|
||||
@@ -113,8 +111,6 @@ EFI_STATUS devicetree_install_from_memory(
|
||||
assert(dtb_buffer && dtb_length > 0);
|
||||
|
||||
state->orig = find_configuration_table(MAKE_GUID_PTR(EFI_DTB_TABLE));
|
||||
- if (!state->orig)
|
||||
- return EFI_UNSUPPORTED;
|
||||
|
||||
err = devicetree_allocate(state, dtb_length);
|
||||
if (err != EFI_SUCCESS)
|
||||
@@ -133,7 +129,7 @@ EFI_STATUS devicetree_install_from_memory(
|
||||
void devicetree_cleanup(struct devicetree_state *state) {
|
||||
EFI_STATUS err;
|
||||
|
||||
- if (!state->pages)
|
||||
+ if (!state->pages || !state->orig)
|
||||
return;
|
||||
|
||||
err = BS->InstallConfigurationTable(MAKE_GUID_PTR(EFI_DTB_TABLE), state->orig);
|
||||
--
|
||||
2.40.1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From b96192f20a670c902279f905792333f556c0284e Mon Sep 17 00:00:00 2001
|
||||
From 6ba4cf77357e5d583ef3709ecfb6f9192411b156 Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Fri, 6 Oct 2023 11:51:21 -0700
|
||||
Subject: [PATCH 1/2] meson: minimal configure for building systemd-boot
|
||||
|
@ -15,10 +15,10 @@ Notes:
|
|||
1 file changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 395eca1943..a227b1cef4 100644
|
||||
index 7419e2b0b0..9e85bbc9ec 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -775,9 +775,6 @@ conf.set('GPERF_LEN_TYPE', gperf_len_type,
|
||||
@@ -719,9 +719,6 @@ conf.set('GPERF_LEN_TYPE', gperf_len_type,
|
||||
|
||||
############################################################
|
||||
|
||||
|
@ -28,7 +28,7 @@ index 395eca1943..a227b1cef4 100644
|
|||
foreach header : ['crypt.h',
|
||||
'linux/memfd.h',
|
||||
'linux/vm_sockets.h',
|
||||
@@ -1065,7 +1062,7 @@ if not libcrypt.found()
|
||||
@@ -1016,7 +1013,7 @@ if not libcrypt.found()
|
||||
# fallback to use find_library() if libcrypt is provided by glibc, e.g. for LibreELEC.
|
||||
libcrypt = cc.find_library('crypt')
|
||||
endif
|
||||
|
@ -37,17 +37,17 @@ index 395eca1943..a227b1cef4 100644
|
|||
|
||||
# On some architectures, libatomic is required. But on some installations,
|
||||
# it is found, but actual linking fails. So let's try to use it opportunistically.
|
||||
@@ -1179,7 +1176,7 @@ else
|
||||
@@ -1124,7 +1121,7 @@ else
|
||||
endif
|
||||
|
||||
libmount = dependency('mount',
|
||||
- version : fuzzer_build ? '>= 0' : '>= 2.30')
|
||||
+ version : fuzzer_build ? '>= 0' : '>= 2.30', required : false)
|
||||
|
||||
want_libfdisk = get_option('fdisk')
|
||||
if want_libfdisk != 'false' and not skip_deps
|
||||
@@ -2164,6 +2161,15 @@ else
|
||||
endif
|
||||
libfdisk = dependency('fdisk',
|
||||
version : '>= 2.32',
|
||||
@@ -1807,6 +1804,15 @@ endif
|
||||
want_ukify = get_option('ukify').require(python_39, error_message : 'Python >= 3.9 required').allowed()
|
||||
conf.set10('ENABLE_UKIFY', want_ukify)
|
||||
|
||||
+foreach key : conf.keys()
|
||||
|
@ -61,7 +61,7 @@ index 395eca1943..a227b1cef4 100644
|
|||
+
|
||||
############################################################
|
||||
|
||||
elf2efi_lds = project_source_root / 'tools/elf2efi.lds'
|
||||
check_version_history_py = find_program('tools/check-version-history.py')
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
From 1435bd3583935bd010b391c2436bfedb4bf31f63 Mon Sep 17 00:00:00 2001
|
||||
From 3153e2edb2b97117284e046b9cb9b846569b77df Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Fri, 6 Oct 2023 08:30:52 -0700
|
||||
Subject: [PATCH 2/2] fix wchar for compiling on musl
|
||||
|
||||
---
|
||||
src/boot/efi/efi-string.c | 10 +++++-----
|
||||
src/boot/efi/efi.h | 5 ++---
|
||||
2 files changed, 7 insertions(+), 8 deletions(-)
|
||||
src/boot/efi/efi.h | 5 +----
|
||||
2 files changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c
|
||||
index 4400591255..f630f628f8 100644
|
||||
index 4144c0d497..40e8d1f3b0 100644
|
||||
--- a/src/boot/efi/efi-string.c
|
||||
+++ b/src/boot/efi/efi-string.c
|
||||
@@ -480,7 +480,7 @@ typedef struct {
|
||||
@@ -569,7 +569,7 @@ typedef struct {
|
||||
bool have_field_width;
|
||||
|
||||
const char *str;
|
||||
|
@ -21,7 +21,7 @@ index 4400591255..f630f628f8 100644
|
|||
|
||||
/* For numbers. */
|
||||
bool is_signed;
|
||||
@@ -541,7 +541,7 @@ static bool push_str(FormatContext *ctx, SpecifierContext *sp) {
|
||||
@@ -630,7 +630,7 @@ static bool push_str(FormatContext *ctx, SpecifierContext *sp) {
|
||||
push_padding(ctx, ' ', sp->padded_len);
|
||||
|
||||
/* In userspace unit tests we cannot just memcpy() the wide string. */
|
||||
|
@ -29,8 +29,8 @@ index 4400591255..f630f628f8 100644
|
|||
+ if (sp->wstr && sizeof(uint16_t) == sizeof(char16_t)) {
|
||||
memcpy(ctx->buf + ctx->n, sp->wstr, sp->len * sizeof(*sp->wstr));
|
||||
ctx->n += sp->len;
|
||||
} else
|
||||
@@ -633,7 +633,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
|
||||
} else {
|
||||
@@ -724,7 +724,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
|
||||
* int in vararg functions, which is why we fetch only ints for any such types. The compiler would
|
||||
* otherwise warn about fetching smaller types. */
|
||||
assert_cc(sizeof(int) == 4);
|
||||
|
@ -39,7 +39,7 @@ index 4400591255..f630f628f8 100644
|
|||
assert_cc(sizeof(intmax_t) <= sizeof(long long));
|
||||
|
||||
assert(ctx);
|
||||
@@ -728,13 +728,13 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
|
||||
@@ -819,13 +819,13 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
|
||||
return push_str(ctx, sp);
|
||||
|
||||
case 'c':
|
||||
|
@ -56,7 +56,7 @@ index 4400591255..f630f628f8 100644
|
|||
} else {
|
||||
sp->str = va_arg(ctx->ap, const char *) ?: "(null)";
|
||||
diff --git a/src/boot/efi/efi.h b/src/boot/efi/efi.h
|
||||
index 5c34668383..a0b48e7a96 100644
|
||||
index fbc5d10565..23ccdc5dd5 100644
|
||||
--- a/src/boot/efi/efi.h
|
||||
+++ b/src/boot/efi/efi.h
|
||||
@@ -10,7 +10,7 @@
|
||||
|
@ -68,16 +68,23 @@ index 5c34668383..a0b48e7a96 100644
|
|||
typedef __CHAR16_TYPE__ char16_t;
|
||||
typedef __CHAR32_TYPE__ char32_t;
|
||||
|
||||
@@ -21,7 +21,7 @@ assert_cc(sizeof(uint8_t) == 1);
|
||||
@@ -22,7 +22,6 @@ assert_cc(sizeof(uint8_t) == 1);
|
||||
assert_cc(sizeof(uint16_t) == 2);
|
||||
assert_cc(sizeof(uint32_t) == 4);
|
||||
assert_cc(sizeof(uint64_t) == 8);
|
||||
-assert_cc(sizeof(wchar_t) == 2);
|
||||
+assert_cc(sizeof(uint16_t) == 2);
|
||||
assert_cc(sizeof(char16_t) == 2);
|
||||
assert_cc(sizeof(char32_t) == 4);
|
||||
assert_cc(sizeof(size_t) == sizeof(void *));
|
||||
@@ -32,7 +32,6 @@ assert_cc(sizeof(size_t) == sizeof(uintptr_t));
|
||||
@@ -32,7 +31,6 @@ assert_cc(alignof(uint8_t) == 1);
|
||||
assert_cc(alignof(uint16_t) == 2);
|
||||
assert_cc(alignof(uint32_t) == 4);
|
||||
assert_cc(alignof(uint64_t) == 8);
|
||||
-assert_cc(alignof(wchar_t) == 2);
|
||||
assert_cc(alignof(char16_t) == 2);
|
||||
assert_cc(alignof(char32_t) == 4);
|
||||
|
||||
@@ -41,7 +39,6 @@ assert_cc(alignof(char32_t) == 4);
|
||||
# endif
|
||||
#else
|
||||
# include <uchar.h>
|
||||
|
@ -86,5 +93,5 @@ index 5c34668383..a0b48e7a96 100644
|
|||
|
||||
/* We use size_t/ssize_t to represent UEFI UINTN/INTN. */
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# is an acceptable price to pay for not having to rebase a bunch of stuff.
|
||||
#
|
||||
pkgname=systemd-boot
|
||||
pkgver=254
|
||||
pkgrel=1
|
||||
pkgver=255
|
||||
pkgrel=0
|
||||
pkgdesc="systemd's EFI boot manager and stub"
|
||||
url="https://systemd.io/"
|
||||
# TODO:
|
||||
|
@ -35,7 +35,6 @@ makedepends="
|
|||
"
|
||||
source="
|
||||
systemd-$pkgver.tar.gz::https://github.com/systemd/systemd/archive/refs/tags/v$pkgver.tar.gz
|
||||
0001-boot-load-device-tree-even-if-no-original-config-exi.patch
|
||||
0001-meson-minimal-configure-for-building-systemd-boot.patch
|
||||
0002-fix-wchar-for-compiling-on-musl.patch
|
||||
cross-x86.meson
|
||||
|
@ -112,9 +111,8 @@ ukify() {
|
|||
}
|
||||
|
||||
sha512sums="
|
||||
84b4d16980fe2e64d5c3c95b9b4fbaad1076f368f493fdd745cbafbe7ce825293384f5fa0b6360ba8188da23c4575e87402fb666a3b71f84ff8b323aba0c07ff systemd-254.tar.gz
|
||||
8ffd9c340568989b32217c9b7db8425d44b2a2116cac9c0e6d1ca5ace921810d01eef9ac8030a460fb7ad54ed2b779355fd861201a32ddd51f768242a3012140 0001-boot-load-device-tree-even-if-no-original-config-exi.patch
|
||||
e97835fa20b99ae8553b2140a14ed7da14de1e18e98f39718edba64b960a92cc9edcbf89b16bdd6c20ac1566a9c5b9e6203898e104c0312e1aae9b300b116c27 0001-meson-minimal-configure-for-building-systemd-boot.patch
|
||||
c666b42f37a5710138ebc880c5defa8b5d0645ff78eb1ec685068d7219626af285a64bee78bb9460e31de1ca293c6c051a59a97e58b4335ad2c85a7424518763 0002-fix-wchar-for-compiling-on-musl.patch
|
||||
51728de604c2169d8643718ac72acb8f70f613cfcca9e9abb7dac519f291fa26a16d48f24cae6897356319096cfe8f4d9377743e7870127374f98d432e0c557c systemd-255.tar.gz
|
||||
f68d60956d689711b2790ff0cb41ec2ff0560915f1891183cbe93850e4e9f82878d9ecdc4e6a8c9fa5251a699bad629bff4c1d2f90c5e8f6b0fb162dd149b0e4 0001-meson-minimal-configure-for-building-systemd-boot.patch
|
||||
1470afad196b4a7a98f7d640956d834dfe2dfa829731211a09757785c456599b8cefcc6121c8f466c11b7cb668248e2f2d5d305f025f16c07f958f1465ee21e2 0002-fix-wchar-for-compiling-on-musl.patch
|
||||
ad54e2c7e7a21bfa9b5f9e8db1b6af6a6d78a3e5dfe2dafcec77488f6224865ab4d4c8a8c8ee1c54c99d1741361e9fb3a51e5d36bcbc7a1c3fdcc4d0c1672132 cross-x86.meson
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue