]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
fab611b3 | 4 | # Copyright (C) 2007-2013 IPFire Team <info@ipfire.org> # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 MT |
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. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
0fbb45e9 MT |
27 | VER = ipfire |
28 | ||
cd1a2927 | 29 | THISAPP = cdrom |
cd1a2927 MT |
30 | TARGET = $(DIR_INFO)/$(THISAPP) |
31 | ||
5f52a956 MT |
32 | ifeq "$(MACHINE_TYPE)" "arm" |
33 | TAR_OPTIONS = | |
34 | else | |
35 | TAR_OPTIONS = --lzma | |
36 | endif | |
37 | ||
38 | ISO_ARGS = -J -r -v \ | |
39 | -A "$(NAME) $(VERSION)" \ | |
40 | -V "$(NAME)_$(VERSION)" \ | |
41 | -no-emul-boot \ | |
42 | -boot-load-size 4 \ | |
43 | -boot-info-table \ | |
44 | -b boot/isolinux/isolinux.bin \ | |
45 | -c boot/isolinux/boot.catalog | |
46 | ||
47 | ifeq "$(EFI)" "1" | |
48 | ISO_ARGS += \ | |
49 | -eltorito-alt-boot \ | |
50 | -e boot/isolinux/efiboot.img | |
51 | endif | |
52 | ||
cd1a2927 MT |
53 | ############################################################################### |
54 | # Top-level Rules | |
55 | ############################################################################### | |
56 | ||
cd1a2927 MT |
57 | install : $(TARGET) |
58 | ||
fd0763dc | 59 | check : |
cd1a2927 | 60 | |
fd0763dc | 61 | download : |
cd1a2927 | 62 | |
fd0763dc | 63 | md5 : |
cd1a2927 MT |
64 | |
65 | ############################################################################### | |
66 | # Installation Details | |
67 | ############################################################################### | |
68 | ||
69 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
42e4fa80 MT |
70 | # Update /etc/system-release, because the string might have changed |
71 | # since stage2 has been executed.. | |
72 | echo "$(SYSTEM_RELEASE)" > /etc/system-release | |
73 | ||
cd1a2927 | 74 | rm -rf /install/cdrom /tmp/* |
1b453c76 | 75 | mkdir -p /install/cdrom/doc |
cd1a2927 | 76 | |
1b453c76 MT |
77 | # Clear mtab (prevents .journal problems) |
78 | rm -vf /etc/mtab | |
9df6d70f AF |
79 | echo > /etc/mtab |
80 | ||
1b453c76 | 81 | # Create filelist for packaging. |
dc7d6b20 | 82 | BUILDTARGET="$(BUILDTARGET)" BUILD_ARCH="$(BUILD_ARCH)" KVER="$(KVER)" \ |
1b453c76 MT |
83 | $(DIR_SRC)/src/scripts/archive.files \ |
84 | $(DIR_SRC)/config/rootfiles/common \ | |
85 | > /tmp/ROOTFILES | |
86 | ||
cd1a2927 MT |
87 | # Compress root filesystem |
88 | # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES | |
c2297690 MF |
89 | tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/ROOTFILES' \ |
90 | -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar | |
50f96334 | 91 | rm -f /tmp/ROOTFILES |
cd1a2927 MT |
92 | tar -x -C /tmp -f /$(SNAME).tar |
93 | rm -f /$(SNAME).tar | |
069680ac | 94 | @mkdir /tmp/sys |
0054a52b | 95 | cd /tmp && tar cf - * | xz $(XZ_OPT) > /install/cdrom/distro.img && rm -rf * |
03ad5f93 | 96 | |
cd1a2927 | 97 | # Other files |
fab611b3 | 98 | touch /install/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media |
03ad5f93 | 99 | sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt |
f8031af5 MT |
100 | cp $(DIR_SRC)/doc/COPYING /install/cdrom/ |
101 | cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc | |
cd1a2927 | 102 | |
0afc6d83 | 103 | # Make the ISO |
1b453c76 MT |
104 | mkdir -p /install/cdrom/boot/isolinux |
105 | dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog | |
dc7d6b20 | 106 | ifneq "$(BUILD_PLATFORM)" "arm" |
bc8fe5ff | 107 | cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz |
3ed1c621 | 108 | dracut --force -a "installer" --strip --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire |
df2ac655 | 109 | cp $(DIR_SRC)/config/syslinux/boot.png /install/cdrom/boot/isolinux/boot.png |
1b453c76 | 110 | cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest |
89fd5ae0 | 111 | cp /usr/share/ipfire-netboot/ipxe.lkrn /install/cdrom/boot/isolinux/netboot |
1b453c76 | 112 | cp /usr/share/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin |
5f52a956 MT |
113 | ifeq "$(EFI)" "1" |
114 | dd if=/dev/zero of=/install/cdrom/boot/isolinux/efiboot.img bs=1k count=1440 | |
115 | mkdosfs -F 12 -n "IPFIRE_EFI" /install/cdrom/boot/isolinux/efiboot.img | |
116 | ||
117 | # XXX Some bootloader needs to be put in this image | |
118 | endif | |
df2ac655 MT |
119 | cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids |
120 | cp -vf /usr/share/syslinux/*.c32 /install/cdrom/boot/isolinux/ | |
121 | sed -e "s/VERSION/$(VERSION) - Core $(CORE)/g" \ | |
122 | $(DIR_SRC)/config/syslinux/syslinux.cfg \ | |
123 | > /install/cdrom/boot/isolinux/isolinux.cfg | |
1b453c76 | 124 | endif |
d7bf4fe7 | 125 | cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \ |
1b453c76 MT |
126 | xargs md5sum > md5sum.txt |
127 | ||
bc8fe5ff | 128 | mkdir -p /install/images |
dc7d6b20 | 129 | ifeq "$(BUILD_PLATFORM)" "arm" |
1b453c76 | 130 | cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ |
dc7d6b20 | 131 | . > /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso |
1b453c76 | 132 | else |
5f52a956 MT |
133 | cd /install/cdrom && mkisofs $(ISO_ARGS) \ |
134 | -o /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso . | |
135 | ||
136 | ifeq "$(EFI)" "1" | |
137 | isohybrid --uefi /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso | |
138 | else | |
dc7d6b20 | 139 | isohybrid /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso |
1b453c76 | 140 | endif |
5f52a956 | 141 | endif |