- depmod -a -F /boot/System.map-$(KVER) $(KVER)
- depmod -a -F /boot/System.map-$(KVER)-smp $(KVER)-smp
-
- cd / && tar -cvf /tmp/drivers.tar \
- --exclude=lib/modules/$(KVER)/kernel/{arch,fs} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/{acpi,atm,bluetooth,block,char,cdrom,hwmon,ide} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/{ieee1394,isdn,mmc,scsi,md,message,video} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/net/{wan,ppp*,slip*,slhc*,tun*,wireless} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/usb/{atm,input,storage,host} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/usb/{3cp4218.ko,acm.ko,amedyn.ko,cxacru.ko} \
- --exclude=lib/modules/$(KVER)/kernel/drivers/usb/{speedtch.ko,hid.ko,usbcore.ko,at76c50*.ko} \
- --exclude=lib/modules/$(KVER)/kernel/net/{8021q,atm,bluetooth,bridge,ieee80211,ipsec,ipv4} \
- --exclude=lib/modules/$(KVER)/kernel/net/{wanrouter,netfilter,sched} \
- --exclude=lib/modules/$(KVER)/{build,extra,misc,modules.*,source} \
- lib/modules/$(KVER)
- cd /install/initrd/ && tar -xvf /tmp/drivers.tar && rm -f /tmp/drivers.tar
-
- # Extra modules
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/drivers/scsi
- cp -f /lib/modules/$(KVER)/kernel/drivers/scsi/{scsi_mod.ko,sd_mod.ko,sr_mod.ko} \
- /install/initrd/lib/modules/$(KVER)/kernel/drivers/scsi/
-
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage
- cp -f /lib/modules/$(KVER)/kernel/drivers/usb/storage/*.ko \
- /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/storage/
-
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host
- cp -f /lib/modules/$(KVER)/kernel/drivers/usb/host/*.ko \
- /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/host
-
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/input
- cp -f /lib/modules/$(KVER)/kernel/drivers/usb/input/usbhid.ko \
- /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/input
-
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core
- cp -f /lib/modules/$(KVER)/kernel/drivers/usb/core/*.ko \
- /install/initrd/lib/modules/$(KVER)/kernel/drivers/usb/core
-
- # File system
- -mkdir -p /install/initrd/lib/modules/$(KVER)/kernel/fs
- cp -rf /lib/modules/$(KVER)/kernel/fs/* /install/initrd/lib/modules/$(KVER)/kernel/fs
-
- cp -f /lib/modules/$(KVER)/modules.* /install/initrd/lib/modules/$(KVER)
+ depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
+ #depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp
+
+ cp -a /lib/modules/$(KVER)-ipfire/ /install/initrd/lib/modules/
+
+ rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/{build,mISDN,source,misc/*,kernel/{sound,drivers/{acpi,bluetooth,cpufreq,hwmon,gpu,rtc,isdn,media,video,watchdog}}} \
+ /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/message/fusion/mptlan* \
+ /install/initrd/lib/modules/$(KVER)-ipfire/net/{bridge,netfilter,ipsec} \
+ /install/initrd/lib/modules/$(KVER)-ipfire/dahdi
+
+ # ... acpi/dock.ko is needed for libata
+# -mkdir -p /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/acpi
+# cp -a /lib/modules/$(KVER)-ipfire/kernel/drivers/acpi/dock.ko \
+# /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/acpi/dock.ko