]>
Commit | Line | Data |
---|---|---|
2258f00e | 1 | #!/bin/bash |
2258f00e | 2 | |
8bcfd683 | 3 | # called by dracut |
2258f00e | 4 | check() { |
8a3c4957 | 5 | return 255 |
2258f00e DY |
6 | } |
7 | ||
8bcfd683 | 8 | # called by dracut |
2258f00e DY |
9 | depends() { |
10 | return 0 | |
11 | } | |
12 | ||
8bcfd683 | 13 | # called by dracut |
2258f00e DY |
14 | installkernel() { |
15 | local _modname | |
16 | # Include KMS capable drm drivers | |
17 | ||
49fe860b NC |
18 | if [[ "$(uname -p)" == arm* ]]; then |
19 | # arm specific modules needed by drm | |
20 | instmods \ | |
21 | "=drivers/gpu/drm/i2c" \ | |
22 | "=drivers/gpu/drm/panel" \ | |
23 | "=drivers/pwm" \ | |
24 | "=drivers/video/backlight" \ | |
25 | "=drivers/video/fbdev/omap2/displays-new" \ | |
26 | ${NULL} | |
27 | fi | |
28 | ||
81b67232 | 29 | instmods amdkfd hyperv_fb |
a3e464ca | 30 | |
794b2d2c HH |
31 | # if the hardware is present, include module even if it is not currently loaded, |
32 | # as we could e.g. be in the installer; nokmsboot boot parameter will disable | |
33 | # loading of the driver if needed | |
34 | if [[ $hostonly ]]; then | |
35 | for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do | |
36 | [[ -e $i ]] || continue | |
37 | if hostonly="" dracut_instmods -s "drm_crtc_init" $(<$i) 2>/dev/null; then | |
38 | if strstr $(modinfo -F filename $(<$i) 2>/dev/null) radeon.ko; then | |
39 | hostonly='' instmods amdkfd | |
40 | fi | |
a3e464ca | 41 | fi |
794b2d2c HH |
42 | done |
43 | else | |
44 | dracut_instmods -s "drm_crtc_init" "=drivers/gpu/drm" | |
45 | fi | |
2258f00e | 46 | } |