diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-09-22 09:23:52 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-26 10:35:27 +0100 |
| commit | 1c05e9b2f85a991a2757ae0f23d40e0910ef9e86 (patch) | |
| tree | d68adb5a57824be7b0a6f2f96ea1bb8f847d9214 /meta/recipes-core | |
| parent | 8e84be8a8a65a8f4a24c91881093c26d9717894c (diff) | |
| download | poky-1c05e9b2f85a991a2757ae0f23d40e0910ef9e86.tar.gz | |
systemd: upgrade 254 -> 254.4
(From OE-Core rev: d665cd001a1ca69e2c25bebed377b9dd47e0064f)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
| -rw-r--r-- | meta/recipes-core/systemd/systemd-boot_254.4.bb (renamed from meta/recipes-core/systemd/systemd-boot_254.bb) | 0 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd.inc | 6 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch | 70 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd_254.4.bb (renamed from meta/recipes-core/systemd/systemd_254.bb) | 0 |
4 files changed, 2 insertions, 74 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.4.bb index 4ee25ee72f..4ee25ee72f 100644 --- a/meta/recipes-core/systemd/systemd-boot_254.bb +++ b/meta/recipes-core/systemd/systemd-boot_254.4.bb | |||
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index e5686fbe44..3ba0b5ffc5 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc | |||
| @@ -14,10 +14,8 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" | |||
| 14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 14 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
| 15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | 15 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" |
| 16 | 16 | ||
| 17 | SRCREV = "994c7978608a0bd9b317f4f74ff266dd50a3e74e" | 17 | SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51" |
| 18 | SRCBRANCH = "v254-stable" | 18 | SRCBRANCH = "v254-stable" |
| 19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ | 19 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" |
| 20 | file://0001-elf2efi-Fix-header-size-calculation.patch \ | ||
| 21 | " | ||
| 22 | 20 | ||
| 23 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch b/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch deleted file mode 100644 index 0e8924d27d..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-elf2efi-Fix-header-size-calculation.patch +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | From d082d6502fa86e08dda858933838dde0406b824f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jan Janssen <medhefgo@web.de> | ||
| 3 | Date: Sun, 30 Jul 2023 20:59:04 +0200 | ||
| 4 | Subject: [PATCH] elf2efi: Fix header size calculation | ||
| 5 | |||
| 6 | The PE header size calculation failed to take the PE magic and coff | ||
| 7 | header size into account, which will lead to header truncation if we are | ||
| 8 | writing only 5 sections. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://github.com/systemd/systemd/commit/ee91e06a5841c30bc7306260528ef407e0ebbab3] | ||
| 11 | |||
| 12 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
| 13 | --- | ||
| 14 | tools/elf2efi.py | 12 ++++++++++-- | ||
| 15 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/tools/elf2efi.py b/tools/elf2efi.py | ||
| 18 | index e233c8e3ab..2e478940f5 100755 | ||
| 19 | --- a/tools/elf2efi.py | ||
| 20 | +++ b/tools/elf2efi.py | ||
| 21 | @@ -210,6 +210,7 @@ FILE_ALIGNMENT = 512 | ||
| 22 | |||
| 23 | # Nobody cares about DOS headers, so put the PE header right after. | ||
| 24 | PE_OFFSET = 64 | ||
| 25 | +PE_MAGIC = b"PE\0\0" | ||
| 26 | |||
| 27 | |||
| 28 | def align_to(x: int, align: int) -> int: | ||
| 29 | @@ -304,7 +305,10 @@ def copy_sections(elf: ELFFile, opt: PeOptionalHeader) -> typing.List[PeSection] | ||
| 30 | |||
| 31 | |||
| 32 | def apply_elf_relative_relocation( | ||
| 33 | - reloc: ElfRelocation, image_base: int, sections: typing.List[PeSection], addend_size: int | ||
| 34 | + reloc: ElfRelocation, | ||
| 35 | + image_base: int, | ||
| 36 | + sections: typing.List[PeSection], | ||
| 37 | + addend_size: int, | ||
| 38 | ): | ||
| 39 | # fmt: off | ||
| 40 | [target] = [ | ||
| 41 | @@ -439,7 +443,7 @@ def write_pe( | ||
| 42 | file.seek(0x3C, io.SEEK_SET) | ||
| 43 | file.write(PE_OFFSET.to_bytes(2, byteorder="little")) | ||
| 44 | file.seek(PE_OFFSET, io.SEEK_SET) | ||
| 45 | - file.write(b"PE\0\0") | ||
| 46 | + file.write(PE_MAGIC) | ||
| 47 | file.write(coff) | ||
| 48 | file.write(opt) | ||
| 49 | |||
| 50 | @@ -453,6 +457,8 @@ def write_pe( | ||
| 51 | file.write(pe_s) | ||
| 52 | offset = align_to(offset + len(pe_s.data), FILE_ALIGNMENT) | ||
| 53 | |||
| 54 | + assert file.tell() <= opt.SizeOfHeaders | ||
| 55 | + | ||
| 56 | for pe_s in sections: | ||
| 57 | file.seek(pe_s.PointerToRawData, io.SEEK_SET) | ||
| 58 | file.write(pe_s.data) | ||
| 59 | @@ -515,6 +521,8 @@ def elf2efi(args: argparse.Namespace): | ||
| 60 | |||
| 61 | opt.SizeOfHeaders = align_to( | ||
| 62 | PE_OFFSET | ||
| 63 | + + len(PE_MAGIC) | ||
| 64 | + + sizeof(PeCoffHeader) | ||
| 65 | + coff.SizeOfOptionalHeader | ||
| 66 | + sizeof(PeSection) * max(coff.NumberOfSections, args.minimum_sections), | ||
| 67 | FILE_ALIGNMENT, | ||
| 68 | -- | ||
| 69 | 2.34.1 | ||
| 70 | |||
diff --git a/meta/recipes-core/systemd/systemd_254.bb b/meta/recipes-core/systemd/systemd_254.4.bb index 8d5cf13095..8d5cf13095 100644 --- a/meta/recipes-core/systemd/systemd_254.bb +++ b/meta/recipes-core/systemd/systemd_254.4.bb | |||
