move init,kms and keyboard to archboot_modules_common

This commit is contained in:
Tobias Powalowski 2023-04-26 07:19:41 +02:00
parent 81cb7f31aa
commit 8fcdb860a3
15 changed files with 55 additions and 53 deletions

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_init) HOOKS=(archboot_firmware_kms archboot_modules_common archboot_init)
# COMPRESSION # COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression # Use this to compress the initramfs image. By default, gzip compression

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_base_common archboot_base_latest archboot_installer_common \ HOOKS=(archboot_firmware_kms archboot_modules_common archboot_base_common archboot_base_latest archboot_installer_common \
archboot_net_common archboot_remote archboot_kexec archboot_licenses) archboot_net_common archboot_remote archboot_kexec archboot_licenses)
# COMPRESSION # COMPRESSION

View file

@ -6,8 +6,9 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_base_common archboot_base_latest \ HOOKS=(archboot_firmware_kms archboot_modules_common archboot_base_common \
archboot_installer_common archboot_kexec archboot_licenses archboot_cache) archboot_base_latest archboot_installer_common archboot_kexec archboot_licenses \
archboot_cache)
# COMPRESSION # COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression # Use this to compress the initramfs image. By default, gzip compression

View file

@ -8,9 +8,9 @@
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \ HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \
archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \ archboot_modules_common archboot_base_common archboot_base_common_cleanup archboot_base \
archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \ archboot_base_cleanup archboot_filesystems archboot_filesystems_cleanup archboot_net \
archboot_acpi archboot_cpufreq \ archboot_net_cleanup archboot_acpi archboot_cpufreq \
archboot_devicemapper archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \ archboot_devicemapper archboot_hypervisor archboot_net_common archboot_platform archboot_wireless \
archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \ archboot_wireless_staging archboot_installer_common archboot_installer archboot_installer_cleanup \
archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm \ archboot_tz archboot_keymap archboot_motd archboot_hwdetect archboot_mdadm \

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware archboot_base_common archboot_base \ HOOKS=(archboot_firmware archboot_modules_common archboot_base_common archboot_base \
archboot_installer_common archboot_installer archboot_tz archboot_keymap \ archboot_installer_common archboot_installer archboot_tz archboot_keymap \
archboot_acpi archboot_motd archboot_hwdetect archboot_net_common \ archboot_acpi archboot_motd archboot_hwdetect archboot_net_common \
archboot_net archboot_devicemapper archboot_mdadm \ archboot_net archboot_devicemapper archboot_mdadm \

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(kms archboot_init) HOOKS=(rchboot_firmware_kms archboot_modules_common archboot_init)
# COMPRESSION # COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression # Use this to compress the initramfs image. By default, gzip compression

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware archboot_base_common archboot_base \ HOOKS=(archboot_firmware archboot_modules_common archboot_base_common archboot_base \
archboot_installer_common archboot_installer archboot_tz archboot_keymap \ archboot_installer_common archboot_installer archboot_tz archboot_keymap \
archboot_acpi archboot_motd archboot_hwdetect archboot_net_common \ archboot_acpi archboot_motd archboot_hwdetect archboot_net_common \
archboot_net archboot_devicemapper archboot_mdadm \ archboot_net archboot_devicemapper archboot_mdadm \

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_init) HOOKS=(archboot_firmware_kms archboot_modules_common archboot_init)
# COMPRESSION # COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression # Use this to compress the initramfs image. By default, gzip compression

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_base_common archboot_base_latest \ HOOKS=(archboot_firmware_kms archboot_modules_common archboot_base_common archboot_base_latest \
archboot_installer_common archboot_net_common archboot_remote archboot_kexec archboot_licenses) archboot_installer_common archboot_net_common archboot_remote archboot_kexec archboot_licenses)
# COMPRESSION # COMPRESSION

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware_kms archboot_base_common archboot_base_latest \ HOOKS=(archboot_firmware_kms archboot_modules_common archboot_base_common archboot_base_latest \
archboot_installer_common archboot_kexec archboot_licenses archboot_cache) archboot_installer_common archboot_kexec archboot_licenses archboot_cache)
# COMPRESSION # COMPRESSION

View file

@ -7,9 +7,9 @@
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \ HOOKS=(archboot_cache archboot_cache_cleanup archboot_firmware archboot_firmware_cleanup \
archboot_base_common archboot_base_common_cleanup archboot_base archboot_base_cleanup \ archboot_modules_common archboot_base_common archboot_base_common_cleanup archboot_base \
archboot_filesystems archboot_filesystems_cleanup archboot_net archboot_net_cleanup \ archboot_base_cleanup archboot_filesystems archboot_filesystems_cleanup archboot_net \
lvm2 archboot_acpi archboot_cpufreq \ archboot_net_cleanup lvm2 archboot_acpi archboot_cpufreq \
archboot_devicemapper archboot_pcspkr archboot_hypervisor archboot_net_common \ archboot_devicemapper archboot_pcspkr archboot_hypervisor archboot_net_common \
archboot_dmidecode archboot_platform archboot_wireless archboot_wireless_staging \ archboot_dmidecode archboot_platform archboot_wireless archboot_wireless_staging \
archboot_installer_common archboot_installer archboot_installer_cleanup archboot_tz \ archboot_installer_common archboot_installer archboot_installer_cleanup archboot_tz \

View file

@ -6,7 +6,7 @@
# SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported! # SETUP archboot-cpio.sh parameters, other mkinitcpio parameters are not supported!
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS=(archboot_firmware archboot_base_common archboot_base \ HOOKS=(archboot_firmware archboot_modules_common archboot_base_common archboot_base \
archboot_installer_common archboot_installer archboot_tz archboot_keymap archboot_installer_common archboot_installer archboot_tz archboot_keymap
archboot_acpi archboot_motd archboot_hwdetect archboot_pcspkr \ archboot_acpi archboot_motd archboot_hwdetect archboot_pcspkr \
archboot_net_common archboot_net archboot_devicemapper archboot_mdadm \ archboot_net_common archboot_net archboot_devicemapper archboot_mdadm \

View file

@ -4,23 +4,6 @@
build () build ()
{ {
### kmx modules
# AGP and DRM modules for GPUs
map add_all_modules '/drivers/char/agp/' '/drivers/gpu/drm/'
# modules that implement the privacy screen interface
# TODO: Replace with dynamic lookup of modules that depend on the drm_privacy_screen_register symbol
# See https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/132
map add_all_modules 'chromeos_privacy_screen?' 'thinkpad_acpi?'
### keyboard modules
add_all_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'
add_all_modules '/hid/hid'
add_module 'usbhid'
add_all_modules '/input/(serio|keyboard)'
### add init modules
map add_module virtio? zram? btrfs? zstd? libcrc32c?
### setting up base structure ### setting up base structure
map add_dir "/root" "/mnt" "/sysroot" "/install" "/var/log" "/home" "/var/tmp" map add_dir "/root" "/mnt" "/sysroot" "/install" "/var/log" "/home" "/var/tmp"

View file

@ -3,25 +3,6 @@
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
build() { build() {
map add_module sd_mod? sr_mod? usb_storage? mmc_block? virtio_blk? vfat? \
btrfs? zram? iso9660? loop? zstd? nls_cp437? nls_ascii? libcrc32c? cdrom?
# pata, sata, scsi, nvme, usb, mmc, spi (for mmc mode), virtio
map add_all_modules 'scsi/.*ata' '/(block|scsi|fusion|nvme)/' 'ata/[ps]ata_' \
'ata/(ahci|pdc_adma|ata_piix|ata_generic)' '(_cs|sl811_hcd|isp116x_hcd)' \
'/usb/host' '/drivers/usb/storage/' '/(drivers/mmc|tifm_)' \
'/drivers/spi/' 'virtio'
### keyboard modules
add_all_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'
add_all_modules '/hid/hid'
add_module 'usbhid'
add_all_modules '/input/(serio|keyboard)'
### kmx modules
# AGP and DRM modules for GPUs
map add_all_modules '/drivers/char/agp/' '/drivers/gpu/drm/'
# modules that implement the privacy screen interface
# TODO: Replace with dynamic lookup of modules that depend on the drm_privacy_screen_register symbol
# See https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/132
map add_all_modules 'chromeos_privacy_screen?' 'thinkpad_acpi?'
map add_binary bash sh blkid mount switch_root bsdcpio mkfs.btrfs setfont \ map add_binary bash sh blkid mount switch_root bsdcpio mkfs.btrfs setfont \
/usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \ /usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \
gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod cut sed find gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod cut sed find

View file

@ -0,0 +1,37 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
{
### init modules
map add_module sd_mod? sr_mod? usb_storage? mmc_block? virtio_blk? vfat? \
btrfs? zram? iso9660? loop? zstd? nls_cp437? nls_ascii? libcrc32c? cdrom?
### pata, sata, scsi, nvme, usb, mmc, spi (for mmc mode), virtio
map add_all_modules 'scsi/.*ata' '/(block|scsi|fusion|nvme)/' 'ata/[ps]ata_' \
'ata/(ahci|pdc_adma|ata_piix|ata_generic)' '(_cs|sl811_hcd|isp116x_hcd)' \
'/usb/host' '/drivers/usb/storage/' '/(drivers/mmc|tifm_)' \
'/drivers/spi/' 'virtio'
### keyboard modules
add_all_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'
add_all_modules '/hid/hid'
add_module 'usbhid'
add_all_modules '/input/(serio|keyboard)'
### kmx modules
# AGP and DRM modules for GPUs
map add_all_modules '/drivers/char/agp/' '/drivers/gpu/drm/'
# modules that implement the privacy screen interface
# TODO: Replace with dynamic lookup of modules that depend on the drm_privacy_screen_register symbol
# See https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/issues/132
map add_all_modules 'chromeos_privacy_screen?' 'thinkpad_acpi?'
}
help ()
{
cat <<HELPEOF
This hook includes init, kms and keyboard support
for an archboot image.
DO NOT remove this one unless you know what you're doing.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et: