Age | Commit message (Collapse) | Author |
|
The Pinebook LCD disply does not show output until after the initramfs
is loaded, which is too late to enter an encryption passphrase or
debug issues with mounting the rootfs.
Fix this by adding modules to "fb": analogix-anx6345, pwm-sun4i,
sun4i-drm and sun8i-mixer.
|
|
I like to keep up with the official kernel releases. As a result the
firmware they wind up requiring is newer than what is available in
firmware packages.
I placed the firmware from the git repo in /lib/firmware/updates/
which the kernel searches before /lib/firmware. Kernel can
find them but update-initramfs cannot.
I have attached an initial patch that solves this. I am currently
using the resultng code and it is working fine for me.
The one thing the patch does not do is allow for a custom location
that can be provided to the kernel to search first.
This is because that's a little more complicated and requires a
decision wrt where to specify this location (ie the config file?).
[bwh: Text above is from AP's bug report with minor edits; I added
the subject line.]
Closes: #956663
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
If we have a generic framebuffer device then there should be no
need to set up any backlight in early boot.
Also, backlight devices are sometimes handled by large drm drivers
like i915 which we don't want to include by default.
Fixes: da8519036860 ("hook-functions: Include modules for Chromebook ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
It was logging the link target, not the name of the symlink.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
pthread_cancel() in libpthread.so.1 depends on functions in
libgcc_s.so.0, but uses dlopen() to link to it rather than having a
static dependency. Handle this dynamic dependency in copy_exec so
that it doesn't have to be handled in every affected hook script.
Closes: #950254
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
This is obsolete since Linux 2.6.28.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
For people wanting to change their filesystem to F2FS or for embedded
devices with eMMC or sdcard, add the f2fs module and its dependency as
base module. Moreover, this adds "crc32" as hidden dependency module for
f2fs.
|
|
Closes: #944929
|
|
hook-functions: Handle dw_mmc-rockchip hidden dependency on rockchip-io-domain
See merge request kernel-team/initramfs-tools!18
|
|
On Samsung Chromebook Plus (v1), messages and prompts printed during an
initramfs run aren't visible to the user unless the pwm_bl, rockchipdrm,
pwm-cros-ec and panel-simple modules are included. This commit includes
these when MODULES=dep and when MODULES=most.
For MODULES=dep: adds backlight and pwm to the dep_modules_add sys-walk.
Walking backlight includes pwm_bl and pwm includes pwm-cros-ec. Since
panel-simple isn't reachable from /sys/class/**, but it can be reached
from /sys/devices/platform/edp-panel, that path is sys-walked if it
exists.
When {efi,platform,simple,vesa}-framebuffer cannot provide a working
framebuffer device, graphics is sys-walked as well. Walking drm works
for rockchipdrm too, but also includes panfrost, so graphics was chosen
instead.
For MODULES=most: the modules are included in a new case 'fb' in the
auto_add_modules intended for modules providing framebuffer support
for machines where generic drivers don't provide one.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
Without rockchip-io-domain, I'm getting the following errors when
plugging micro SD cards to a rk3399-gru-kevin:
dwmmc_rockchip fe320000.dwmmc: All phases bad!
mmc1: tuning execution failed: -5
mmc1: error -5 whilst initialising SD card
In that case the relevant /dev/mmcblk* device isn't available either,
so we can't boot from the external SD card.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
Recent kernel versions (v5.0) enabled SPI DMA channels in the RK3399 DTS
file. Not including pl330 in the initramfs now makes some systems
unbootable (at least rk3399-gru-kevin) presumably because of this.
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
The copy_file function applies two transformations to the target
filename:
1. If it matches /bin/*, /lib*, or /sbin/*, add /usr to the beginning
since the initramfs is usrmerged.
2. If it refers a directory, add the basename of the source filename.
These need to be done in the opposite order, to handle a target
filename of "/bin" correctly.
Closes: #928689
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
On some ChromeOS devices the keyboard is attached to an EC which the
host must communicate with over SPI.
Thanks: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Until recently most keyboard drivers were either built-in or
HID (which we already include). However there are other important
modular keyboard drivers such as cros_ec_keyb which were only included
when MODULES=dep.
Thanks: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
All warning (non-fatal condition) and error (fatal condition)
messages should be printed to stderr, and should start with a
prefix of "W:" or "E:" respectively.
Also remove the word "ignoring" from some warning messages. It
follows from the fact that they are warnings that the problem is
being ignored.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
The host filesystem may not be usr-merged and may contain symlinks
between corresponding names under e.g. /bin and /usr/bin. However the
initramfs is always usr-merged. Before checking whether the target of
the copy matches the symlink target, apply the usr-merge
transformation to both filenames.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
This was introduced in commit 5de4f2d88e47, for which the commit
message says "add FIXME's to point missing /lib64 symlink parts". I
think this is obsolete as copy_file does now replicate symlinks where
needed.
Gbp-Dch: Ignore
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Sometimes globbing and word splitting is wanted. Therefore explicitly
disable the check for these line.
Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
|
|
shellcheck found more issues than SC1074. Address most of these issues.
You can check the shell code by running:
```
shellcheck -e SC1090,SC1091 -s dash hook-functions $(find * -type f
\( -executable ! -name rules -o -regex '.*\.\(post\|pre\).*'
-o -regex "^\(docs\|scripts\)/.*" ! -name '*.md' \))
```
Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
|
|
Change filename matching in manual_add_modules, copy_modules_dir,
hidden_dep_add_modules to allow a compression suffix after '.ko'
in filenames.
kmod is responsible for decompressing modules, and Debian's kmod
currently only supports xz compression. We allow any compression
suffix here, so if kmod is rebuilt with gzip/zlib support enabled then
initramfs-tools should automatically support it too.
Closes: #891560
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Exclusions may include wildcards, which should be matched by find
and not the shell. Change the argument processing to manipulate
the argument array, instead of building a single variable which
cannot maintain quoting.
(This would be easier in bash - we could use a named array variable.)
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
An initramfs image is not a ramdisk, even though it is passed to the
kernel in the same way as an initrd.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Include vmd in the block drivers group, and add the dependency to
hidden_dep_add_modules.
Thanks: Mario Limonciello <Mario.Limonciello@dell.com>
Closes: #886349
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
On some systems the keyboard controller doesn't behave properly until
psmouse has also done its initialisation. We already include psmouse
in MODULES=most builds for this reason.
Close: #878829
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Built-in "modules" can have weak dependencies on modules, and we
will need to handle that here.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Module installation directories reflect their source directory, and
since the kernel source is sometimes reorganised it isn't very
future-proof to hard-code directories here.
Rewrite the file tests as an iteration over all modules already
installed.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
With newer kernels (including kernel 4.9 as used in stretch),
initializing the USB host controllers on a number of armhf systems
is not possible without having the "axp20x_usb_power" power supply
driver module available. To be able to have the rootfs on a USB
mass storage device on such systems it is therefore necessary to
include this module in the initramfs.
Closes: #866521
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
/etc/kernel/postinst.d/kdump-tools calls mkinitramfs with -d
/var/lib/kdump/initramfs-tools. This call might fail, but the
recommended grep command points to the wrong directory:
$ sudo /etc/kernel/postinst.d/kdump-tools $(uname -r)
kdump-tools: Generating /var/lib/kdump/initrd.img-4.4.36-2
mkinitramfs: failed to determine device for /
mkinitramfs: workaround is MODULES=most, check:
grep -r MODULES /etc/initramfs-tools/
Error please report bug on initramfs-tools
Include the output of 'mount' and 'cat /proc/mounts'
update-initramfs: failed for with 1.
Closes: #856589
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
|
|
Mellanox ConnectX architecture is: mlx4_core is the lower level
PCI driver which register on the PCI id, and protocol specific drivers
are depended on it: mlx4_en - for Ethernet and mlx4_ib for Infiniband.
NIC could have multiple ports which can change their type dynamically.
We use the request_module() call to load the relevant protocol driver
when needed: on loading time or at port type change event.
The mlx4_core and mlx5_core modules are included in the initrd, but not
mlx4_ib and mlx5_ib. Thus the request_module() call will not find these
modules and fail load them. The mlx*_ib module loading will not be
retried.
Therefore add the mlx4_ib and mlx5_ib dependency to the
hidden_dep_add_modules function.
Closes: #871595
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
|
|
Multi Function Devices may carry essential functions on arm/arm64
platforms. For example in 96boards HiKey some regulators. In this case
it's picked up with MODULES=dep /sys/class/regulator enumaeration,
but not when generating generic initrd on offline with MODULES=most.
Since mfd is quite small (284K on arm64), just add it to most. This
may also open the road to make some currently built-in CONFIG_MFD
drivers modules.
Closes: #880584
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Closes: #825687
|
|
If copy_file copies a symlink, it then moves on to copying the
link-target. It returns 1 if that already exists in the initramfs.
This is not obvious from the documentation and it's causing breakage
now. It seems to make more sense to return 0 in this case and reserve
1 for the case that nothing at all was copied.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Closes: #847325
|
|
This reverts commit e05fc3e0277561aa57a76d19ce33c73ad8eb0b3e.
I'm abandoning my attempt to support detached module signatures.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
In general, we can expect any bus driver module to be quite important.
Specifically, omap-ocp2scp is needed for USB and SATA PHYs to work on
some OMAP systems and was recently added to usb-modules.udeb on armhf.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Instead of trying to list all common USB host drivers, include them
all by default; exclude the same few that are currently excluded from
usb-modules-*.udeb.
Also include extcon-usb-gpio which was recently added to
usb-modules.udeb on armhf.
Closes: #762634
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
init will panic if a scripts directory exists but has no ORDER file.
We could optimise this by removing the unused scripts and directory,
but this is a simple back-portable fix.
Closes: #814965
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Closes: #820037
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
block_dev_mod_add usually gets a device name that has already been
canonicalised using 'readlink -f', but this is not true in the case of
the resume device. By default stat(1) uses lstat(2) which will give
us a device number of 0:0 for a symlink! Rather than adding another
use of 'readlink -f', add the -L option so it dereferences symlinks to
block devices.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
When the source and target paths are different, it's possible that
the source is a symlink to the target path. In that case we must
only copy the file - there is no need for a symlink and currently
we create a broken symlink.
Closes: #812404
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Currently we're duplicating the work of udev and generating warnings
for drivers that are always built-in.
Closes: #792910
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Closes: #588770
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
Much of the code in dep_add_modules is unrelated to any particular mount
point and should only be run once.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
|