1747 Commits

Author SHA1 Message Date
Ben Hutchings
8c65a4965e Merge branch 'wrap-and-sort' into 'debian/latest'
Run wrap-and-sort

See merge request kernel-team/initramfs-tools!185
2025-11-16 17:28:51 +01:00
Ben Hutchings
af837b1650 Merge branch 'shellcheck' into 'debian/latest'
silence incorrect shellcheck SC2329

See merge request kernel-team/initramfs-tools!189
2025-11-16 16:54:59 +01:00
Benjamin Drung
7d68e103cc Fix shellcheck SC2268
shellcheck 0.11.0 complains:

```
In debian/initramfs-tools.postinst line 6:
if [ "x$1" != xtriggered ]; then
     ^---^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose.

Did you mean:
if [ "$1" != triggered ]; then
```
2025-11-12 13:00:53 +01:00
Benjamin Drung
813886bbb3 silence incorrect shellcheck SC2329
shellcheck 0.11.0 complains:

```
In hooks/fsck line 57:
			fstype() { "/usr/lib/klibc/bin/fstype" "$@"; }
                        ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).

In ./mkinitramfs line 288:
clean_on_exit() {
^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).

In debian/tests/unmkinitramfs line 44:
no_compressor() {
^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly).
```
2025-11-12 12:59:08 +01:00
Benjamin Drung
a378364705 Run wrap-and-sort
Run `wrap-and-sort`.
2025-08-13 11:35:13 +02:00
Ben Hutchings
26e666f1f9 Releasing version 0.150.
Signed-off-by: Ben Hutchings <benh@debian.org>
v0.150
2025-08-12 22:54:53 +02:00
Ben Hutchings
72d613c110 Merge branch 'cpio-case-fold' into 'debian/latest'
unmkinitramfs: Accept lower-case hex digits in cpio headers

See merge request kernel-team/initramfs-tools!184
2025-08-09 18:24:24 +02:00
Ben Hutchings
9fa9ae011c unmkinitramfs: Accept lower-case hex digits in cpio headers
GNU cpio always generates upper-case hex digits in cpio headers, but
other implementations may not.  Both GNU cpio and the kernel parse the
headers case-insensitively.  Therefore make unmkinitramfs do the same.

Signed-off-by: Ben Hutchings <benh@debian.org>
2025-08-09 17:15:26 +02:00
Ben Hutchings
d4959f6292 Merge branch 'patch-1' into 'debian/latest'
hook-functions: add modules for non-default checksums on btrfs

See merge request kernel-team/initramfs-tools!183
2025-08-03 14:18:08 +02:00
Askar Safin
7a9c2a025d hook-functions: add modules for non-default checksums on btrfs 2025-08-03 11:49:38 +00:00
Ben Hutchings
321262b832 Merge branch 'copyright' into 'debian/latest'
update-initramfs: add copyright information

See merge request kernel-team/initramfs-tools!179
2025-07-09 18:52:29 +00:00
Benjamin Drung
f0c9c42999 update-initramfs: add copyright information
Add copyright information to `update-initramfs` to ease modifying and
using it in dracut.
2025-07-09 20:24:37 +02:00
Ben Hutchings
3dc812431c Merge branch 'include-cdns' into 'debian/latest'
hook-functions: Add Cadence USB driver to base

See merge request kernel-team/initramfs-tools!180
2025-07-09 13:57:42 +00:00
E Shattow
d656783c53 hook-functions: Add Cadence USB driver to base
Closes: #1108924
Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Ben Hutchings <benh@debian.org>
2025-07-09 15:30:01 +02:00
Ben Hutchings
e29f76a13e Merge branch 'qemu-system-native' into 'debian/latest'
autopkgtest: replace qemu-kvm by qemu-system-native

See merge request kernel-team/initramfs-tools!176
2025-06-29 12:07:30 +00:00
Ben Hutchings
46f9ec3a7f Merge branch 'set-eu' into 'debian/latest'
update-initramfs: use "set -u"

See merge request kernel-team/initramfs-tools!178
2025-06-29 12:02:54 +00:00
Ben Hutchings
bdc4348472 Merge branch 'revert-avoid-double-generation' into 'debian/latest'
Revert "Avoid updating the initramfs twice for some cases"

See merge request kernel-team/initramfs-tools!177
2025-06-29 11:52:38 +00:00
Benjamin Drung
afb3ba3ac6 update-initramfs: use "set -u"
Support `set -u` in update-initramfs and use it.
2025-06-27 13:25:57 +02:00
Benjamin Drung
27544d4a9c update-initramfs: move "set -e" to the beginning 2025-06-27 13:24:54 +02:00
Benjamin Drung
e1d0775be0 Revert "Avoid updating the initramfs twice for some cases"
This reverts commit 7f2ed354cc8f966de444b8c278c208ea4e13ef75.

When installing a kernel package and a package with a trigger for
update-initramfs in one go, the update of the initramfs is skipped in
some cases.

In a clean chroot, populated with debootstrap for "trixie", run

```
apt install linux-image-amd64 plymouth-theme-mobian
```

Result:

```
[...]
Setting up linux-image-6.12.32-amd64 (6.12.32-1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.32-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.32-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.32-amd64
I: /initrd.img is now a symlink to boot/initrd.img-6.12.32-amd64
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.12.32-amd64
Setting up linux-image-amd64 (6.12.32-1) ...
Setting up plymouth-theme-mobian (1.1) ...
update-alternatives: using /usr/share/plymouth/themes/mobian/mobian.plymouth to provide /usr/share/plymouth/themes/default.plymouth (default.plymouth) in auto mode
Processing triggers for libc-bin (2.41-8) ...
Processing triggers for initramfs-tools (0.148.2) ...
update-initramfs: /boot/initrd.img-6.12.32-amd64 has already been updated since Mon Jun 23 06:07:09 2025.
```

The initramfs is updated after setup of the kernel package. It is NOT
updated again after setup of package plymouth-theme-mobian, which is
wrong. The files that are installed by package plymouth-theme-mobian are
missing in the initramfs (and the plymouth splash screen will not work).

This is what happens here:

1. Another package is installed that calls "update-initramfs -u".  This
   activates the trigger, and we store a timestamp for it.
2. linux-image-6.12.32-amd64 is installed.  This calls the
   initramfs-tools hook which synchronously builds the initramfs.
3. plymouth-theme-mobian is installed.  This activates the trigger
   through a triggers control file.
4. The trigger runs and passes the timestamp from (1) through to
   update-initramfs.  update-initramfs sees the current image is newer
   than that, and skips the update.

We correctly handle the case where the trigger is only activated through
`update-initramfs -u`, or only through a triggers control file or direct
invocation of dpkg-trigger.  But when both methods are used, this bug is
possible because a timestmap file is present and it is wrong.

So revert the optimised trigger handling until dpkg itself records
timestamps for trigger activation (see bug #1099136).

Closes: #1108204
2025-06-26 17:50:13 +02:00
Benjamin Drung
a6efee9904 autopkgtest: replace qemu-kvm by qemu-system-native
qemu 1:9.2.0+ds-5 provides `qemu-system-native`. `qemu-kvm` is not
available on armhf any more.

So replace `qemu-kvm` by `qemu-system-native`.
2025-06-26 17:27:07 +02:00
Ben Hutchings
2c0bd2d293 Releasing version 0.149.
Signed-off-by: Ben Hutchings <benh@debian.org>
v0.149
2025-06-13 00:18:20 +02:00
Ben Hutchings
1f479fd08f Merge branch 'missing-breaks' into 'debian/latest'
Add missing Breaks to initramfs-tools-bin (for moved unmkinitramfs)

See merge request kernel-team/initramfs-tools!174
2025-06-12 22:15:59 +00:00
Ben Hutchings
a49262b73f Merge branch 'fix-zfcp' into 'debian/latest'
Re-add s390 specific scsi drivers

See merge request kernel-team/initramfs-tools!175
2025-06-12 22:13:19 +00:00
Bastian Blank
39e24feb81 Re-add s390 specific scsi drivers
Closes: #1107689
Fixes: kernel-team/initramfs-tools!149
2025-06-12 09:38:58 +02:00
Benjamin Drung
8842365ef2 Add missing Breaks to initramfs-tools-bin (for moved unmkinitramfs)
/usr/bin/unmkinitramfs has been moved from initramfs-tools-core to
initramfs-tools-bin in 0.148.

Fixes: 9e37d8b38da7 ("Move unmkinitramfs to new initramfs-tools-bin package")
2025-06-10 13:29:15 +02:00
Ben Hutchings
c2c719fe93 Merge branch 'unmkinitramfs-lzma' into 'debian/latest'
unmkinitramfs: Add support for lzma compression

See merge request kernel-team/initramfs-tools!171
2025-06-01 15:05:48 +00:00
Ben Hutchings
02bd63ab71 unmkinitramfs: Add support for lzma compression
The kernel and mkinitramfs support lzma compression, but for some
reason this was not included in unmkinitramfs.

- Add a format code, magic entry, and decompression command for lzma
  to unmkinitramfs
- Add lzma to the compression commands in the test case

Signed-off-by: Ben Hutchings <benh@debian.org>
2025-05-31 18:18:05 +02:00
Ben Hutchings
e28d365867 Merge branch 'panels' into 'debian/latest'
Fix inclusion of panel drivers

See merge request kernel-team/initramfs-tools!170
2025-05-28 18:15:21 +00:00
Ben Hutchings
f4ff132415 Merge branch 'unmkinitramfs-unsplit' into 'debian/latest'
unmkinitramfs: Stop splitting into "early"  and "main" subdirectories

See merge request kernel-team/initramfs-tools!169
2025-05-28 18:13:39 +00:00
Ben Hutchings
d04a3289d8 Merge branch 'log-copy_file-failures' into 'debian/latest'
hook-functions: Print error message on copy_file failure

See merge request kernel-team/initramfs-tools!167
2025-05-28 18:13:23 +00:00
Ben Hutchings
e375f529c8 Merge branch 'simple-framebuffer-modules' into 'debian/latest'
Handle simple-framebuffer drivers and framebuffer_coreboot built as modules

See merge request kernel-team/initramfs-tools!142
2025-05-28 18:12:16 +00:00
Ben Hutchings
36c3ee4e10 Releasing version 0.148.
Signed-off-by: Ben Hutchings <benh@debian.org>
v0.148
2025-05-28 19:09:56 +02:00
Tobias Heider
d82a1e91ef Include all bridge, panel and backlight drivers if MODULES=most
Many arm devices rely on drivers to bring up their display panels properly.
Include all of drivers/gpu/drm/panel, drivers/gpu/drm/bridge and
drivers/video/backlight to make sure the display is working in the
initrd (to show disk unlock dialogue etc).

Found on a Qualcomm CRD Snapdragon Laptop but this seems to affect
many similar machines too.
2025-05-06 21:56:15 +02:00
Tobias Heider
6fdd131444 Fix include of panel drivers if MODULES=dep
Our current panel driver loading mechanism when using MODULES=dep
is faulty because it matches on driver names that include "*panel*".
This is not true for many of the panel drivers in Linux as can be
seen by running `grep -Er "\s+.name\s+="" drivers/gpu/drm/panel`
in the Linux source tree.

Examples:
panel-feiyang-fy07024di26a30d.c:  .name = "feiyang-fy07024di26a30d",
panel-ilitek-ili9881c.c:          .name = "ili9881c-dsi",
panel-magnachip-d53e6ea8966.c:    .name = "d53e6ea8966-panel",

A better way to find ALL panel drivers is to also include
/sys/module/*panel*/drivers/*/* where the file names are derived
from the *.c source files which all include panel,
see `ls drivers/gpu/drm/panel`.
2025-05-06 21:55:09 +02:00
Benjamin Drung
ea2977533e hook-functions: Print error message on copy_file failure
Print an error message when copy_file cannot find the source file. This
will ease debugging in cases of failures like LP #1641230.
2025-04-25 11:19:30 +02:00
Ben Hutchings
c7fc4a424f Merge branch 'unmkinitramfs-c' into 'debian/latest'
unmkinitramfs: Rewrite in C to make it acceptably fast

See merge request kernel-team/initramfs-tools!168
2025-04-23 00:28:22 +00:00
Ben Hutchings
810421833a unmkinitramfs: Stop splitting into "early" and "main" subdirectories
We originally unpacked each cpio archive into its own subdirectory for
security reasons.  Since we are now able to stitch together multiple
cpio archives to feed to a single cpio process, that concern no longer
applies.

We maintained the split up to the release of "trixie" out of concern
for possible breakage of callers that relied on this split.  Since
that release is done, stop splitting and always unpack everything
directly into the output directory.

Signed-off-by: Ben Hutchings <benh@debian.org>
2025-04-22 03:10:23 +02:00
Ben Hutchings
49f3bbadce test: Add autopkgtest case for unmkinitramfs
Add a test that exercises unmkinitramfs with:

- 0-2 early cpio archives
- 0-2 main cpio archives
- All supported compressors, including none, for the last main archive

and verifies that the output is as expected.

Signed-off-by: Ben Hutchings <benh@debian.org>
2025-04-22 03:09:39 +02:00
Ben Hutchings
9e37d8b38d Move unmkinitramfs to new initramfs-tools-bin package
Since unmkinitramfs is now native code, it needs to be built as part
of an arch:any package.  Introduce initramfs-tools-bin and move it
there.

CI: Remove the variables that disable arch:any builds.

Signed-off-by: Ben Hutchings <benh@debian.org>
2025-04-22 02:37:00 +02:00
Ben Hutchings
a797b423d2 unmkinitramfs: Rewrite in C to make it acceptably fast
Parsing uncompressed cpio archives in this shell script requires
running multiple processes for each archive member.

This was not too bad when there were usually only a few microcode
blobs in an uncompressed archive, but now that we put compressed
kernel modules in an uncompressed archive, it became very slow indeed.

Rewrite it in C so that it's acceptably fast.

This should have no functional changes, except that it adds support
for an initramfs with no compressed part.

Fixes: 81fd41f72dd8 ("Put compressed kernel modules and firmware in an uncompressed cpio")
Signed-off-by: Ben Hutchings <benh@debian.org>
2025-04-22 02:37:00 +02:00
Alper Nebi Yasak
72899f8d89 Handle framebuffer_coreboot driver built as a module
The driver for coreboot firmware-initialized framebuffer can be built as
a module. Debian kernels so far have it as built-in because they would
not be probed automatically when built as a module. This is fixed now,
likely with a patchset included in v6.9-rc1, so we might encounter it as
a module either in Debian or with custom-built kernels.

For MODULES=dep, check for the coreboot framebuffer in a different block
from other platform drivers, and include the framebuffer_coreboot module
if we find the device. For MODULES=most, add driver to the framebuffer
modules list. Explicitly try to probe the module for break=top because
it would not automatically probe there otherwise. Since it requires a
driver for the "simple-framebuffer" device, add simpledrm and simplefb
as its hidden dependencies.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2025-04-21 09:05:08 +03:00
Alper Nebi Yasak
d11ba241dc Handle simple-framebuffer drivers built as modules
Recent Debian kernels have the simplefb driver built-in on a few
architectures, except in cloud flavours. It handles 'simple-framebuffer'
devices registered from elsewhere: possibly in a device-tree fragment,
or from another driver like framebuffer_coreboot, or via SYSFB_SIMPLEFB.
The more modern alternative to it is simpledrm which also handles
the same 'simple-framebuffer' devices.

We haven't switched to simpledrm, but if we do it's possible we will
want it to be a module, since it depends on the drm subsystem and would
require that to be built-in otherwise. Regardless of what we choose for
Debian kernels, it's still possible for custom-built kernels to have
either/both of simplefb and simpledrm as modules instead of built-in.

Include these modules in initramfs unconditionally when MODULES=dep.
For MODULES=most, add the two drivers to the framebuffer modules list.

When MODULES=dep and these drives are (probed) modules, our check for
platform framebuffers always finds a "module" directory in the driver's
sysfs directory and incorrectly skips handling graphics modules, ignore
the false positive.

Unfortunately, these drivers sometimes do not get probed automatically.
One such case is efifb with SYSFB_SIMPLEFB=y, which is quite important.
Add a init-top script that tries to probe simpledrm, with a fallback to
simplefb. Explicitly try to probe these modules for break=top as well.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2025-04-21 09:05:08 +03:00
Ben Hutchings
33075edd68 Releasing version 0.147.
Signed-off-by: Ben Hutchings <benh@debian.org>
v0.147
2025-03-28 02:38:25 +01:00
Ben Hutchings
203b5c85a8 Merge branch 'debian-policy' into 'debian/latest'
Bump Standards-Version to 4.7.2

See merge request kernel-team/initramfs-tools!166
2025-03-26 19:53:07 +00:00
Ben Hutchings
20cc17c2ee Merge branch 'test-order' into 'debian/latest'
test: run quick copy-file autopkgtest first

See merge request kernel-team/initramfs-tools!165
2025-03-26 19:51:44 +00:00
Benjamin Drung
32aa7432d2 Bump Standards-Version to 4.7.2
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2025-03-26 12:35:44 +01:00
Benjamin Drung
dad2c90a74 test: run quick copy-file autopkgtest first
The autopkgtest copy-file is a quickly running test. Run it before the
more expensive tests are run.
2025-03-26 11:01:18 +01:00
Ben Hutchings
1f682eecf5 Merge branch 'spelling' into 'debian/latest'
Fix spelling mistakes in d/changelog

See merge request kernel-team/initramfs-tools!163
2025-03-26 00:07:17 +00:00
Ben Hutchings
0df1765e90 Merge branch 'block-modules' into 'debian/latest'
Filter block kernel modules by symbol regex from dracut

See merge request kernel-team/initramfs-tools!149
2025-03-25 23:58:06 +00:00