summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmake_slackware_live.sh42
-rw-r--r--upslak.sh42
2 files changed, 44 insertions, 40 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index b7f521e..9b8d339 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -200,7 +200,7 @@ SEQ_STUDW="tagfile:a,ap,d,e,f,k,kde,l,n,t,tcl,x,xap,xfce,y pkglist:slackextra,sl
KMODS=${KMODS:-"squashfs:overlay:loop:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:mmc-core:mmc-block:sdhci:sdhci-pci:sdhci-acpi:usb-storage:hid:usbhid:i2c-hid:hid-generic:hid-apple:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd:mbcache:ext3:ext4:isofs:fat:nls_cp437:nls_iso8859-1:msdos:vfat:ntfs"}
# Network kernel modules to include for NFS root support:
-NETMODS="kernel/drivers/net"
+NETMODS="kernel/drivers/net kernel/drivers/virtio"
# Network kernel modules to exclude from above list:
NETEXCL="appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb veth.ko wan wimax wireless xen-netback.ko"
@@ -2423,25 +2423,27 @@ if [ "$NFSROOTSUP" = "YES" ]; then
# We need to extract the full kernel-modules package for deps resolving:
tar -C ${KMODS_TEMP} -xf ${KMODS_PKG}
# Get the kernel modules:
- cd ${KMODS_TEMP}
- cp -a --parents lib/modules/${KVER}/${NETMODS} \
- ${LIVE_ROOTDIR}/boot/initrd-tree/
- cd - 1>/dev/null
- # Prune the ones we do not need:
- for KNETRM in ${NETEXCL} ; do
- find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODS} \
- -name $KNETRM -depth -exec rm -rf {} \;
- done
- # Add any dependency modules:
- for MODULE in $(find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODS} -type f -exec basename {} .ko \;) ; do
- /sbin/modprobe --dirname ${KMODS_TEMP} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
- if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
- cd ${KMODS_TEMP}
- # Need to strip ${KMODS_TEMP} from the start of ${SRCMOD}:
- cp -a --parents $(echo $SRCMOD |sed 's|'${KMODS_TEMP}'/|./|' ) \
- ${LIVE_ROOTDIR}/boot/initrd-tree/
- cd - 1>/dev/null
- fi
+ for NETMODPATH in ${NETMODS} ; do
+ cd ${KMODS_TEMP}
+ cp -a --parents lib/modules/${KVER}/${NETMODPATH} \
+ ${LIVE_ROOTDIR}/boot/initrd-tree/
+ cd - 1>/dev/null
+ # Prune the ones we do not need:
+ for KNETRM in ${NETEXCL} ; do
+ find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODPATH} \
+ -name $KNETRM -depth -exec rm -rf {} \;
+ done
+ # Add any dependency modules:
+ for MODULE in $(find ${LIVE_ROOTDIR}/boot/initrd-tree/lib/modules/${KVER}/${NETMODPATH} -type f -exec basename {} .ko \;) ; do
+ /sbin/modprobe --dirname ${KMODS_TEMP} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
+ if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
+ cd ${KMODS_TEMP}
+ # Need to strip ${KMODS_TEMP} from the start of ${SRCMOD}:
+ cp -a --parents $(echo $SRCMOD |sed 's|'${KMODS_TEMP}'/|./|' ) \
+ ${LIVE_ROOTDIR}/boot/initrd-tree/
+ cd - 1>/dev/null
+ fi
+ done
done
done
# Remove the temporary tree:
diff --git a/upslak.sh b/upslak.sh
index 92f549b..c1559df 100644
--- a/upslak.sh
+++ b/upslak.sh
@@ -134,7 +134,7 @@ COMPR="xz --check=crc32"
KMODS=${KMODS:-"squashfs:overlay:loop:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:mmc-core:mmc-block:sdhci:sdhci-pci:sdhci-acpi:usb-storage:hid:usbhid:i2c-hid:hid-generic:hid-apple:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd:mbcache:ext3:ext4:isofs:fat:nls_cp437:nls_iso8859-1:msdos:vfat:ntfs"}
# Network kernel modules to include for NFS root support:
-NETMODS="kernel/drivers/net"
+NETMODS="kernel/drivers/net kernel/drivers/virtio"
# Network kernel modules to exclude from above list:
NETEXCL="appletalk arcnet bonding can dummy.ko hamradio hippi ifb.ko irda macvlan.ko macvtap.ko pcmcia sb1000.ko team tokenring tun.ko usb veth.ko wan wimax wireless xen-netback.ko"
@@ -329,25 +329,27 @@ collect_kmods() {
# Do we have to add network support?
if [ $NETSUPPORT -eq 1 ]; then
# The initrd already contains dhcpcd so we just need to add kmods:
- cd ${KMODDIR}
- mkdir -p ${IMGDIR}/lib/modules/${KVER}
- cp -a --parents ${NETMODS} ${IMGDIR}/lib/modules/${KVER}/
- cd - 1>/dev/null
- # Prune the ones we do not need:
- for KNETRM in ${NETEXCL} ; do
- find ${IMGDIR}/lib/modules/${KVER}/${NETMODS} \
- -name $KNETRM -depth -exec rm -rf {} \;
- done
- # Add any dependency modules:
- for MODULE in $(find ${IMGDIR}/lib/modules/${KVER}/${NETMODS} -type f -exec basename {} .ko \;) ; do
- modprobe --dirname ${KMODDIR%%/lib/modules/${KVER}} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
- if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
- cd ${KMODDIR}
- # Need to strip ${KMODDIR} from the start of ${SRCMOD}:
- cp -a --parents $(echo $SRCMOD |sed 's|'${KMODDIR}'/|./|' ) \
- ${IMGDIR}/lib/modules/${KVER}/
- cd - 1>/dev/null
- fi
+ for NETMODPATH in ${NETMODS} ; do
+ cd ${KMODDIR}
+ mkdir -p ${IMGDIR}/lib/modules/${KVER}
+ cp -a --parents ${NETMODPATH} ${IMGDIR}/lib/modules/${KVER}/
+ cd - 1>/dev/null
+ # Prune the ones we do not need:
+ for KNETRM in ${NETEXCL} ; do
+ find ${IMGDIR}/lib/modules/${KVER}/${NETMODPATH} \
+ -name $KNETRM -depth -exec rm -rf {} \;
+ done
+ # Add any dependency modules:
+ for MODULE in $(find ${IMGDIR}/lib/modules/${KVER}/${NETMODPATH} -type f -exec basename {} .ko \;) ; do
+ modprobe --dirname ${KMODDIR%%/lib/modules/${KVER}} --set-version $KVER --show-depends --ignore-install $MODULE 2>/dev/null |grep "^insmod " |cut -f 2 -d ' ' |while read SRCMOD; do
+ if [ "$(basename $SRCMOD .ko)" != "$MODULE" ]; then
+ cd ${KMODDIR}
+ # Need to strip ${KMODDIR} from the start of ${SRCMOD}:
+ cp -a --parents $(echo $SRCMOD |sed 's|'${KMODDIR}'/|./|' ) \
+ ${IMGDIR}/lib/modules/${KVER}/
+ cd - 1>/dev/null
+ fi
+ done
done
done
fi