]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/boot.img
RRDTool Fix
[ipfire-2.x.git] / lfs / boot.img
CommitLineData
cd1a2927
MT
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# #
cd1a2927
MT
21###############################################################################
22
23###############################################################################
24# Definitions
25###############################################################################
26
27include Config
28
a6316ce4
MT
29VER = ipfire
30
cd1a2927
MT
31THISAPP = boot-$(VERSION).img
32TARGET = $(DIR_INFO)/$(THISAPP)
33
34###############################################################################
35# Top-level Rules
36###############################################################################
37
38install : $(TARGET)
39
40check :
41
42download :
43
44md5 :
45
46###############################################################################
47# Installation Details
48###############################################################################
49
50$(TARGET) :
72d80898 51 if [ "$(MACHINE)" = "i586" ]; then \
cd1a2927
MT
52 dd if=/dev/zero of=/install/images/boot-$(VERSION).img bs=1024 count=1440; \
53 mkdosfs -f 1 -r 16 /install/images/boot-$(VERSION).img; \
54 syslinux -s /install/images/boot-$(VERSION).img; \
55 for i in `seq 0 7`; do \
56 if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
57 LOOPNUM=$$i; \
58 LOOPDEV="/dev/loop$${i}"; \
59 break; \
60 fi; \
61 done; \
62 losetup $$LOOPDEV /install/images/boot-$(VERSION).img; \
63 mount -t msdos $$LOOPDEV /install/mnt; \
913668ba 64 sed -e 's/boot IPFire/boot IPFire $(VERSION)/' $(DIR_SRC)/config/kernel/install-message \
cd1a2927
MT
65 > /install/mnt/message; \
66 cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/mnt/syslinux.cfg; \
a6316ce4 67 cp /boot/vmlinuz-$(KVER) /install/mnt/vmlinuz; \
cd1a2927
MT
68 cp /install/images/fdinitrd.gz /install/mnt/instroot.gz; \
69 umount /install/mnt; \
70 losetup -d $$LOOPDEV; \
71 fi