]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - lfs/boot.img
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/teissler/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 # Modifications by: #
22 # ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23 # - Modified Makefile for IPCop build #
24 # #
25 # $Id: boot.img,v 1.8.2.4 2005/10/30 18:19:16 gespinasse Exp $
26 # #
27 ###############################################################################
28
29 ###############################################################################
30 # Definitions
31 ###############################################################################
32
33 include Config
34
35 THISAPP = boot-$(VERSION).img
36 TARGET = $(DIR_INFO)/$(THISAPP)
37
38 ###############################################################################
39 # Top-level Rules
40 ###############################################################################
41
42 install : $(TARGET)
43
44 check :
45
46 download :
47
48 md5 :
49
50 ###############################################################################
51 # Installation Details
52 ###############################################################################
53
54 $(TARGET) :
55 if [ "$(MACHINE)" = "i386" ]; then \
56 dd if=/dev/zero of=/install/images/boot-$(VERSION).img bs=1024 count=1440; \
57 mkdosfs -f 1 -r 16 /install/images/boot-$(VERSION).img; \
58 syslinux -s /install/images/boot-$(VERSION).img; \
59 for i in `seq 0 7`; do \
60 if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
61 LOOPNUM=$$i; \
62 LOOPDEV="/dev/loop$${i}"; \
63 break; \
64 fi; \
65 done; \
66 losetup $$LOOPDEV /install/images/boot-$(VERSION).img; \
67 mount -t msdos $$LOOPDEV /install/mnt; \
68 sed -e 's/boot IPCop/boot IPCop $(VERSION)/' $(DIR_SRC)/config/kernel/install-message \
69 > /install/mnt/message; \
70 cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/mnt/syslinux.cfg; \
71 cp /boot/vmlinuz-installer /install/mnt/vmlinuz; \
72 cp /install/images/fdinitrd.gz /install/mnt/instroot.gz; \
73 umount /install/mnt; \
74 losetup -d $$LOOPDEV; \
75 fi
76