Zum Test alle Kernelmodule in das Installationssystem getan.
[people/pmueller/ipfire-2.x.git] / lfs / initrd
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 ###############################################################################
22
23 ###############################################################################
24 # Definitions
25 ###############################################################################
26
27 include Config
28
29 VER = ipfire
30
31 THISAPP = initrd
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
34
35 ###############################################################################
36 # Top-level Rules
37 ###############################################################################
38
39 install : $(TARGET)
40
41 check :
42
43 download :
44
45 md5 :
46
47 ###############################################################################
48 # Installation Details
49 ###############################################################################
50
51 $(TARGET) :
52 @$(PREBUILD)
53 rm -f /install/images/initrd
54
55 # Finish up initrd directory
56 -mkdir -p /install/initrd/{dev,etc,mnt,root,lib/modules/$(KVER)-ipfire/kernel/drivers,cdrom,dev,harddisk,proc,tmp,usr/share/terminfo/l,var/run,sys} && \
57 cd /install/initrd/etc && rm -f fstab
58 cp -aRf $(DIR_SRC)/config/install/* /install/initrd/etc/
59 rm -rf /install/initrd/etc{,/udev,/udev/rules.d}/.svn
60 rm -rf /install/initrd/usr/share/man
61 chmod 755 /install/initrd/etc/halt /install/initrd/etc/rc
62 cp -f /usr/share/terminfo/l/linux /install/initrd/usr/share/terminfo/l
63
64 # make new dependencies
65 depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
66 depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp
67
68 cp -a /lib/modules/$(KVER)-ipfire/ /install/initrd/lib/modules/
69 rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/{build,source} \
70 /install/initrd/lib/modules/$(KVER)-ipfire/kernel/drivers/message/fusion/mptlan*
71
72 cp /opt/$(MACHINE)-uClibc/lib/libgcc_s.so.1 /install/initrd/lib/
73
74 cd /install/initrd/lib/ && ln -sf libgcc_s.so.1 libgcc_s.so
75
76 -mkdir -p /install/{images,mnt}
77 rm -rf /install/mnt/*
78
79 cp -aR /install/initrd/* /install/mnt
80
81 # make new dependencies
82 depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
83
84 mksquashfs /install/initrd /install/images/initrd
85 cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log
86
87 @$(POSTBUILD)