Git log: commit 11d8981b3a304b240fbe46da3ca25635f37dc308
Merge: 6d0c792 cb06181
Author: Ben Hutchings <benh@debian.org>
Date: Sun Nov 17 13:33:21 2024 +0000
Merge branch 'keep-kernel-modules-compressed' into 'master'
Put compressed kernel modules and firmware in an uncompressed cpio
See merge request kernel-team/initramfs-tools!128
commit cb0618177b26b8c9bfab059a04f6007e5ef756d9
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Thu Oct 24 13:45:21 2024 +0200
unmkinitramfs: use directory names 'cpio1', 'cpio2', etc.
unmkinitramfs unpacks each uncompressed section to directories 'early',
'early2', etc., which is confusing when compressed kernel modules were
put in uncompressed sections.
Use directory names 'cpio1', 'cpio2', etc. for both uncompressed and
compressed sections.
commit 81fd41f72dd894b2cec259c932d09ee3eba0fc03
Author: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed Oct 23 13:37:47 2024 +0200
Put compressed kernel modules and firmware in an uncompressed cpio
initramfs-tools decompresses kernel modules and firmware files before
putting them into the initramfs. This has several drawbacks:
* The compressed kernel modules and firmware files might be compressed
with a higher level. So recompressing them in the initramfs can
increase the size.
* Decompressing and compressing these files during mkinitramfs will take
time.
* The size of the decompressed initramfs will be bigger. That size is
needed in memory during boot.
So put compressed kernel modules and firmware files in an uncompressed
cpio instead. To make this change have an impact the files need to be
shipped compressed.
The benchmarks were done either on an AMD Ryzen 7 5700G with schroot and
overlay on tmpfs or on the hardware mentioned. All tests were running
the Ubuntu mantic development release in July 2023.
* minimal: schroot with linux-image-generic initramfs-tools zstd
* full: minimal + busybox-initramfs cryptsetup-initramfs
isc-dhcp-client kbd lvm2 mdadm ntfs-3g plymouth plymouth-theme-spinner
* nvidia: full + linux-headers-generic nvidia-driver-525
* nvidia fw: nvidia + compressed /lib/firmware/nvidia/525.125.06/
* VisionFive 2: VisionFive 2 RISC-V board
* RPi Zero 2: Raspberry Pi Zero 2 ARM board (running armhf)
"next" means using kernel and firmware packages from a PPA that ship the
files compressed with `zstd -19` plus initramfs-tools with this patch.
| | build | size | uncompressed size |
| test | time | in bytes | in MiB | in bytes | in MiB |
|----------------|---------|-----------|--------|--------------------|
| minimal | 4.30 s | 66701818 | 63.6 | 224087608 | 213.7 |
| minimal next | 4.54 s | 59935186 | 57.2 | 67738810 | 64.6 |
| full | 7.15 s | 118007038 | 112.5 | 387976843 | 370.0 |
| full next | 7.29 s | 106937908 | 102.0 | 128610985 | 122.7 |
| nvidia | 7.04 s | 209200523 | 199.5 | 513554279 | 489.8 |
| nvidia next | 7.21 s | 195246287 | 186.2 | 235288174 | 224.4 |
| nvidia fw next | 7.16 s | 191329102 | 182.5 | 213078234 | 203.2 |
| VisionFive 2 | 142.9 s | 121895035 | 116.2 | 411160836 | 392.1 |
| VF 2 next | 126.7 s | 111651453 | 106.5 | 134120804 | 127.9 |
| RPi Zero 2 | 109.5 s | 39803044 | 40.0 | 69592789 | 66.4 |
| RPi Zero 2 ² | 103.5 s | 39804499 | 40.0 | 69592789 | 66.4 |
| RPi Zero 2 next| 101.2 s | 31463352 | 30.0 | 41145762 | 39.2 |
² Updated initramfs-tools (but no compressed modules or firmware)
The build time was averaged over five runs.
| improvement | build time | size | uncompressed size |
|--------------|------------|--------|-------------------|
| minimal | 105.6 % | 89.9 % | 30.2 % |
| full | 102.0 % | 90.6 % | 33.1 % |
| nvidia | 101.7 % | 91.5 % | 41.5 % |
| VisionFive 2 | 88.7 % | 91.6 % | 32.6 % |
| RPi Zero 2 | 92.4 % | 79.0 % | 59.1 % |
See https://lists.ubuntu.com/archives/ubuntu-devel/2023-July/042707.html
LP: #2028567
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
commit 6d0c7921025a117b1748871e5c557cf335fe3831
Merge: 0f6cb43 6adf789
Author: Ben Hutchings <benh@debian.org>
Date: Sun Oct 6 23:05:57 2024 +0000
Merge branch 'copy-file-to-dir-fix' into 'master'
Fix copy_file again; expand documentation and add tests
See merge request kernel-team/initramfs-tools!136
commit 0f6cb4371742c302e2ce86bfd8995764a3ffe249
Merge: 55b1475 7328860
Author: Ben Hutchings <benh@debian.org>
Date: Sun Oct 6 23:03:43 2024 +0000
Merge branch 'qcom' into 'master'
hook-functions: fixes for Qualcomm platforms
See merge request kernel-team/initramfs-tools!135
commit 6adf789818ca531d98e8709f7f6e9e27cc89a9ac
Author: Ben Hutchings <benh@debian.org>
Date: Tue Oct 1 02:14:29 2024 +0200
autopkgtest: Add tests for copy_file function
As the copy_file is quite complex and has had a number of bugs
found (and introduced) recently, add an autopkgtest test case that
exercises most of its functionality and the specific cases where
bugs were reported.
Signed-off-by: Ben Hutchings <benh@debian.org>
commit d5c24307ad032932ccb42929ca739c9d76745be7
Author: Ben Hutchings <benh@debian.org>
Date: Tue Oct 1 01:54:35 2024 +0200
hook-functions: Exclude usr-merge symlinks in copy_file
Currently if copy_file is invoked as:
copy_file binary /lib/package/command /bin/command
we will end up with:
src=/lib/package/command
target=/usr/bin/command
link_target=/usr/lib/package/command
and then we'll copy /lib/package/command to /usr/lib/package/command
and make /usr/bin/command a symlink to it. This is not what we used
to do and not the most sensible behaviour.
mkinitramfs already creates usr-merge symlinks in the initramfs so we
don't need to worry about creating duplicates when source files are
named via such symlinks on the host. So if the host system is
usr-merged, canonicalise source filenames that use the usr-merge
symlinks before doing symlink detection.
Fixes: b641a97705c1 ("hook_functions: Fix copy_file with source including a ...")
Signed-off-by: Ben Hutchings <benh@debian.org>
commit 765db0268082dfaf0110441894abf3dafeff258b
Author: Ben Hutchings <benh@debian.org>
Date: Thu Sep 26 18:02:35 2024 +0200
hook-functions: Restore copy_file's handling of target ending in slash
Until recently, copy_file would treat a target ending in a slash as a
target directory. This was not intended behaviour, but had worked
since at least v0.98.8. It broke when I started using 'realpath' to
canonicalise the target, which stripped the slash.
Add a specific check for a trailing slash, and document that
behaviour.
Fixes: 984bdc7d727f ("hook-functions: copy_file: Canonicalise target filename")
Closes: #1082647
Signed-off-by: Ben Hutchings <benh@debian.org>
commit 140c572128a09324f6f907ca8b3583c5f422e210
Author: Ben Hutchings <benh@debian.org>
Date: Thu Sep 26 18:01:04 2024 +0200
hook-functions: Expand documentation of copy_exec and copy_file
The documentation is currently a bit vague and doesn't mention
creation of directories or symlinks at all. Expand it to describe the
current behaviour.
Signed-off-by: Ben Hutchings <benh@debian.org>
commit 7328860a2e0495a02433c1c8d3f58dbfc29d8c8b
Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun Sep 8 10:40:02 2024 +0300
hook-functions: add missing module dependencies for Qualcomm plaforms
- qmi_helpers uses AF_QIPCRTR to communicate, but there is no dependency
on qrtr module, providing that address family
- panel-edp might require PWM backlight, but there is no corresponding
devlink / dependency
- drm/msm driver uses Type-C modules on DisplayPort-enabled platforms,
but devlinks can be missing because of the devlink loop resolution.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
commit 55b1475fd35917abae54d1e1cbde51de3e55fbbd
Merge: 1030062 c8a24d8
Author: Ben Hutchings <benh@debian.org>
Date: Mon Sep 23 17:51:02 2024 +0000
Merge branch 'modules-from-dracut' into 'master'
hook-functions: Add more modules based on dracut 90kernel-modules
See merge request kernel-team/initramfs-tools!125
commit c8a24d8bde8bb273934c511cea9c31784823b956
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 15:27:01 2024 +0300
hook-functions: Add platform/chrome drivers
Add ChromeOS platform driver modules for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit e69e41326241
("feat(kernel-modules): install platform/chrome modules on ARM/RISC-V")
by me, because they include drivers Chromebooks need to communicate with
their embedded controller, which in turn is necessary for functionality
like keyboard, USB, and display backlight.
The platform modules include cros_ec_spi that we already include, so we
no longer need to explicitly include that.
Link: https://github.com/dracut-ng/dracut-ng/commit/e69e41326241c8fa538a5c4383c16ddbab296e6f
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 703315356768ef037abb416ff71e6090e182a635
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 15:19:19 2024 +0300
hook-functions: Add input/serio drivers
Add serial I/O driver modules for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit 180e9d78516f
("kernel-modules: install all HID drivers").
The serial I/O modules include hyperv-keyboard that we explicitly add,
so we can drop the explicit addition.
Link: https://github.com/dracutdevs/dracut/commit/180e9d78516fb4b2ee5baef44521007a860d4dd2
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit cb730efd3e1a60d094c79b3505e77397cc30ff6d
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 15:09:36 2024 +0300
hook-functions: Add tty/serial drivers
Add serial driver modules for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit c1699b59c6ec
("kernel-modules: add serial line drivers"). However, most of these have
already been enabled as built-in on the Debian kernel.
Link: https://github.com/dracutdevs/dracut/commit/c1699b59c6ec0c86f1355fbb68eaf65281b81789
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit ada64b76b90ba30af239797de50671bfe0fe12d0
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 15:02:32 2024 +0300
hook-functions: Add usb/typec drivers
Add USB Type-C driver modules for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit a1287c627f28
("fix(90kernel-modules): add Type-C USB drivers for generic initrd"),
stating they can be necessary for input, external display and storage.
We already add the USB Type-C Port Controller drivers, which we can
replace with its parent directory.
Link: https://github.com/dracutdevs/dracut/commit/a1287c627f28b16b1b066b7c256549b832bd98de
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 91a439b805f93f3ddcc522677629bd0cf588d54f
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 14:46:41 2024 +0300
hook-functions: Add watchdog drivers
Add watchdog driver modules for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit 3a60c036db7c
("fix(90kernel-modules): add watchdog drivers for generic initrd"),
stating that we might not be able ping a hardware watchdog fast enough
if we wait until we mount the root filesystem.
Link: https://github.com/dracutdevs/dracut/commit/3a60c036db7caccda95475d33c8d4ce1f615d2c8
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 2eb8e0e04f3312ebd39c1ee5a960377c0cf6cf37
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 14:26:36 2024 +0300
hook-functions: Add dma drivers
Add Direct Memory Access drivers for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit 917e1b6b5b26
("Add check for aarch64 to the arm kernel module list"), stating that
they can add significant performance to storage drivers and often need
to be present when those are loaded.
The dma drivers include pl330 that is being added as a hidden dependency
for the rockchip-spi driver, but that relation is still necessary for
MODULES=dep.
Link: https://github.com/dracutdevs/dracut/commit/917e1b6b5b2669a30bce69061686adbb6abc5e35
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 56e9fd6d6156ba2f9f5489c896d655e38d08e4d0
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 14:16:16 2024 +0300
hook-functions: Add devfreq drivers
Add Dynamic Voltage and Frequency Scaling drivers for MODULES=most,
based on dracut's 90kernel-modules script. These were added in dracut
commit 38ea7e821bce ("Include devfreq drivers in initrd"), stating that
some SoCs have drivers that need these in early init.
The devfreq modules include the respective governors. The panfrost
graphics driver is known to fail without one of these governors, which
led to PM_DEVFREQ and DEVFREQ_GOV_SIMPLE_ONDEMAND being built-in on
Debian (see kernel-team/linux!1066).
Link: https://github.com/dracutdevs/dracut/commit/38ea7e821bce1cbf3c8fe4dc044a809301a77f82
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 4410741f321be487c0e9112a9f3f318e1b64b57e
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:59:50 2024 +0300
hook-functions: Add qrtr driver
Add the Qualcomm Inter-Processor Communication driver for MODULES=most,
based on dracut's 90kernel-modules script. This was added in dracut
commit dd9a4bc1b13a ("feat(kernel-modules): add Qualcomm IPC router to
enable USB") stating that it is necessary in order to use USB drives,
more specifically in the ARM ThinkPad X13s.
The driver is in the net directory, but apparently this is misleading
since it handles communication between different SoC parts in general,
including those unrelated to networking in the common sense.
Link: https://github.com/dracut-ng/dracut-ng/commit/dd9a4bc1b13a0cc8abac980bc3cceffb67111e64
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit ee8988467c1269c3c903cf2310c775286479864c
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:55:18 2024 +0300
hook-functions: Add spmi modules
Add System Power Management Interface drivers for MODULES=most, based on
dracut's 90kernel-modules script. These were added in dracut commit
9491c2852501 ("feat(kernel-modules): Install SPMI modules on
ARM/RISC-V"), stating the Mediatek PCIe and PHY drivers depend on
spmi-mtk-pmif (although the latter is built-in on Debian).
Link: https://github.com/dracut-ng/dracut-ng/commit/9491c2852501fab5d0000a095706ac6469cbfdf1
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 6269d10cc3e9721650e52859712e6bdc1e830858
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:46:01 2024 +0300
hook-functions: Add power modules
Add power-related drivers for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit e752d42de9c3
("modules: kernel: add phy and power modules to generic initrd"), which
states they are needed for the NextThing C.H.I.P. and some Exynos
devices. The commit also adds PHY drivers, which we already add.
The power drivers include the axp20x_usb_power we already explicitly
add, so we can fold that into the general case now.
Link: https://github.com/dracutdevs/dracut/commit/e752d42de9c37dd9906a802a5cdf528fbd360453
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 82c266ddf0f17a482fe42e8b2f6c4478fc713814
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:33:33 2024 +0300
hook-functions: Add nvmem drivers
Add non-volatile memory drivers for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit bc965cd88900
("fix(kernel-modules): always include nvmem driver on nvmem_on_arm"),
stating they are needed to boot on SoCs like NXP i.MX.
The nvmem drivers include nvmem_mtk-efuse that is being added as a
hidden dependency for a display-related PHY on MediaTek devices, though
that relation is still necessary for MODULES=dep. They also include
nvmem-imx-ocotp that we explicitly add in the net section, so we can fold
the latter into the general case.
Link: https://github.com/dracutdevs/dracut/commit/bc965cd8890013a6362733d217c18756134bbcdf
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 6caf9cdd49292e9a87422514190473c9e25716ea
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:19:58 2024 +0300
hook-functions: Add memory drivers
Add external memory controller drivers, based on dracut's
90kernel-modules script. These were added in dracut commit commit
07c671cc51efc ("feat(kernel-modules): add driver memory"), stating that
tegra_drm depends on tegra*_emc drivers (although those default to being
built-in).
The memory drivers also include mtk-smi, which is already transitively
included by display-related modules for MediaTek devices as a fw_devlink
dependency.
Link: https://github.com/dracutdevs/dracut/commit/07c671cc51efcdffce90a90c2d9fd2af7bc0012a
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit cf40492ca73e0e73aa8161a03bc36ab39bb56735
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 13:06:42 2024 +0300
hook-functions: Add mailbox drivers
Add hardware mailbox drivers for MODULES=most, based on dracut's
90kernel-modules script. These were added in dracut commit 0e80ff72e01d
("fix(kernel-modules): add mailbox drivers for arm") which states these
might be needed by other devices used in the initrd, with the example
that sdhci-iproc requires bcm2835-mailbox on Raspberry Pi 4 (although
the latter is built-in on Debian).
The mailbox drivers also include mtk-cmdq-mailbox, which is already
transitively included by display-related modules for MediaTek devices as
a fw_devlink dependency.
Link: https://github.com/dracutdevs/dracut/commit/0e80ff72e01d28e7e92d3adbf98ec40bdbdc37fe
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 7d1c4b4cfdf952057f28a0b32d2f2e202f4f43c4
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 12:45:00 2024 +0300
hook-functions: Add interconnect drivers
Add on-chip interconnect management driver modules for MODULES=most,
based on dracut's 90kernel-modules script. These were added in dracut
commit afb5717e6772 ("fix(kernel-modules): add interconnect drivers"),
stating that many device-tree based systems require them.
The interconnect modules include imx8mq-interconnect that we have in
framebuffer-specific modules, so we can remove it from that list. They
also include qnoc-sc8280xp which is known to be necessary for the ARM
ThinkPad X13s.
Link: https://github.com/dracutdevs/dracut/commit/afb5717e67727d49fae0d2a1a4169e5b247387f4
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 99bea0928b445fd0b0fcba835bc27a83042e9822
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 12:32:40 2024 +0300
hook-functions: Add rpmsg and hwspinlock drivers
Add remote processor messaging and hardware spinlock drivers for
MODULES=most, based on dracut's 90kernel-modules script. These were
added in dracut commit 82651e9ef3c4 ("Add rpmsg, hwspinlock and usb/misc
for ARM") without much discussion beyond stating that more complex
devices now need them in the early boot process.
The dracut commit also includes miscellaneous USB drivers, but there are
too many unnecessary drivers there, so let's not include the whole
directory and instead only add necessary ones as we find out.
Link: https://github.com/dracutdevs/dracut/commit/82651e9ef3c4c799281ba006f6ef46902e13086f
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
commit 6487f6e550a9a5150afec58be6c020d83dad7a10
Author: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Date: Fri Aug 30 11:42:39 2024 +0300
hook-functions: Add soc and extcon drivers
Add SoC and external connector driver modules for MODULES=most, based on
dracut's 90kernel-modules script. These were added in dracut commit
39018c93c2bc ("arm: add soc/extcon/mfd as they're often needed for USB
and core memory/soc drivers"). We already include multi-function device
drivers that commit also adds.
The SoC modules include rockchip-io-domain and mtk-pmic-wrap that are
being added as hidden dependencies, though that relation is still
necessary for MODULES=dep. The external connector modules include
extcon-cros-ec and extcon-usb-gpio that we explicitly add, so we can
delist those two.
Link: https://github.com/dracutdevs/dracut/commit/39018c93c2bcf20a7f5f9ee509ad1c0448d598f7
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>