############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config VER = ipfire THISAPP = initrd DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) ############################################################################### # Top-level Rules ############################################################################### install : $(TARGET) check : download : md5 : ############################################################################### # Installation Details ############################################################################### $(TARGET) : @$(PREBUILD) rm -f /install/images/initrd # Finish up initrd directory -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} cd /install/initrd && lzma -d -c /boot/ipfirerd-$(KVER).img | cpio -i # Copy Files packages for installer find $(DIR_SRC)/config/rootfiles/installer/* -maxdepth 1 | xargs cat | grep -v "^#" > /tmp/ROOTFILES -cd / && cpio -d -p /install/initrd < /tmp/ROOTFILES cd /install/initrd/etc && rm -f fstab cp -aRf $(DIR_SRC)/config/install/* /install/initrd/etc/ rm -rf /install/initrd/usr/share/man chmod 755 /install/initrd/etc/halt /install/initrd/etc/rc_installer cd /install/initrd/ && patch -Np0 < $(DIR_SRC)/src/patches/dracut-init_start_ipfireinstaller.patch # make new dependencies depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire -mkdir -p /install/{images,mnt} rm -rf /install/mnt/* cp -aR /install/initrd/* /install/mnt # Remove binary depmod files rm -rf /install/initrd/lib/modules/$(KVER)-ipfire/modules.*.bin cd /install/initrd && find . | cpio -o -H newc | lzma > /install/images/initrd cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log @$(POSTBUILD)