]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/cdrom
serial console: Change default baud rate to 115200.
[ipfire-2.x.git] / lfs / cdrom
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302 3# IPFire.org - A linux based firewall #
c91d1354 4# Copyright (C) 2010 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
25include Config
26
0fbb45e9
MT
27VER = ipfire
28
cd1a2927 29THISAPP = cdrom
cd1a2927
MT
30TARGET = $(DIR_INFO)/$(THISAPP)
31
32###############################################################################
33# Top-level Rules
34###############################################################################
35
cd1a2927
MT
36install : $(TARGET)
37
fd0763dc 38check :
cd1a2927 39
fd0763dc 40download :
cd1a2927 41
fd0763dc 42md5 :
cd1a2927
MT
43
44###############################################################################
45# Installation Details
46###############################################################################
47
48$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
49 rm -rf /install/cdrom /tmp/*
1b453c76 50 mkdir -p /install/cdrom/doc
cd1a2927 51
1b453c76
MT
52 # Clear mtab (prevents .journal problems)
53 rm -vf /etc/mtab
9df6d70f
AF
54 echo > /etc/mtab
55
1b453c76
MT
56 # Create filelist for packaging.
57 BUILDTARGET="$(BUILDTARGET)" MACHINE="$(MACHINE)" KVER="$(KVER)" \
58 $(DIR_SRC)/src/scripts/archive.files \
59 $(DIR_SRC)/config/rootfiles/common \
60 > /tmp/ROOTFILES
61
cd1a2927
MT
62 # Compress root filesystem
63 # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
50f96334 64 tar -c -C / --files-from=/tmp/ROOTFILES \
90c973a6 65 -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
5609904b 66 --exclude='proc/*' --exclude='tmp/ROOTFILES'
50f96334 67 rm -f /tmp/ROOTFILES
cd1a2927
MT
68 tar -x -C /tmp -f /$(SNAME).tar
69 rm -f /$(SNAME).tar
069680ac 70 @mkdir /tmp/sys
dbf157bb 71 cd /tmp && tar cf /install/cdrom/$(SNAME)-$(VERSION).tlz --lzma * && rm -rf *
03ad5f93 72
cd1a2927 73 # Other files
03ad5f93
MT
74 sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt
75 cp $(DIR_SRC)/doc/COPYING /install/cdrom/
03ad5f93 76 cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
cd1a2927 77
33634aa8
MT
78 # Configuration
79 mkdir -p /install/cdrom/boot
fd0763dc 80 cp $(DIR_SRC)/config/syslinux/unattended.conf /install/cdrom/boot/unattended.conf
33634aa8 81
0afc6d83 82 # Make the ISO
1b453c76
MT
83 mkdir -p /install/cdrom/boot/isolinux
84 dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog
85 cp /install/images/initrd /install/cdrom/boot/isolinux/instroot
86 cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz
87ifneq "$(MACHINE_TYPE)" "arm"
88 cp $(DIR_SRC)/config/syslinux/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg
89 cp $(DIR_SRC)/config/syslinux/boot.msg /install/cdrom/boot/isolinux/boot.msg
90 cp $(DIR_SRC)/config/syslinux/splash.lss /install/cdrom/boot/isolinux/splash.lss
91 cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest
92 cp /usr/share/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin
93endif
d7bf4fe7 94 cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \
1b453c76
MT
95 xargs md5sum > md5sum.txt
96
97ifeq "$(MACHINE_TYPE)" "arm"
98 cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
99 . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED)-core$(CORE).iso
100else
03ad5f93
MT
101 cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
102 -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
a01fc474 103 -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED)-core$(CORE).iso
1b453c76 104endif