mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Windows hat sie wieder zerschossen... :(
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@63 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
234
lfs/driver.img
234
lfs/driver.img
@@ -1,117 +1,117 @@
|
||||
###############################################################################
|
||||
# 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> #
|
||||
# #
|
||||
# Modifications by: #
|
||||
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
|
||||
# - Modified Makefile for IPCop build #
|
||||
# #
|
||||
# $Id: driver.img,v 1.24.2.7 2006/01/29 20:17:30 franck78 Exp $
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
THISAPP = driver-$(VERSION).img
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check :
|
||||
|
||||
download :
|
||||
|
||||
md5 :
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) :
|
||||
@$(PREBUILD)
|
||||
-strip --strip-all /install/misc/bin/*
|
||||
|
||||
# make new dependencies
|
||||
depmod -a -F /boot/System.map-$(KVER) $(KVER)
|
||||
if [ "$(MACHINE)" = "i386" ]; then \
|
||||
depmod -a -F /boot/System.map-$(KVER)-smp $(KVER)-smp; \
|
||||
fi
|
||||
|
||||
# Create drivers floppy
|
||||
cd /tmp && rm -rf drivers.tgz drivers.tar bin lib etc var
|
||||
cd / && tar -cf /tmp/drivers.tar \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/acpi/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/block/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/char/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/ide/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/isdn/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/ppp*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/slip*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/slhc*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/tun*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/scsi/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/message/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/input/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/usb/storage/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/usb/host/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/arch/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/fs/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/atm/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/ipsec/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/ipv4/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/sched/*' \
|
||||
--exclude='lib/modules/$(KVER)/*map' \
|
||||
--exclude='lib/modules/$(KVER)/misc/*' \
|
||||
--exclude='lib/modules/$(KVER)/extra/*' \
|
||||
--exclude='lib/modules/$(KVER)/pcmcia/*' \
|
||||
--exclude='lib/modules/$(KVER)/build' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/atm/*' \
|
||||
--exclude=lib/modules/$(KVER)/kernel/drivers/usb/{3cp4218.o.gz,acm.o.gz,amedyn.o.gz,cxacru.o.gz,speedtch.o.gz,hid.o.gz,usbcore.o.gz} \
|
||||
--exclude='lib/modules/$(KVER)/modules.*' \
|
||||
lib/modules/$(KVER)
|
||||
cd /tmp && tar xf drivers.tar
|
||||
cd /tmp && mkdir -p {bin,etc/pcmcia,var/lib/pcmcia,var/run}
|
||||
cd /tmp && cp -aR /install/misc/bin/* bin
|
||||
cd /tmp && cp -r /etc/pcmcia/{config*,net*} etc/pcmcia
|
||||
# cardmgr wants to execute these to bring up the card, we'll
|
||||
# create blank ones as we'll bring them up ourselves
|
||||
cd /tmp/etc/pcmcia && rm -f network
|
||||
cd /tmp/etc/pcmcia && touch network
|
||||
cd /tmp/etc/pcmcia && chmod +x network
|
||||
cd /tmp && tar -cf - bin/ etc/pcmcia var lib/modules/$(KVER) | gzip -9 -c > drivers.tgz
|
||||
|
||||
if [ "$(MACHINE)" = "alpha" ]; then \
|
||||
cp /tmp/drivers.tgz /install/images/drivers-$(VERSION).img; \
|
||||
else \
|
||||
dd if=/tmp/drivers.tgz of=/install/images/drivers-$(VERSION).img bs=1440k count=1 conv=sync; \
|
||||
fi
|
||||
rm -rf /tmp/drivers.tgz /tmp/drivers.tar /tmp/bin /tmp/lib
|
||||
|
||||
### If this fails, the disk is TOO FULL !!!!
|
||||
tar tzf /install/images/drivers-$(VERSION).img >/dev/null 2>&1
|
||||
|
||||
@$(POSTBUILD)
|
||||
###############################################################################
|
||||
# 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> #
|
||||
# #
|
||||
# Modifications by: #
|
||||
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
|
||||
# - Modified Makefile for IPCop build #
|
||||
# #
|
||||
# $Id: driver.img,v 1.24.2.7 2006/01/29 20:17:30 franck78 Exp $
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
THISAPP = driver-$(VERSION).img
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check :
|
||||
|
||||
download :
|
||||
|
||||
md5 :
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) :
|
||||
@$(PREBUILD)
|
||||
-strip --strip-all /install/misc/bin/*
|
||||
|
||||
# make new dependencies
|
||||
depmod -a -F /boot/System.map-$(KVER) $(KVER)
|
||||
if [ "$(MACHINE)" = "i386" ]; then \
|
||||
depmod -a -F /boot/System.map-$(KVER)-smp $(KVER)-smp; \
|
||||
fi
|
||||
|
||||
# Create drivers floppy
|
||||
cd /tmp && rm -rf drivers.tgz drivers.tar bin lib etc var
|
||||
cd / && tar -cf /tmp/drivers.tar \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/acpi/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/block/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/char/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/ide/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/isdn/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/ppp*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/slip*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/slhc*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/net/tun*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/scsi/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/message/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/input/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/usb/storage/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/usb/host/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/arch/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/fs/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/atm/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/ipsec/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/ipv4/*' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/net/sched/*' \
|
||||
--exclude='lib/modules/$(KVER)/*map' \
|
||||
--exclude='lib/modules/$(KVER)/misc/*' \
|
||||
--exclude='lib/modules/$(KVER)/extra/*' \
|
||||
--exclude='lib/modules/$(KVER)/pcmcia/*' \
|
||||
--exclude='lib/modules/$(KVER)/build' \
|
||||
--exclude='lib/modules/$(KVER)/kernel/drivers/atm/*' \
|
||||
--exclude=lib/modules/$(KVER)/kernel/drivers/usb/{3cp4218.o.gz,acm.o.gz,amedyn.o.gz,cxacru.o.gz,speedtch.o.gz,hid.o.gz,usbcore.o.gz} \
|
||||
--exclude='lib/modules/$(KVER)/modules.*' \
|
||||
lib/modules/$(KVER)
|
||||
cd /tmp && tar xf drivers.tar
|
||||
cd /tmp && mkdir -p {bin,etc/pcmcia,var/lib/pcmcia,var/run}
|
||||
cd /tmp && cp -aR /install/misc/bin/* bin
|
||||
cd /tmp && cp -r /etc/pcmcia/{config*,net*} etc/pcmcia
|
||||
# cardmgr wants to execute these to bring up the card, we'll
|
||||
# create blank ones as we'll bring them up ourselves
|
||||
cd /tmp/etc/pcmcia && rm -f network
|
||||
cd /tmp/etc/pcmcia && touch network
|
||||
cd /tmp/etc/pcmcia && chmod +x network
|
||||
cd /tmp && tar -cf - bin/ etc/pcmcia var lib/modules/$(KVER) | gzip -9 -c > drivers.tgz
|
||||
|
||||
if [ "$(MACHINE)" = "alpha" ]; then \
|
||||
cp /tmp/drivers.tgz /install/images/drivers-$(VERSION).img; \
|
||||
else \
|
||||
dd if=/tmp/drivers.tgz of=/install/images/drivers-$(VERSION).img bs=1440k count=1 conv=sync; \
|
||||
fi
|
||||
rm -rf /tmp/drivers.tgz /tmp/drivers.tar /tmp/bin /tmp/lib
|
||||
|
||||
### If this fails, the disk is TOO FULL !!!!
|
||||
tar tzf /install/images/drivers-$(VERSION).img >/dev/null 2>&1
|
||||
|
||||
@$(POSTBUILD)
|
||||
|
||||
582
lfs/linux
582
lfs/linux
@@ -1,291 +1,291 @@
|
||||
###############################################################################
|
||||
# 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> #
|
||||
# #
|
||||
# Modifications by: #
|
||||
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
|
||||
# - Modified Makefile for IPCop build #
|
||||
# #
|
||||
# $Id: linux,v 1.42.2.57 2005/07/28 07:01:27 gespinasse Exp $
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 2.4.31
|
||||
|
||||
THISAPP = linux-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_KERNEL)/linux/kernel/v2.4
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
CFLAGS =
|
||||
CXXFLAGS =
|
||||
|
||||
# Normal build or /tools build.
|
||||
#
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(LFS_PASS)" "ipcop"
|
||||
ifeq "$(EMB)" ""
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-smp
|
||||
endif
|
||||
ifeq "$(SMP)" "installer"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-installer
|
||||
endif
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
endif
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-tools
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
objects =$(DL_FILE) \
|
||||
openswan-1.0.10rc2.tar.gz \
|
||||
iptables-1.3.5.tar.bz2 \
|
||||
patch-o-matic-ng-20060206.tar.bz2 \
|
||||
kbc_option_2420.patch \
|
||||
net4801.kernel.patch_2.4.31 \
|
||||
netfilter-layer7-v2.1.tar.gz
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
openswan-1.0.10rc2.tar.gz = ftp://ftp.man.szczecin.pl/disks/disk0/security/network-security/ipsec/openswan/openswan-1.0.10rc2.tar.gz
|
||||
patch-o-matic-ng-20060206.tar.bz2 = ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20060206.tar.bz2
|
||||
iptables-1.3.5.tar.bz2 = http://www.netfilter.org/files/iptables-1.3.5.tar.bz2
|
||||
kbc_option_2420.patch = http://developer.osdl.org/rddunlap/patches/kbc_option_2420.patch
|
||||
net4801.kernel.patch_2.4.31 = http://www.sk-tech.net/support/net4801.kernel.patch_2.4.31
|
||||
netfilter-layer7-v2.1.tar.gz = http://belnet.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.1.tar.gz
|
||||
|
||||
$(DL_FILE)_MD5 = ea3f99fc82617886059d58d0644dab26
|
||||
openswan-1.0.10rc2.tar.gz_MD5 = 20d51ff963da78f826f4e0f0ebc4bcef
|
||||
patch-o-matic-ng-20060206.tar.bz2_MD5 = eca9893afb753e331caddfe63142b566
|
||||
iptables-1.3.5.tar.bz2_MD5 = 00fb916fa8040ca992a5ace56d905ea5
|
||||
kbc_option_2420.patch_MD5 = 6d37870344f7fcf97ace1fbf43323c60
|
||||
net4801.kernel.patch_2.4.31_MD5 = c7d64e3caedb2f2b10e1c11db7f73a04
|
||||
netfilter-layer7-v2.1.tar.gz_MD5 = 551626a158c2a2cbfd937d27ecc7fac1
|
||||
|
||||
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) $(DIR_SRC)/linux && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_SRC) && ln -sf linux-$(VER) linux
|
||||
cd $(DIR_APP) && sed -i -e 's/-Werror//' drivers/scsi/aic7xxx/Makefile
|
||||
|
||||
# Openswan
|
||||
cd $(DIR_SRC) && rm -rf openswan-*
|
||||
cd $(DIR_SRC) && tar xfz $(DIR_DL)/openswan-1.0.10rc2.tar.gz
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.1-plutoctl.patch
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.6-numif.patch
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i 's+^KERNELSRC.*$$+KERNELSRC=$(ROOT)/usr/src/linux-$(VER)+' Makefile.inc
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i -e 's/local\/sbin/local\/sbin:\/tools\/bin/' utils/patcher
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && make insert
|
||||
|
||||
# Patch-o-matic
|
||||
cd $(DIR_SRC) && rm -rf iptables-*
|
||||
cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.5.tar.bz2
|
||||
cd $(DIR_SRC) && ln -sf iptables-1.3.5 iptables
|
||||
cd $(DIR_SRC) && rm -rf patch-o-matic*
|
||||
cd $(DIR_SRC) && tar xfj $(DIR_DL)/patch-o-matic-ng-20060206.tar.bz2
|
||||
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pending
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ base
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ h323-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ cuseeme-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ mms-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pptp-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ rtsp-conntrack
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ quake3-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ sip-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ip_queue_vwmark
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipp2p
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-01-output-hooks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-02-input-hooks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-03-policy-lookup
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-04-policy-checks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ TARPIT
|
||||
|
||||
#imq-patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.28-imq2.diff
|
||||
|
||||
#layer7-patch
|
||||
cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.1.tar.gz
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.1/kernel-2.4-layer7-2.1.patch
|
||||
|
||||
ifeq "$(EMB)" "1"
|
||||
#Emb-patches
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/kbc_option_2420.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/net4801.kernel.patch_2.4.31
|
||||
endif
|
||||
|
||||
ifeq "$(SMP)" ""
|
||||
# Only do this once on the non-SMP pass
|
||||
cd $(DIR_SRC) && tar czf $(DIR_DL)/iptables-fixed.tar.gz iptables-1.2.11
|
||||
endif
|
||||
|
||||
# Olitec isdn gazel patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.23-olitec-isdn.patch
|
||||
|
||||
# Fix /proc/stat output
|
||||
cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/linux-2.4.26-proc-stat.patch
|
||||
|
||||
# Fix libata-core.c
|
||||
# cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.26-scsi.patch
|
||||
|
||||
# frandom patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-frandom-2.patch
|
||||
|
||||
# Propolice
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-ssp-1.patch
|
||||
|
||||
# Support ppp-2.4.3 multilink behavior (terminate when no channel is connected)
|
||||
# need updated libpcap older than 0.8.3
|
||||
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ppp_generic-ppp-2.4.3_multilink.patch
|
||||
|
||||
# R8169 clone D-link GSE-528T
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.29_r8169clone.patch
|
||||
|
||||
# Cleanup kernel source
|
||||
cd $(DIR_APP) && make mrproper
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(LFS_PASS)" "ipcop"
|
||||
ifeq "$(SMP)" ""
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
|
||||
endif
|
||||
ifeq "$(SMP)" "installer"
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).installer $(DIR_APP)/.config
|
||||
cd $(DIR_APP) && sed -i -e 's/-O2/-Os/g' Makefile
|
||||
endif
|
||||
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" dep
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" clean
|
||||
if [ "$(MACHINE)" = "i386" -a "$(EMB)" = "" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER); \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \
|
||||
ln -sf vmlinuz-$(VER) /boot/vmlinuz; \
|
||||
ln -sf System.map-$(VER) /boot/System.map; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "1" ]; then \
|
||||
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =/EXTRAVERSION\ =\ -EMB/' Makefile; \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER)-EMB; \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER)-EMB; \
|
||||
ln -sf vmlinuz-$(VER)-EMB /boot/vmlinuz-EMB; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "installer" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-installer; \
|
||||
elif [ "$(MACHINE)" = "alpha" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" vmlinux; \
|
||||
cd $(DIR_APP) && gzip -9c vmlinux > /boot/vmlinuz-$(VER); \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \
|
||||
ln -sf vmlinuz-$(VER) /boot/vmlinuz; \
|
||||
ln -sf System.map-$(VER) /boot/System.map; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
fi
|
||||
# remove symlinked pcmcia directory
|
||||
ifeq "$(SMP)" ""
|
||||
rm -rf /lib/modules/$(VER)/pcmcia
|
||||
find /lib/modules/$(VER)/ -name '*.o' -a -type f | xargs gzip -f9
|
||||
|
||||
# Move these SCSI drivers into same directory for probescsi.sh
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/aacraid/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aacraid
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
rm -rf /lib/modules/$(VER)-smp/pcmcia
|
||||
find /lib/modules/$(VER)-smp/ -name '*.o' -a -type f | xargs gzip -f9
|
||||
|
||||
# Move these SCSI drivers into same directory for probescsi.sh
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2
|
||||
endif
|
||||
|
||||
ifeq "$(SMP)" ""
|
||||
# Only do this once on the non-SMP pass
|
||||
cd $(DIR_APP) && make mandocs
|
||||
-mkdir -p /usr/share/man/man9/
|
||||
cd $(DIR_APP) && cp -af Documentation/man/* /usr/share/man/man9/
|
||||
endif
|
||||
else
|
||||
cd $(DIR_APP) && make include/linux/version.h
|
||||
cd $(DIR_APP) && make symlinks
|
||||
cd $(DIR_APP) && cp -HRf include/asm /usr/include
|
||||
cd $(DIR_APP) && cp -Rf include/asm-generic /usr/include
|
||||
cd $(DIR_APP) && cp -Rf include/linux /usr/include
|
||||
touch /usr/include/linux/autoconf.h
|
||||
endif
|
||||
else
|
||||
cd $(DIR_APP) && make include/linux/version.h
|
||||
cd $(DIR_APP) && make symlinks
|
||||
-mkdir -p /tools/include/asm
|
||||
cd $(DIR_APP) && cp -f include/asm/* /tools/include/asm
|
||||
cd $(DIR_APP) && cp -Rf include/asm-generic /tools/include
|
||||
cd $(DIR_APP) && cp -Rf include/linux /tools/include
|
||||
cd $(DIR_APP) && touch /tools/include/linux/autoconf.h
|
||||
endif
|
||||
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables*
|
||||
@$(POSTBUILD)
|
||||
###############################################################################
|
||||
# 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> #
|
||||
# #
|
||||
# Modifications by: #
|
||||
# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
|
||||
# - Modified Makefile for IPCop build #
|
||||
# #
|
||||
# $Id: linux,v 1.42.2.57 2005/07/28 07:01:27 gespinasse Exp $
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 2.4.31
|
||||
|
||||
THISAPP = linux-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_KERNEL)/linux/kernel/v2.4
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
CFLAGS =
|
||||
CXXFLAGS =
|
||||
|
||||
# Normal build or /tools build.
|
||||
#
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(LFS_PASS)" "ipcop"
|
||||
ifeq "$(EMB)" ""
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-smp
|
||||
endif
|
||||
ifeq "$(SMP)" "installer"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-ipcop-installer
|
||||
endif
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
endif
|
||||
else
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-tools
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
objects =$(DL_FILE) \
|
||||
openswan-1.0.10rc2.tar.gz \
|
||||
iptables-1.3.5.tar.bz2 \
|
||||
patch-o-matic-ng-20060206.tar.bz2 \
|
||||
kbc_option_2420.patch \
|
||||
net4801.kernel.patch_2.4.31 \
|
||||
netfilter-layer7-v2.1.tar.gz
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
openswan-1.0.10rc2.tar.gz = ftp://ftp.man.szczecin.pl/disks/disk0/security/network-security/ipsec/openswan/openswan-1.0.10rc2.tar.gz
|
||||
patch-o-matic-ng-20060206.tar.bz2 = ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20060206.tar.bz2
|
||||
iptables-1.3.5.tar.bz2 = http://www.netfilter.org/files/iptables-1.3.5.tar.bz2
|
||||
kbc_option_2420.patch = http://developer.osdl.org/rddunlap/patches/kbc_option_2420.patch
|
||||
net4801.kernel.patch_2.4.31 = http://www.sk-tech.net/support/net4801.kernel.patch_2.4.31
|
||||
netfilter-layer7-v2.1.tar.gz = http://belnet.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.1.tar.gz
|
||||
|
||||
$(DL_FILE)_MD5 = ea3f99fc82617886059d58d0644dab26
|
||||
openswan-1.0.10rc2.tar.gz_MD5 = 20d51ff963da78f826f4e0f0ebc4bcef
|
||||
patch-o-matic-ng-20060206.tar.bz2_MD5 = eca9893afb753e331caddfe63142b566
|
||||
iptables-1.3.5.tar.bz2_MD5 = 00fb916fa8040ca992a5ace56d905ea5
|
||||
kbc_option_2420.patch_MD5 = 6d37870344f7fcf97ace1fbf43323c60
|
||||
net4801.kernel.patch_2.4.31_MD5 = c7d64e3caedb2f2b10e1c11db7f73a04
|
||||
netfilter-layer7-v2.1.tar.gz_MD5 = 551626a158c2a2cbfd937d27ecc7fac1
|
||||
|
||||
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) $(DIR_SRC)/linux && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_SRC) && ln -sf linux-$(VER) linux
|
||||
cd $(DIR_APP) && sed -i -e 's/-Werror//' drivers/scsi/aic7xxx/Makefile
|
||||
|
||||
# Openswan
|
||||
cd $(DIR_SRC) && rm -rf openswan-*
|
||||
cd $(DIR_SRC) && tar xfz $(DIR_DL)/openswan-1.0.10rc2.tar.gz
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.1-plutoctl.patch
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && patch -Np1 < $(DIR_SRC)/src/patches/openswan-1.0.6-numif.patch
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i 's+^KERNELSRC.*$$+KERNELSRC=$(ROOT)/usr/src/linux-$(VER)+' Makefile.inc
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && sed -i -e 's/local\/sbin/local\/sbin:\/tools\/bin/' utils/patcher
|
||||
cd $(DIR_SRC)/openswan-1.0.10rc2 && make insert
|
||||
|
||||
# Patch-o-matic
|
||||
cd $(DIR_SRC) && rm -rf iptables-*
|
||||
cd $(DIR_SRC) && tar xfj $(DIR_DL)/iptables-1.3.5.tar.bz2
|
||||
cd $(DIR_SRC) && ln -sf iptables-1.3.5 iptables
|
||||
cd $(DIR_SRC) && rm -rf patch-o-matic*
|
||||
cd $(DIR_SRC) && tar xfj $(DIR_DL)/patch-o-matic-ng-20060206.tar.bz2
|
||||
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pending
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ base
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ h323-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ cuseeme-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ mms-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ pptp-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ rtsp-conntrack
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ quake3-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ sip-conntrack-nat
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ip_queue_vwmark
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipp2p
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-01-output-hooks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-02-input-hooks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-03-policy-lookup
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ ipsec-04-policy-checks
|
||||
cd $(DIR_SRC)/patch-o-matic* && yes 'y' | ./runme --kernel-path=$(ROOT)/usr/src/linux/ --iptables-path=$(ROOT)/usr/src/iptables/ TARPIT
|
||||
|
||||
#imq-patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.28-imq2.diff
|
||||
|
||||
#layer7-patch
|
||||
cd $(DIR_SRC) && tar xzf $(DIR_DL)/netfilter-layer7-v2.1.tar.gz
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/netfilter-layer7-v2.1/kernel-2.4-layer7-2.1.patch
|
||||
|
||||
ifeq "$(EMB)" "1"
|
||||
#Emb-patches
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/kbc_option_2420.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_DL)/net4801.kernel.patch_2.4.31
|
||||
endif
|
||||
|
||||
ifeq "$(SMP)" ""
|
||||
# Only do this once on the non-SMP pass
|
||||
cd $(DIR_SRC) && tar czf $(DIR_DL)/iptables-fixed.tar.gz iptables-1.2.11
|
||||
endif
|
||||
|
||||
# Olitec isdn gazel patch
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.23-olitec-isdn.patch
|
||||
|
||||
# Fix /proc/stat output
|
||||
cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/linux-2.4.26-proc-stat.patch
|
||||
|
||||
# Fix libata-core.c
|
||||
# cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/linux-2.4.26-scsi.patch
|
||||
|
||||
# frandom patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-frandom-2.patch
|
||||
|
||||
# Propolice
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.27-ssp-1.patch
|
||||
|
||||
# Support ppp-2.4.3 multilink behavior (terminate when no channel is connected)
|
||||
# need updated libpcap older than 0.8.3
|
||||
# cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ppp_generic-ppp-2.4.3_multilink.patch
|
||||
|
||||
# R8169 clone D-link GSE-528T
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-2.4.29_r8169clone.patch
|
||||
|
||||
# Cleanup kernel source
|
||||
cd $(DIR_APP) && make mrproper
|
||||
ifeq "$(ROOT)" ""
|
||||
ifeq "$(LFS_PASS)" "ipcop"
|
||||
ifeq "$(SMP)" ""
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE) $(DIR_APP)/.config
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).smp $(DIR_APP)/.config
|
||||
endif
|
||||
ifeq "$(SMP)" "installer"
|
||||
cp $(DIR_SRC)/config/kernel/kernel.config.$(MACHINE).installer $(DIR_APP)/.config
|
||||
cd $(DIR_APP) && sed -i -e 's/-O2/-Os/g' Makefile
|
||||
endif
|
||||
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" oldconfig
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" dep
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" clean
|
||||
if [ "$(MACHINE)" = "i386" -a "$(EMB)" = "" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER); \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \
|
||||
ln -sf vmlinuz-$(VER) /boot/vmlinuz; \
|
||||
ln -sf System.map-$(VER) /boot/System.map; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "1" ]; then \
|
||||
cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =/EXTRAVERSION\ =\ -EMB/' Makefile; \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-$(VER)-EMB; \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER)-EMB; \
|
||||
ln -sf vmlinuz-$(VER)-EMB /boot/vmlinuz-EMB; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
elif [ "$(MACHINE)" = "i386" -a "$(EMB)" = "installer" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" bzImage; \
|
||||
cd $(DIR_APP) && cp arch/$(MACHINE)/boot/bzImage /boot/vmlinuz-installer; \
|
||||
elif [ "$(MACHINE)" = "alpha" ]; then \
|
||||
cd $(DIR_APP) && make -j 3 CC="$(KGCC)" vmlinux; \
|
||||
cd $(DIR_APP) && gzip -9c vmlinux > /boot/vmlinuz-$(VER); \
|
||||
cd $(DIR_APP) && cp System.map /boot/System.map-$(VER); \
|
||||
ln -sf vmlinuz-$(VER) /boot/vmlinuz; \
|
||||
ln -sf System.map-$(VER) /boot/System.map; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules; \
|
||||
cd $(DIR_APP) && make CC="$(KGCC)" modules_install; \
|
||||
fi
|
||||
# remove symlinked pcmcia directory
|
||||
ifeq "$(SMP)" ""
|
||||
rm -rf /lib/modules/$(VER)/pcmcia
|
||||
find /lib/modules/$(VER)/ -name '*.o' -a -type f | xargs gzip -f9
|
||||
|
||||
# Move these SCSI drivers into same directory for probescsi.sh
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aic7xxx
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/aacraid/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/aacraid
|
||||
mv -f /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)/kernel/drivers/scsi/sym53c8xx_2
|
||||
endif
|
||||
ifeq "$(SMP)" "1"
|
||||
rm -rf /lib/modules/$(VER)-smp/pcmcia
|
||||
find /lib/modules/$(VER)-smp/ -name '*.o' -a -type f | xargs gzip -f9
|
||||
|
||||
# Move these SCSI drivers into same directory for probescsi.sh
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aic7xxx
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/aacraid
|
||||
mv -f /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2/* /lib/modules/$(VER)-smp/kernel/drivers/scsi
|
||||
rm -rf /lib/modules/$(VER)-smp/kernel/drivers/scsi/sym53c8xx_2
|
||||
endif
|
||||
|
||||
ifeq "$(SMP)" ""
|
||||
# Only do this once on the non-SMP pass
|
||||
cd $(DIR_APP) && make mandocs
|
||||
-mkdir -p /usr/share/man/man9/
|
||||
cd $(DIR_APP) && cp -af Documentation/man/* /usr/share/man/man9/
|
||||
endif
|
||||
else
|
||||
cd $(DIR_APP) && make include/linux/version.h
|
||||
cd $(DIR_APP) && make symlinks
|
||||
cd $(DIR_APP) && cp -HRf include/asm /usr/include
|
||||
cd $(DIR_APP) && cp -Rf include/asm-generic /usr/include
|
||||
cd $(DIR_APP) && cp -Rf include/linux /usr/include
|
||||
touch /usr/include/linux/autoconf.h
|
||||
endif
|
||||
else
|
||||
cd $(DIR_APP) && make include/linux/version.h
|
||||
cd $(DIR_APP) && make symlinks
|
||||
-mkdir -p /tools/include/asm
|
||||
cd $(DIR_APP) && cp -f include/asm/* /tools/include/asm
|
||||
cd $(DIR_APP) && cp -Rf include/asm-generic /tools/include
|
||||
cd $(DIR_APP) && cp -Rf include/linux /tools/include
|
||||
cd $(DIR_APP) && touch /tools/include/linux/autoconf.h
|
||||
endif
|
||||
@rm -rf $(DIR_SRC)/patch-o-matic* $(DIR_SRC)/iptables*
|
||||
@$(POSTBUILD)
|
||||
|
||||
Reference in New Issue
Block a user