summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-06wipHEADmasterbill-auger
2023-11-04install/filesystems: include external mount helpersnl6720
Some file systems may need `mount.FSTYPE` binaries to properly mount. See https://man.archlinux.org/man/mount.8.en#EXTERNAL_HELPERS
2023-10-31functions: add_checked_modules_from_symbol: do not fail if there are no ↵nl6720
autodetected modules to add Only fail if no modules with the symbol can be found. Fixes https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/218 Fixes: 1760deea68f4a915a502c5602c82c7f9f8404a51 ("add_checked_modules_from_symbol: avoid double-lookup")
2023-10-26Add consistent exit code to 40-microcode.installEvan James
2023-10-22install/block: look for all modules in the ata directorynl6720
There is no need to filter only specific ATA related modules.
2023-10-22install/block: update unconditionally included module listnl6720
* Remove sr_mod since optical disc drives are not very common anymore. * FireWire is dead, so there is no need to always include firewire-sbp2. * Add uas since the initramfs could be generated while a drive is connected to a controller that does not support UASP, but later used on one that does. * Add virtio_scsi so that both virtio based block device modules are included. * Add ahci and nvme, nearly every hardware made in the past 5 years has one or both. This only changes the unconditionally included modules when using the autodetect hook. If any of the mentioned modules are in use when generating the initramfs, whey will be included.
2023-10-20Merge remote-tracking branch 'origin/merge-requests/187'Morten Linderud
* origin/merge-requests/187: tests: add test case for kver_zimage Get kernel version from generic EFI zboot image for bash completion Get kernel version from generic EFI zboot image
2023-10-20Merge remote-tracking branch 'origin/merge-requests/270'Morten Linderud
* origin/merge-requests/270: install/block: include regulator modules
2023-10-20Merge remote-tracking branch 'origin/merge-requests/269'Morten Linderud
* origin/merge-requests/269: add_checked_modules_from_symbol: avoid double-lookup add_module_from_symbol: rework the API
2023-10-20Merge remote-tracking branch 'origin/merge-requests/267'Morten Linderud
* origin/merge-requests/267: install/autodetect: match non-empty tokens install/autodetect: match on both MODALIAS and DRIVER install/autodetect: deduplicate the detected modules list install/autodetect: use sed for MODALIAS processing install/autodetect: move auto_modules() where it's used install/autodetect: pass the kernel version to modprobe
2023-10-19install/block: include regulator modules Felix Yan
The Linux voltage and current regulator modules are needed to initialize some MMC controllers properly. Let's include them in the fallback initramfs. 768K in size on x86_64.
2023-10-16install/autodetect: match non-empty tokensEmil Velikov
Original awk code was picking empty MODALIAS= lines. Seemingly some kernel modules produce an empty DRIVER= one as well. Match on non-empty ones. It makes no difference wrt the follow-up modprobe, although it's the sane thing to do. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14add_checked_modules_from_symbol: avoid double-lookupEmil Velikov
By using add_checked_modules() we get an extra lookup. On modern systems this isn't notable, but for low-end or devices with spinning disks this is rather notable. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14add_module_from_symbol: rework the APIEmil Velikov
Currently the API stands out as very inconsistent wrt the existing ones. Furthermore the documentation explicitly calls implementation details which is rarely a good idea. Rework it to align with add_all_modules/add_checked_modules. Namely: - use plural, we add module_s_ - drop the -c flag and use two separate functions v2: - use local -a mods Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14tests: add test case for kver_zimageXiaotian Wu
2023-10-14Get kernel version from generic EFI zboot image for bash completionXiaotian Wu
2023-10-14Get kernel version from generic EFI zboot imageXiaotian Wu
This feature was added to the kernel since 6.1 https://elixir.bootlin.com/linux/v6.1/source/drivers/firmware/efi/libstub/Makefile.zboot https://elixir.bootlin.com/linux/v6.1/source/drivers/firmware/efi/libstub/zboot-header.S See discussion [Here](https://lists.gnu.org/archive/html/grub-devel/2022-12/msg00099.html)
2023-10-14install/autodetect: match on both MODALIAS and DRIVEREmil Velikov
There are a handful of drivers which may be loaded but are missing a MODALIAS entry, so match on both. For example: on a couple of unrelated instances people have reported that mkinitcpio is not adding the nvme driver to the initrd. As per "modinfo nvme" the driver fits this case perfectly. On my machine, this gets us from 54 unique modules to 62. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14install/autodetect: deduplicate the detected modules listEmil Velikov
Multiple MODALIAS entries can be backed by a single driver. On my machine, we get from 89 total entries, to a 54 unique ones. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14install/autodetect: use sed for MODALIAS processingEmil Velikov
Currently we do a double-stage processing - once with awk then a second during expansion, dropping the MODALIAS= prefix. Just use sed instead, which trivially allows to do both. This will make a few further changes much easier. v2: - ' quote literals Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14install/autodetect: move auto_modules() where it's usedEmil Velikov
Move the function from the functions file to it's only user the autodetect hook. There's no API break since the function was never part of it - see mkinitcpio.8.adoc. While here, we no longer need to pass KERNELVERSION as an argument. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-14install/autodetect: pass the kernel version to modprobeEmil Velikov
Without the -S $KERNELVERSION we end pulling the module details for the currently running kernel - not the one we're building initrd for. While here, drop the stderr redirection and use the -q flag. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-11mkinitcpio: try to determine the UEFI architecturenl6720
Use systemd-stub of the appropriate architecture. The system may have multiple `linux*.efi.stub` files available, but only one of them will actually boot on the system. Also detect when a 64-bit x86_64 system has a 32-bit IA32 UEFI and use the IA32 stub accordingly.
2023-10-04Merge remote-tracking branch 'origin/merge-requests/264'nl6720
By Felix Yan * origin/merge-requests/264: install/block: include pci controller modules See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/264
2023-10-02install/block: include pci controller modulesFelix Yan
Fixes virtio-blk devices attached to PCI on QEMU (which is the case for libvirt), and possibly also hyperv. Only 38K in size on x86_64, shouldn't be a problem to add :) Supersedes the particular mention of `vmd` module because it's also inside this folder.
2023-09-19Merge remote-tracking branch 'origin/merge-requests/260'nl6720
By classabbyamp * origin/merge-requests/260: functions: fix unhelpful error for binary not found on PATH See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/260
2023-09-17functions: fix unhelpful error for binary not found on PATHclassabbyamp
with the config: ``` BINARIES=(nonexistant /usr/bin/nonexistant) ``` before: ``` ==> ERROR: file not found: '' ==> ERROR: file not found: '/usr/bin/nonexistant' ``` after: ``` ==> ERROR: binary not found: 'nonexistant' ==> ERROR: file not found: '/usr/bin/nonexistant' ```
2023-09-17Merge remote-tracking branch 'origin/merge-requests/259'nl6720
By classabbyamp * origin/merge-requests/259: install/consolefont: include setfont binary See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/259
2023-09-13install/consolefont: include setfont binaryclassabbyamp
if not using the sd-vconsole hook (like on Void Linux, where there is no systemd), setfont is not available unless manually added to BINARIES. This also ensures this hook is fully modular and does not rely on other hooks to work.
2023-09-13Merge remote-tracking branch 'origin/merge-requests/258'nl6720
By Felix Yan * origin/merge-requests/258: Correct typos in mkinitcpio See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/258
2023-09-11Correct typos in mkinitcpioFelix Yan
2023-09-09Merge remote-tracking branch 'origin/merge-requests/248'Morten Linderud
* origin/merge-requests/248: reduce list of microcode file names to necessary ones Split micrcode detection to separate plugin.
2023-09-09Merge remote-tracking branch 'origin/merge-requests/256'Morten Linderud
* origin/merge-requests/256: Ensure initrd is rebuilt when dkms module is updated . We trigger on the modules dkms.conf. See suggestions by @nl6720: https://gitlab.archlinux.org/archlinux/packaging/packages/dkms/-/blob/main/hook.install#L5 https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/200
2023-08-30Ensure initrd is rebuilt when dkms module is updated .Gene C
We trigger on the modules dkms.conf. See suggestions by @nl6720: https://gitlab.archlinux.org/archlinux/packaging/packages/dkms/-/blob/main/hook.install#L5 https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/200
2023-08-12Merge remote-tracking branch 'origin/merge-requests/255'Morten Linderud
* origin/merge-requests/255: Fix for FS#65148, consolefont hook does not change font with a quiet boot
2023-08-11Fix for FS#65148, consolefont hook does not change font with a quiet bootsolsTiCe d'Hiver
This is a work-around that displays a character on screen and delete it, right away, to activate the screen somehow
2023-08-11install/{keymap,sd-vconsole}: replace "kernel" with "@kernel"nl6720
systemd changed the magic string to keep the kernel's default keymap from "kernel" to "@kernel" to avoid namespace issues. See https://github.com/systemd/systemd/commit/bf77d59772722e96508df91bd24e1b6940b3edfb Fixes: b0c109f1f3f936eeba395a7c9598a7d280df0323 ("/install/{keymap,sd-vconsole}: do not fail on KEYMAP=kernel")
2023-08-08functions: return succesfully if add_module_from_symbol has no modules to addnl6720
Instead, fail if no modules with the matching criteria are found. Fixes: f90ed9b0df08f9e75ec08ddb9301174c8996f59c ("Add optional -c flag to add_module_from_symbol to use add_checked_modules")
2023-08-08install/kms: use the -c option of add_module_from_symbolnl6720
This avoids adding unnecessary modules to the image when using the autodetect hook.
2023-08-08Add optional -c flag to add_module_from_symbol to use add_checked_modulesnl6720
This allows for it to work together with the autodetect hook. Update and fix the man page. Implements #193
2023-08-08Merge remote-tracking branch 'origin/merge-requests/247'nl6720
By Damon Harris * origin/merge-requests/247: Remove `/usr/local` from sane PATH See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/247
2023-08-06Merge remote-tracking branch 'origin/merge-requests/249'Morten Linderud
* origin/merge-requests/249: Support symlinks in cmdline.d too Allow symlinks for drop-in .conf files
2023-08-05reduce list of microcode file names to necessary onescvlc12
2023-08-05Split micrcode detection to separate plugin.cvlc12
Always copy microcode to the staging are as 'microcode*'. indentation
2023-08-05/install/{keymap,sd-vconsole}: do not fail on KEYMAP=kernelnl6720
systemd-vconsole-setup added support for KEYMAP=kernel which perserves the kernel keymap. Make sure the keymap and sd-vconsole hooks do not fail by trying to literally add a keymap with the name "kernel". See https://github.com/systemd/systemd/commit/ef7f5baae8224960f78651e8a3cf4c1f1b870a31
2023-08-02install/sd-vconsole: include the us keymap if KEYMAP is not setnl6720
If KEYMAP is not set in /etc/vconsole.conf, systemd-vconsole-setup will fall back to the "us" keymap. Ensure a keymap file is included in initramfs to prevent systemd-vconsole-setup.service from failing.
2023-07-28Merge remote-tracking branch 'origin/merge-requests/250'nl6720
By Gene C * origin/merge-requests/250: Ensure initrd is rebuilt when firmware is updated. Addresses issue #197 See merge request https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/250
2023-07-10Ensure initrd is rebuilt when firmware is updated.Gene C
Addresses issue #197
2023-07-09Support symlinks in cmdline.d tooLeo Pham
2023-06-26Allow symlinks for drop-in .conf filesLeo Pham