00-modules.sh 626 Bytes
Newer Older
Your Name's avatar
Your Name committed
1 2 3
#!/bin/bash
[ ! -n "$KERNELVER"  ] && KERNELVER=$(uname -r)
[ ! -n "$MODDIR"  ] && MODDIR=/lib/modules/${KERNELVER}
4 5 6 7
[ -d $MODDIR ] || err "Module directory not found  -> $MODDIR"

debug "Kernel Version: ${KERNELVER}"
debug "Module Directory: ${MODDIR}"
Your Name's avatar
Your Name committed
8
mkdir -p ${WORKDIR}/${MODDIR}
9
debug "Install: main modules"
Your Name's avatar
Your Name committed
10
cp -prf ${MODDIR}/kernel/{crypto,fs,lib} ${WORKDIR}/${MODDIR}
11
debug "Install: drivers"
Your Name's avatar
Your Name committed
12 13 14
cp -prf ${MODDIR}/kernel/drivers/{block,ata,md,firewire} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/{scsi,pcmcia,virtio} ${WORKDIR}/${MODDIR}
cp -prf ${MODDIR}/kernel/drivers/usb/{host,storage} ${WORKDIR}/${MODDIR}