]> git.ipfire.org Git - ipfire-2.x.git/blob - lfs/boot.img
Zwischencommit fuer LFS. Noch zahlreiche Errors :(
[ipfire-2.x.git] / lfs / boot.img
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 THISAPP = boot-$(VERSION).img
30 TARGET = $(DIR_INFO)/$(THISAPP)
31
32 ###############################################################################
33 # Top-level Rules
34 ###############################################################################
35
36 install : $(TARGET)
37
38 check :
39
40 download :
41
42 md5 :
43
44 ###############################################################################
45 # Installation Details
46 ###############################################################################
47
48 $(TARGET) :
49 if [ "$(MACHINE)" = "i386" ]; then \
50 dd if=/dev/zero of=/install/images/boot-$(VERSION).img bs=1024 count=1440; \
51 mkdosfs -f 1 -r 16 /install/images/boot-$(VERSION).img; \
52 syslinux -s /install/images/boot-$(VERSION).img; \
53 for i in `seq 0 7`; do \
54 if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
55 LOOPNUM=$$i; \
56 LOOPDEV="/dev/loop$${i}"; \
57 break; \
58 fi; \
59 done; \
60 losetup $$LOOPDEV /install/images/boot-$(VERSION).img; \
61 mount -t msdos $$LOOPDEV /install/mnt; \
62 sed -e 's/boot IPFire/boot IPFire $(VERSION)/' $(DIR_SRC)/config/kernel/install-message \
63 > /install/mnt/message; \
64 cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/mnt/syslinux.cfg; \
65 cp /boot/vmlinuz-installer /install/mnt/vmlinuz; \
66 cp /install/images/fdinitrd.gz /install/mnt/instroot.gz; \
67 umount /install/mnt; \
68 losetup -d $$LOOPDEV; \
69 fi
70