]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/driver.img
HinzugefĆ¼gt:
[people/pmueller/ipfire-2.x.git] / lfs / driver.img
1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
3 # #
4 # IPCop is free software; you can redistribute it and/or modify #
5 # it under the terms of the GNU General Public License as published by #
6 # the Free Software Foundation; either version 2 of the License, or #
7 # (at your option) any later version. #
8 # #
9 # IPCop is distributed in the hope that it will be useful, #
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 # GNU General Public License for more details. #
13 # #
14 # You should have received a copy of the GNU General Public License #
15 # along with IPCop; if not, write to the Free Software #
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17 # #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20 # #
21 # Modifications by: #
22 # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23 # - Modified Makefile for IPCop build #
24 # #
25 # $Id: driver.img,v 1.24.2.7 2006/01/29 20:17:30 franck78 Exp $
26 # #
27 ###############################################################################
28
29 ###############################################################################
30 # Definitions
31 ###############################################################################
32
33 include Config
34
35 THISAPP = driver-$(VERSION).img
36 TARGET = $(DIR_INFO)/$(THISAPP)
37
38 ###############################################################################
39 # Top-level Rules
40 ###############################################################################
41
42 install : $(TARGET)
43
44 check :
45
46 download :
47
48 md5 :
49
50 ###############################################################################
51 # Installation Details
52 ###############################################################################
53
54 $(TARGET) :
55 @$(PREBUILD)
56 -strip --strip-all /install/misc/bin/*
57
58 # make new dependencies
59 depmod -a -F /boot/System.map-$(KVER) $(KVER)
60 if [ "$(MACHINE)" = "i386" ]; then \
61 depmod -a -F /boot/System.map-$(KVER)-smp $(KVER)-smp; \
62 fi
63
64 # Create drivers floppy
65 cd /tmp && rm -rf drivers.tgz drivers.tar bin lib etc var
66 cd / && tar -cf /tmp/drivers.tar \
67 --exclude='lib/modules/$(KVER)/kernel/drivers/acpi/*' \
68 --exclude='lib/modules/$(KVER)/kernel/drivers/block/*' \
69 --exclude='lib/modules/$(KVER)/kernel/drivers/char/*' \
70 --exclude='lib/modules/$(KVER)/kernel/drivers/ide/*' \
71 --exclude='lib/modules/$(KVER)/kernel/drivers/isdn/*' \
72 --exclude='lib/modules/$(KVER)/kernel/drivers/net/ppp*' \
73 --exclude='lib/modules/$(KVER)/kernel/drivers/net/slip*' \
74 --exclude='lib/modules/$(KVER)/kernel/drivers/net/slhc*' \
75 --exclude='lib/modules/$(KVER)/kernel/drivers/net/tun*' \
76 --exclude='lib/modules/$(KVER)/kernel/drivers/net/imq*' \
77 --exclude='lib/modules/$(KVER)/kernel/drivers/net/wireless/*' \
78 --exclude='lib/modules/$(KVER)/kernel/drivers/parport/*' \
79 --exclude='lib/modules/$(KVER)/kernel/drivers/scsi/*' \
80 --exclude='lib/modules/$(KVER)/kernel/drivers/message/*' \
81 --exclude='lib/modules/$(KVER)/kernel/drivers/input/*' \
82 --exclude='lib/modules/$(KVER)/kernel/drivers/usb/storage/*' \
83 --exclude='lib/modules/$(KVER)/kernel/drivers/usb/host/*' \
84 --exclude='lib/modules/$(KVER)/kernel/arch/*' \
85 --exclude='lib/modules/$(KVER)/kernel/fs/*' \
86 --exclude='lib/modules/$(KVER)/kernel/net/atm/*' \
87 --exclude='lib/modules/$(KVER)/kernel/net/bridge/*' \
88 --exclude='lib/modules/$(KVER)/kernel/net/ipsec/*' \
89 --exclude='lib/modules/$(KVER)/kernel/net/ipv4/*' \
90 --exclude='lib/modules/$(KVER)/kernel/net/sched/*' \
91 --exclude='lib/modules/$(KVER)/*map' \
92 --exclude='lib/modules/$(KVER)/misc/*' \
93 --exclude='lib/modules/$(KVER)/extra/*' \
94 --exclude='lib/modules/$(KVER)/pcmcia/*' \
95 --exclude='lib/modules/$(KVER)/build' \
96 --exclude='lib/modules/$(KVER)/kernel/drivers/atm/*' \
97 --exclude=lib/modules/$(KVER)/kernel/drivers/usb/{3cp4218.o.gz,acm.o.gz,amedyn.o.gz,cxacru.o.gz,speedtch.o.gz,hid.o.gz,usbcore.o.gz} \
98 --exclude='lib/modules/$(KVER)/modules.*' \
99 lib/modules/$(KVER)
100 cd /tmp && tar xf drivers.tar
101 cd /tmp && mkdir -p {bin,etc/pcmcia,var/lib/pcmcia,var/run}
102 cd /tmp && cp -aR /install/misc/bin/* bin
103 cd /tmp && cp -r /etc/pcmcia/{config*,net*} etc/pcmcia
104 # cardmgr wants to execute these to bring up the card, we'll
105 # create blank ones as we'll bring them up ourselves
106 cd /tmp/etc/pcmcia && rm -f network
107 cd /tmp/etc/pcmcia && touch network
108 cd /tmp/etc/pcmcia && chmod +x network
109 cd /tmp && tar -cf - bin/ etc/pcmcia var lib/modules/$(KVER) | gzip -9 -c > drivers.tgz
110
111 if [ "$(MACHINE)" = "alpha" ]; then \
112 cp /tmp/drivers.tgz /install/images/drivers-$(VERSION).img; \
113 else \
114 dd if=/tmp/drivers.tgz of=/install/images/drivers-$(VERSION).img bs=1440k count=1 conv=sync; \
115 fi
116 rm -rf /tmp/drivers.tgz /tmp/drivers.tar /tmp/bin /tmp/lib
117
118 ### If this fails, the disk is TOO FULL !!!!
119 tar tzf /install/images/drivers-$(VERSION).img >/dev/null 2>&1
120
121 @$(POSTBUILD)