mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
SquashFS hinzugefuegt damit wir auf OpenVZ-Maschinen bauen koennen.
Kein Loop-Device mehr erforderlich. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@393 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -76,7 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# Make the ISO
|
||||
mkdir -p /install/cdrom/boot/isolinux; \
|
||||
dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \
|
||||
cp /install/images/cdinitrd.gz /install/cdrom/boot/isolinux/instroot.gz; \
|
||||
cp /install/images/initrd /install/cdrom/boot/isolinux/instroot; \
|
||||
cp /boot/vmlinuz-$(KVER) /install/cdrom/boot/isolinux/vmlinuz; \
|
||||
cp $(DIR_SRC)/config/syslinux/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \
|
||||
cp $(DIR_SRC)/config/syslinux/boot.msg /install/cdrom/boot/isolinux/boot.msg; \
|
||||
|
||||
21
lfs/initrd
21
lfs/initrd
@@ -127,24 +127,7 @@ $(TARGET) :
|
||||
# make new dependencies
|
||||
depmod -a -F /boot/System.map-$(KVER) $(KVER)
|
||||
|
||||
RAMDISK_SIZE=16384 && \
|
||||
dd if=/dev/zero of=/install/images/cdinitrd bs=1k count=$${RAMDISK_SIZE}
|
||||
for i in `seq 0 7`; do \
|
||||
if (! losetup /dev/loop$${i} >/dev/null 2>&1 ); then \
|
||||
LOOPDEV="/dev/loop$${i}" \
|
||||
break; \
|
||||
fi; \
|
||||
done && \
|
||||
losetup $$LOOPDEV /install/images/cdinitrd && \
|
||||
mke2fs -m 0 -N 1024 $$LOOPDEV && \
|
||||
mount -t ext2 $$LOOPDEV /install/mnt && \
|
||||
rm -rf /install/mnt/lost+found && \
|
||||
cp -aR /install/initrd/* /install/mnt/ && \
|
||||
cd /install/mnt/ && find ./ -ls > $(DIR_INFO)/_build.cdinitrd && \
|
||||
touch /install/mnt/CDROMBOOT && \
|
||||
cd / && umount /install/mnt && \
|
||||
losetup -d $$LOOPDEV
|
||||
gzip -9 /install/images/cdinitrd
|
||||
splash -s -f /boot/splash/config/bootsplash-1024x768.cfg >> /install/images/cdinitrd.gz
|
||||
mksquashfs /install/initrd /install/images/initrd
|
||||
cd /install/initrd && find ./ -ls > $(DIR_INFO)/_build.initrd.log
|
||||
|
||||
@$(POSTBUILD)
|
||||
|
||||
@@ -130,6 +130,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# H323 conntrack
|
||||
cd $(DIR_APP) && bunzip2 -cd $(DIR_DL)/patch-2.6.16-nath323-1.3.bz2 | patch -Np1
|
||||
|
||||
# SquashFS
|
||||
cd $(DIR_SRC) && rm -rf squashfs*
|
||||
cd $(DIR_SRC) && tar xfz $(DIR_DL)/squashfs3.0.tar.gz
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/squashfs3.0/linux-2.6.15/squashfs3.0-patch
|
||||
|
||||
# Patch-o-matic
|
||||
cd $(DIR_SRC) && rm -rf iptables-*
|
||||
cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.5.tar.bz2
|
||||
@@ -199,5 +204,5 @@ endif
|
||||
ifeq "$(SMP)" "1"
|
||||
rm -rf /lib/modules/$(VER)-smp/pcmcia
|
||||
endif
|
||||
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables*
|
||||
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables* $(DIR_SRC)/squashfs*
|
||||
@$(POSTBUILD)
|
||||
|
||||
4
lfs/pxe
4
lfs/pxe
@@ -52,7 +52,7 @@ $(TARGET) :
|
||||
rm -rf /tmp/*
|
||||
mkdir -p /tmp/$(VERSION) /tmp/pxelinux.cfg
|
||||
cp /usr/lib/syslinux/pxelinux.0 /tmp
|
||||
cp /install/images/cdinitrd.gz /tmp/$(VERSION)/instroot.gz
|
||||
cp /install/images/initrd /tmp/$(VERSION)/instroot
|
||||
cp /boot/vmlinuz-$(KVER) /tmp/$(VERSION)/vmlinuz
|
||||
cp $(DIR_SRC)/config/syslinux/options.msg /tmp/$(VERSION)/options.msg
|
||||
cp $(DIR_SRC)/config/syslinux/splash.lss /tmp/$(VERSION)/splash.lss
|
||||
@@ -68,7 +68,7 @@ $(TARGET) :
|
||||
$(DIR_SRC)/config/syslinux/syslinux.cfg \
|
||||
> /tmp/pxelinux.cfg/$(SNAME)-pxe-$(VERSION).model
|
||||
ln -s $(SNAME)-pxe-$(VERSION).model /tmp/pxelinux.cfg/default
|
||||
chmod 444 /tmp/$(VERSION)/instroot.gz
|
||||
chmod 444 /tmp/$(VERSION)/instroot
|
||||
cd /tmp && tar cvzf \
|
||||
/install/images/$(SNAME)-$(VERSION).$(MACHINE)-pxe.tgz *
|
||||
rm -rf /tmp/*
|
||||
|
||||
79
lfs/squashfstools
Normal file
79
lfs/squashfstools
Normal file
@@ -0,0 +1,79 @@
|
||||
###############################################################################
|
||||
# This file is part of the IPCop Firewall. #
|
||||
# #
|
||||
# IPCop is free software; you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation; either version 2 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# IPCop is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with IPCop; if not, write to the Free Software #
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
# #
|
||||
# Makefiles are based on LFSMake, which is #
|
||||
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 3.0
|
||||
|
||||
THISAPP = squashfs$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = 9fd05d0bfbb712f5fb95edafea5bc733
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squashfstools-3.0.patch
|
||||
cd $(DIR_APP)/squashfs-tools && make "CC=g++" mksquashfs
|
||||
cd $(DIR_APP)/squashfs-tools && cp -f mksquashfs /bin
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
Reference in New Issue
Block a user