Your message dated Thu, 28 Nov 2024 00:50:58 +0000
with message-id <e1tgske-00dlg8...@fasolo.debian.org>
and subject line Bug#1087817: fixed in systemd 257~rc3-1
has caused the Debian Bug report #1087817,
regarding systemd-boot-efi: please increase minimum sections in stub PE header
on riscv64
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1087817: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087817
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: systemd-boot-efi
Version: 257~rc2-3
Severity: wishlist
Tags: patch
X-Debbugs-Cc: debian-ri...@lists.debian.org
User: debian-ri...@lists.debian.org
Usertags: riscv64
Dear maintainers,
systemd 257 comes with a great new feature, the possibility to include
multiple DTBs in a single UKI file, with systemd-stub automatically
loading the correct one for the current hardware. This finally solves
the DTB problem in the EFI world for distribution, as a single image can
work on multiple boards.
That said trying to embedded all the kernel DTBs on riscv64 fails with
the following error:
Traceback (most recent call last):
File "/usr/bin/ukify", line 2246, in <module>
main()
File "/usr/bin/ukify", line 2235, in main
make_uki(opts)
File "/usr/bin/ukify", line 1307, in make_uki
pe_add_sections(uki, unsigned_output)
File "/usr/bin/ukify", line 902, in pe_add_sections
raise PEError(f'Not enough header space to add section {section.name}.')
PEError: Not enough header space to add section .dtbauto.
Indeed by default only 30 sections are free in the stub PE header, while
riscv64 currently has 35 DTBs. Note that armhf and arm64 currently have
almost 1000 DTBs.
Fortunately there is a meson configure option to change the minimum
number of sections to keep free in stub PE header. The commit message
advise everyone to overshoot, except maybe on the tiniest of embedded
boards [1]. Following that advice, I made some tests and indeed the size
increase is relatively small (compared to the dozens of MB of the
resulting UKI file when including both kernel and initrd):
# sections size (bytes) increase (bytes)
30 (def) 72192
100 75264 3072
200 79360 7168
500 91136 18944
1000 111104 38912
2000 151040 78848
Therefore I would like to propose to increase the minimum number of
sections to keep free in stub PE header using the
efi-stub-extra-sections meson option, at least on riscv64. We can go
with 500 for a start that should give a lot of margin. I have tested the
following patch, but feel free to use a better way:
--- systemd-257~rc2/debian/rules
+++ systemd-257~rc2/debian/rules
@@ -218,6 +218,13 @@
CONFFLAGS += -Ddns-servers=''
endif
+# Increase the minimum number of sections to keep free in stub PE header in
+# order to be able to create an UKI file with many DTBs (each of them is stored
+# in a different .dtbauto section)
+ifneq (,$(filter $(DEB_TARGET_ARCH), riscv64))
+CONFFLAGS += -Defi-stub-extra-sections=500
+endif
+
override_dh_auto_configure:
dh_auto_configure \
-- $(CONFFLAGS) $(CONFFLAGS_DISTRO) $(CONFFLAGS_UPSTREAM)
It something that might want to be done for other architectures using
UEFI and DTBs like arm64 or armhf, but let's start with riscv64.
Regards
Aurelien
PS, some additional context: While the Debian riscv64 port is not yet
ready to use systemd-boot by default, the plan is to use systemd-ukify
to build a netboot version of debian-installer as a single netboot.efi
file, in addition to the standard ISO installer. That makes things
simpler for users than using a separate kernel, initrd and dtb, and also
ensures that the system is booted in UEFI mode.
[1]
https://github.com/systemd/systemd/commit/41a9a502a1607f5b68f4f87f08807884e824fc1a
--- End Message ---
--- Begin Message ---
Source: systemd
Source-Version: 257~rc3-1
Done: Luca Boccassi <bl...@debian.org>
We believe that the bug you reported is fixed in the latest version of
systemd, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1087...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Luca Boccassi <bl...@debian.org> (supplier of updated systemd package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Wed, 27 Nov 2024 21:21:02 +0000
Source: systemd
Architecture: source
Version: 257~rc3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian systemd Maintainers
<pkg-systemd-maintain...@lists.alioth.debian.org>
Changed-By: Luca Boccassi <bl...@debian.org>
Closes: 1085160 1087808 1087817
Changes:
systemd (257~rc3-1) unstable; urgency=medium
.
[ Luca Boccassi ]
* systemd-ukify: recommend systemd-boot-efi for the stub (Closes:
#1087808)
* Increase minimum sections in stub PE header on arm64/armhf/riscv64 to
500. Allows riscv64 to include all current DTBs with some room to grow
(Closes: #1087817)
* Bump version in tzdata dependency due to p-u upload
* Update to new upstream version v257~rc3. For a full list of changes:
https://github.com/systemd/systemd/releases/tag/v257-rc3
* Drop patches, merged upstream
* Update symbols for 257~rc3
.
[ Ben Hutchings ]
* sysctl: Add file trigger on /usr/lib/sysctl.d to restart systemd-
sysctl. (Closes: #1085160)
Checksums-Sha1:
bdaf48eeb577ff48e19f0ec60c9b7762acc87c9b 8665 systemd_257~rc3-1.dsc
07be65c6aa059a4d2b6d967e9e6dbff89a1f5359 16226197 systemd_257~rc3.orig.tar.gz
5bbfabf2ff7d1c32ae3334a3a056743699a326a5 175832 systemd_257~rc3-1.debian.tar.xz
90b062f00a5ae9352f3590af144eaea3e33cefdc 13934
systemd_257~rc3-1_source.buildinfo
Checksums-Sha256:
a7340c356731febbaeec44f360932cc9f9b5b7bae025c494b1f74f00b1edcd96 8665
systemd_257~rc3-1.dsc
bb0837988c3fb9b60d8ad38be791663a30cdb606242665f1157e1d884e2d892a 16226197
systemd_257~rc3.orig.tar.gz
c068395d476f335812b83a72379072f04b4dd5a2edaff2e9ea149863db644a5b 175832
systemd_257~rc3-1.debian.tar.xz
60c4bbdaf976d5b159a28d869734d66f6e7c45007d528ecde7f50abf50f075e9 13934
systemd_257~rc3-1_source.buildinfo
Files:
fc70ab60c33b3752abac449e465bbfc9 8665 admin optional systemd_257~rc3-1.dsc
65d0e8eaa0ccedd8694383efbb65c7cf 16226197 admin optional
systemd_257~rc3.orig.tar.gz
4b7891902108b4cfde47de7802bb4735 175832 admin optional
systemd_257~rc3-1.debian.tar.xz
b38f35ae8732161a728952cd9baf1806 13934 admin optional
systemd_257~rc3-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEErCSqx93EIPGOymuRKGv37813JB4FAmdHt24RHGJsdWNhQGRl
Ymlhbi5vcmcACgkQKGv37813JB7+jA//T9EljT7FyPlSL/IwGPiIYUuyGdAxfCgb
ba0X1tK6jL0I2fmr44Mxg6Ir+WJh21OR552t5j5bH9+CFsSqEmyHPXzx9x9yKpC2
Zps3nQYKgGi/nxIJ11evweW1Nf0RP4AA+S3P14+NXHXR1HfIfve28w1CHeUTd+Zc
4TT5qeYMPAKs5gBzkRsWJwof2zjTnDA4N/hscUWlU+5vFMKcVwKR4VRuwg+6kpNU
qpXuLlQSEo+kM3fnNdecPVRyGzwP/+E12skqMUCcc2lNJUghMLtwQ3vlRxNxgIke
bgKaHHMb2k4rYeVKeyNtWCnDMyd5ylzKt9aBboK3SDFARbUoXYdoThsQxN7IouIq
nXne5nd57B+1LXuzMnReT8knYI3ZTxsXaEbpwq8MoshBME8iDTqlKyVRKrtn74Vn
GBlX+uIe/88cjMimteX7qihUgZr/sD9tyCDVDzf3jkCiteazhbDzTrvqbdFV4RT8
J1kltW7C3YdIEoa8O8CMLfJfnvwANLY17Fpyw0PgoA5FfHu5SZldWlj//9ahBHvE
1NDTDPjGalnI2RMW9baerxysBgZxRUB+9dzMy2i2OvtUQPLcOh7as71mJ+Q2dAmm
Lp9GO6y/zwG9V+T3NJ46pozu++LZR4mDTQGI47U7PwO0VFhVJwvwzBC/gbspeMyu
L3K6k8gBBa8=
=wQpn
-----END PGP SIGNATURE-----
pgpQy1IqYBqxi.pgp
Description: PGP signature
--- End Message ---