diff options
author | Jonathan Bauer | 2019-04-12 16:20:20 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-04-12 16:20:20 +0200 |
commit | 65a9cf03e935b33d7ee24853e204b47fd8b1581b (patch) | |
tree | 0fdabf982374de5e9ccb8caf99ef79e8154c13ee /core/rootfs/rootfs-stage31/data | |
parent | [bwlp] add safe-mode (diff) | |
parent | [kexec-reboot] Let systemd-shutdown trigger final kexec (diff) | |
download | mltk-65a9cf03e935b33d7ee24853e204b47fd8b1581b.tar.gz mltk-65a9cf03e935b33d7ee24853e204b47fd8b1581b.tar.xz mltk-65a9cf03e935b33d7ee24853e204b47fd8b1581b.zip |
Merge branch 'master' into installer
Diffstat (limited to 'core/rootfs/rootfs-stage31/data')
-rw-r--r-- | core/rootfs/rootfs-stage31/data/etc/modules | 66 | ||||
-rwxr-xr-x | core/rootfs/rootfs-stage31/data/init | 4 | ||||
-rwxr-xr-x | core/rootfs/rootfs-stage31/data/sbin/hotplug | 26 |
3 files changed, 30 insertions, 66 deletions
diff --git a/core/rootfs/rootfs-stage31/data/etc/modules b/core/rootfs/rootfs-stage31/data/etc/modules index e728c600..4b8c2482 100644 --- a/core/rootfs/rootfs-stage31/data/etc/modules +++ b/core/rootfs/rootfs-stage31/data/etc/modules @@ -1,68 +1,2 @@ -8139cp -8139too -acenic -adp8860_bl -adp8870_bl -atl1 -atl1c -atl1e -atl2 -atp -b44 -bna -bnx2 -bnx2x -cnic -cxgb -cxgb3 -cxgb4 -cxgb4vf -de2104x -dl2k -dmfe -dnet -e100 -e1000 -e1000e -forcedeth -hid-generic -hp100 -igb -igbvf -ipg -ixgb -ixgbe -ixgbevf -jme -ksz884x -myri10ge -nbd -ne2k-pci parport -pcnet32 -qla3xxx -qlge -r6040 -r8169 -s2io -sc92031 -sfc -sis190 -sis900 -skge -sky2 -smsc9420 squashfs -sunhme -tg3 -tlan -tulip -typhoon -uli526x -usbhid -via-rhine -via-velocity -vmxnet3 -vxge -xfs -xircom_cb diff --git a/core/rootfs/rootfs-stage31/data/init b/core/rootfs/rootfs-stage31/data/init index 56516bcf..8fadf915 100755 --- a/core/rootfs/rootfs-stage31/data/init +++ b/core/rootfs/rootfs-stage31/data/init @@ -34,8 +34,12 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/openslx/bin:/opt/openslx/sbin # mount the important standard directories mkdir -p /tmp /proc /sys /dev /run [ ! -f /proc/cpuinfo ] && busybox mount -n -t proc proc /proc +echo "/sbin/hotplug" > "/proc/sys/kernel/hotplug" bench_event "KERNEL" "Kernel initialized" [ ! -d /sys/class ] && busybox mount -n -t sysfs sysfs /sys +for id in $( cat /sys/devices/pci*/*/modalias ); do + ACTION=add MODALIAS=$id /sbin/hotplug +done & # NOTE: busybox mount is only available through the busybox binary, # the link had to be dropped, to prevent bugs in the stage32. diff --git a/core/rootfs/rootfs-stage31/data/sbin/hotplug b/core/rootfs/rootfs-stage31/data/sbin/hotplug new file mode 100755 index 00000000..260b7782 --- /dev/null +++ b/core/rootfs/rootfs-stage31/data/sbin/hotplug @@ -0,0 +1,26 @@ +#!/bin/ash + +if [ -n "$FIRMWARE" ] && [ "$SUBSYSTEM" = "firmware" ] && [ -n "$DEVPATH" ] && [ -e "/sys/$DEVPATH/data" ]; then + echo "Kernel requests firmware $FIRMWARE" > "/dev/kmsg" + printf "1" > "/sys/$DEVPATH/loading" + if cat "/lib/firmware/$FIRMWARE" > "/sys/$DEVPATH/data" \ + || cat "/lib/firmware/$(uname -r)/$FIRMWARE" > "/sys/$DEVPATH/data"; then + printf "0" > "/sys/$DEVPATH/loading" + else + printf "%s" "-1" "/sys/$DEVPATH/loading" + fi +fi + +[ "$ACTION" != "add" ] && exit 0 + +[ -z "$MODALIAS" ] && exit 0 + +[ "${MODALIAS:0:5}" != "pci:v" ] && exit 0 # Ignore everything but PCI devices + +ID="${MODALIAS:9:4}:${MODALIAS:18:4}" + +LINE="$( lspci -n | grep -oEi "[0-9]{4}: $ID" | cut -c1-2 )" +[ "$LINE" = "03" ] && exit 0 # Skip GFX, handled by other module + +modprobe "$MODALIAS" + |