1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
30 DIR_APP = $(DIR_SRC)/$(THISAPP)
31 TARGET = $(DIR_INFO)/$(THISAPP)
33 ###############################################################################
35 ###############################################################################
45 ###############################################################################
46 # Installation Details
47 ###############################################################################
51 rm -f /install/images/initrd
53 # Finish up initrd directory
54 -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}
55 cd /install/initrd && lzma -d -c /boot/ipfirerd-$(KVER).img | cpio -i
57 # Copy Files packages for installer
58 find $(DIR_SRC)/config/rootfiles/installer/* -maxdepth 1 | xargs cat | grep -v "^#" > /tmp/ROOTFILES
59 -cd / && cpio -d -p /install/initrd < /tmp/ROOTFILES
61 cd /install/initrd/etc && rm -f fstab
62 cp -aRf $(DIR_SRC)/config/install/* /install/initrd/etc/
63 rm -rf /install/initrd/usr/share/man
64 chmod 755 /install/initrd/etc/halt /install/initrd/etc/rc_installer
66 cd /install/initrd/ && patch -Np0 < $(DIR_SRC)/src/patches/dracut-init_start_ipfireinstaller.patch
68 # make new dependencies
69 depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire
71 -mkdir -p /install/{images,mnt}
74 cp -aR /install/initrd/* /install/mnt
76 # Remove binary depmod files
77 rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/modules.*.bin
79 cd /install/initrd && find . | cpio -o -H newc | lzma > /install/images/initrd
80 cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log