]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/90kernel-modules/module-setup.sh
dracut: Add drivers/clk by default on arm
[thirdparty/dracut.git] / modules.d / 90kernel-modules / module-setup.sh
1 #!/bin/bash
2
3 # called by dracut
4 installkernel() {
5 local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma'
6
7 if [[ -z $drivers ]]; then
8 hostonly='' instmods \
9 sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
10 ehci-hcd ehci-pci ehci-platform \
11 ohci-hcd ohci-pci \
12 uhci-hcd \
13 xhci-hcd xhci-pci xhci-plat-hcd \
14 "=drivers/hid" \
15 "=drivers/input/serio" \
16 "=drivers/input/keyboard" \
17 "=drivers/usb/storage" \
18 ${NULL}
19
20 instmods \
21 yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
22 atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
23 virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
24 "=drivers/pcmcia" =ide
25
26 if [[ "$(uname -p)" == arm* ]]; then
27 # arm specific modules
28 instmods \
29 "=drivers/clk" \
30 "=drivers/i2c/busses" \
31 "=drivers/regulator" \
32 "=drivers/rtc" \
33 "=drivers/usb/host" \
34 "=drivers/usb/phy" \
35 ${NULL}
36 fi
37
38 dracut_instmods -o -s "${_blockfuncs}" "=drivers"
39
40 # if not on hostonly mode, install all known filesystems,
41 # if the required list is not set via the filesystems variable
42 if ! [[ $hostonly ]]; then
43 if [[ -z $filesystems ]]; then
44 dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
45 fi
46 else
47 hostonly='' instmods "${host_fs_types[@]}"
48 fi
49 fi
50 :
51 }
52
53 # called by dracut
54 install() {
55 inst_multiple -o /lib/modprobe.d/*.conf
56 [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf
57 if ! dracut_module_included "systemd"; then
58 inst_hook cmdline 01 "$moddir/parse-kernel.sh"
59 fi
60 inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
61 }