From fdf0c7c15d675a0f59939c6d228223962946f324 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 5 Oct 2011 20:20:36 +0200 Subject: [PATCH] kernel: change selection of config to support more architectures. --- lfs/Config | 17 ++------- lfs/alsa | 11 +----- lfs/compat-wireless | 10 +---- lfs/cryptodev | 12 +----- lfs/dahdi | 12 +----- lfs/e1000 | 10 +---- lfs/e1000e | 10 +---- lfs/igb | 10 +---- lfs/kqemu | 12 +----- lfs/kvm-kmod | 12 +----- lfs/linux | 18 ++------- lfs/mISDN | 12 +----- lfs/madwifi | 13 +------ lfs/r8101 | 12 +----- lfs/r8168 | 12 +----- lfs/r8169 | 12 +----- lfs/v4l-dvb | 10 +---- make.sh | 92 ++++++++++++++++++++++----------------------- 18 files changed, 78 insertions(+), 219 deletions(-) diff --git a/lfs/Config b/lfs/Config index b91f2ee63d..2bc0754734 100644 --- a/lfs/Config +++ b/lfs/Config @@ -82,16 +82,8 @@ define PREBUILD # Fix installation on partial rebuild, so modules install where they should # and not everytime on the last compiled kernel if [ -f $(DIR_SRC)/linux-$(KVER) ]; then \ - if [ "$(PAE)" = "1" ]; then \ - cd $(DIR_SRC)/linux-$(KVER) && \ - sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))-ipfire-pae+' Makefile; \ - elif [ "$(XEN)" = "" ]; then \ - cd $(DIR_SRC)/linux-$(KVER) && \ - sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))-ipfire+' Makefile; \ - else \ - cd $(DIR_SRC)/linux-$(KVER) && \ - sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))-ipfire-xen+' Makefile; \ - fi; \ + cd $(DIR_SRC)/linux-$(KVER) && \ + sed -i -e 's+^EXTRAVERSION.*$$+EXTRAVERSION\ =\ $(word 4,$(subst ., .,$(KVER)))-ipfire$(KCFG)+' Makefile; \ fi endef else @@ -119,10 +111,7 @@ define POSTBUILD # $(TARGET)_rootfile : ROOTFILE with KVER replacement # $(TARGET) : log result with {commented|include|added} files if [ -s "$(TARGET)_diff" ]; then \ - if [ "$(PAE)" = "1" ]; then LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))-pae; \ - elif [ "$(XEN)" = "1" ]; then LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))-xen; \ - else LFS_SCRIPT=$(firstword $(MAKEFILE_LIST)); \ - fi; \ + LFS_SCRIPT=$(firstword $(MAKEFILE_LIST))$(KCFG); \ echo $(LFS_SCRIPT); \ ROOTFILE=$$(find $(DIR_SRC)/config/rootfiles/{common,packages}/{$(MACHINE),} -maxdepth 1 -type f -name $$LFS_SCRIPT 2>/dev/null | head -1); \ if [ "$$ROOTFILE" = "" ]; then \ diff --git a/lfs/alsa b/lfs/alsa index f6f6df8046..dadaa145e7 100644 --- a/lfs/alsa +++ b/lfs/alsa @@ -24,21 +24,14 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif VER = 1.0.24.1 UVER = 1.0.24.2 FVER = 1.0.24.1 DVER = 1.0.24 +VERSUFIX = ipfire$(KCFG) + THISAPP = alsa-lib-$(VER) DL_FILE = $(THISAPP).tar.bz2 DL_FROM = $(URL_IPFIRE) diff --git a/lfs/compat-wireless b/lfs/compat-wireless index 4e97dabf84..bcde045090 100644 --- a/lfs/compat-wireless +++ b/lfs/compat-wireless @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 3.0-2 diff --git a/lfs/cryptodev b/lfs/cryptodev index cd69034560..17a10c7605 100644 --- a/lfs/cryptodev +++ b/lfs/cryptodev @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 20091126 diff --git a/lfs/dahdi b/lfs/dahdi index 8e0de9bdcb..0ae424c428 100644 --- a/lfs/dahdi +++ b/lfs/dahdi @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2011 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 2.2.1 TVER = 2.2.1 diff --git a/lfs/e1000 b/lfs/e1000 index 93a01a2b57..8fe88cdd16 100644 --- a/lfs/e1000 +++ b/lfs/e1000 @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 8.0.30 diff --git a/lfs/e1000e b/lfs/e1000e index 274676131f..70ca9c62f3 100644 --- a/lfs/e1000e +++ b/lfs/e1000e @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 1.3.10a diff --git a/lfs/igb b/lfs/igb index 90d3d616ee..00996b44e0 100644 --- a/lfs/igb +++ b/lfs/igb @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 3.0.19 diff --git a/lfs/kqemu b/lfs/kqemu index ebb148fa33..6e5ecfaefd 100644 --- a/lfs/kqemu +++ b/lfs/kqemu @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 1.4.0pre1 diff --git a/lfs/kvm-kmod b/lfs/kvm-kmod index fad1c59ad9..0280b5e69a 100644 --- a/lfs/kvm-kmod +++ b/lfs/kvm-kmod @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 3.0b diff --git a/lfs/linux b/lfs/linux index 25ff5daf40..fe2cf2a60d 100644 --- a/lfs/linux +++ b/lfs/linux @@ -40,15 +40,7 @@ DEPS = "" # Normal build or XEN build. # -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) ifeq "$(HEADERS)" "1" ifeq "$(TOOLS)" "1" @@ -122,7 +114,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) ln -svf linux-$(VER) $(DIR_SRC)/linux -ifeq "$(XEN)" "1" +ifeq "$(KCFG)" "-xen" # Apply gentoo Xen patches mkdir -p $(DIR_SRC)/xen-patches cd $(DIR_SRC)/xen-patches && tar jxf $(DIR_DL)/xen-patches-2.6.32-2f.tar.bz2 @@ -188,7 +180,7 @@ else cd $(DIR_APP) && make CC="$(KGCC)" clean cd $(DIR_APP) && sed -i -e 's/EXTRAVERSION\ =.*/EXTRAVERSION\ =\ $(PATCHLEVEL)-$(VERSUFIX)/' Makefile -ifeq "$(XEN)" "1" +ifeq "$(KCFG)" "-xen" cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" vmlinuz cd $(DIR_APP) && cp -v arch/i386/boot/vmlinuz /boot/vmlinuz-$(VER)-$(VERSUFIX) else @@ -209,8 +201,7 @@ endif cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) modules_install cd $(DIR_APP) && make CC="$(KGCC)" $(MAKETUNING) firmware_install -ifneq "$(PAE)" "1" -ifneq "$(XEN)" "1" +ifeq "$(KCFG)" "" # Only do this once on the standard kernel pass cd $(DIR_APP) && install -m 755 usr/gen_init_cpio /sbin/ @@ -235,7 +226,6 @@ ifneq "$(XEN)" "1" # Disable ipv6 at runtime echo "options ipv6 disable_ipv6=1" > /etc/modprobe.d/ipv6 -endif endif # Remove mISDN modules diff --git a/lfs/mISDN b/lfs/mISDN index 7ea0c67a1b..9c5f4004a3 100644 --- a/lfs/mISDN +++ b/lfs/mISDN @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = 20100525 diff --git a/lfs/madwifi b/lfs/madwifi index fb44be98ba..2d3f97ed99 100644 --- a/lfs/madwifi +++ b/lfs/madwifi @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,16 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else - -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = hal-0.10.5.6-r4119-20100201 diff --git a/lfs/r8101 b/lfs/r8101 index a523c68dd0..266e891bd1 100644 --- a/lfs/r8101 +++ b/lfs/r8101 @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 1.019.00 diff --git a/lfs/r8168 b/lfs/r8168 index a80d15694d..2a4e2abad2 100644 --- a/lfs/r8168 +++ b/lfs/r8168 @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 8.019.00 diff --git a/lfs/r8169 b/lfs/r8169 index b738385361..85a6dc179d 100644 --- a/lfs/r8169 +++ b/lfs/r8169 @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2011 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX = ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX = ipfire-xen -else - VERSUFIX = ipfire -endif -endif +VERSUFIX = ipfire$(KCFG) VER = 6.014.00 diff --git a/lfs/v4l-dvb b/lfs/v4l-dvb index 6c6a5fc5bb..730173efd7 100644 --- a/lfs/v4l-dvb +++ b/lfs/v4l-dvb @@ -24,15 +24,7 @@ include Config -ifeq "$(PAE)" "1" - VERSUFIX=ipfire-pae -else -ifeq "$(XEN)" "1" - VERSUFIX=ipfire-xen -else - VERSUFIX=ipfire -endif -endif +VERSUFIX=ipfire$(KCFG) VER = git20110427 diff --git a/make.sh b/make.sh index 84597c2c42..c65ad5a22c 100755 --- a/make.sh +++ b/make.sh @@ -368,59 +368,59 @@ buildipfire() { # The xen and PAE kernels are only available for x86 if [ "${MACHINE_TYPE}" != "arm" ]; then - ipfiremake linux XEN=1 - ipfiremake kqemu XEN=1 - ipfiremake v4l-dvb XEN=1 - ipfiremake madwifi XEN=1 - ipfiremake mISDN XEN=1 - ipfiremake dahdi XEN=1 KMOD=1 - ipfiremake cryptodev XEN=1 - ipfiremake compat-wireless XEN=1 - ipfiremake r8169 XEN=1 - ipfiremake r8168 XEN=1 - ipfiremake r8101 XEN=1 - ipfiremake e1000 XEN=1 - ipfiremake e1000e XEN=1 - ipfiremake igb XEN=1 - ipfiremake linux PAE=1 - ipfiremake kqemu PAE=1 - ipfiremake kvm-kmod PAE=1 - ipfiremake v4l-dvb PAE=1 - ipfiremake madwifi PAE=1 - ipfiremake alsa PAE=1 KMOD=1 - ipfiremake mISDN PAE=1 - ipfiremake dahdi PAE=1 KMOD=1 - ipfiremake cryptodev PAE=1 - ipfiremake compat-wireless PAE=1 -# ipfiremake r8169 PAE=1 -# ipfiremake r8168 PAE=1 -# ipfiremake r8101 PAE=1 - ipfiremake e1000 PAE=1 - ipfiremake e1000e PAE=1 - ipfiremake igb PAE=1 + ipfiremake linux KCFG="-xen" + ipfiremake kqemu KCFG="-xen" + ipfiremake v4l-dvb KCFG="-xen" + ipfiremake madwifi KCFG="-xen" + ipfiremake mISDN KCFG="-xen" + ipfiremake dahdi KCFG="-xen" KMOD=1 + ipfiremake cryptodev KCFG="-xen" + ipfiremake compat-wireless KCFG="-xen" + ipfiremake r8169 KCFG="-xen" + ipfiremake r8168 KCFG="-xen" + ipfiremake r8101 KCFG="-xen" + ipfiremake e1000 KCFG="-xen" + ipfiremake e1000e KCFG="-xen" + ipfiremake igb KCFG="-xen" + ipfiremake linux KCFG="-pae" + ipfiremake kqemu KCFG="-pae" + ipfiremake kvm-kmod KCFG="-pae" + ipfiremake v4l-dvb KCFG="-pae" + ipfiremake madwifi KCFG="-pae" + ipfiremake alsa KCFG="-pae" KMOD=1 + ipfiremake mISDN KCFG="-pae" + ipfiremake dahdi KCFG="-pae" KMOD=1 + ipfiremake cryptodev KCFG="-pae" + ipfiremake compat-wireless KCFG="-pae" +# ipfiremake r8169 KCFG="-pae" +# ipfiremake r8168 KCFG="-pae" +# ipfiremake r8101 KCFG="-pae" + ipfiremake e1000 KCFG="-pae" + ipfiremake e1000e KCFG="-pae" + ipfiremake igb KCFG="-pae" fi # Default kernel build - ipfiremake linux - ipfiremake v4l-dvb - ipfiremake kqemu - ipfiremake kvm-kmod - ipfiremake madwifi + ipfiremake linux KCFG="" + ipfiremake v4l-dvb KCFG="" + ipfiremake kqemu KCFG="" + ipfiremake kvm-kmod KCFG="" + ipfiremake madwifi KCFG="" if [ "${MACHINE_TYPE}" != "arm" ]; then #todo enable alsa driver in kernel config - ipfiremake alsa KMOD=1 + ipfiremake alsa KCFG="" KMOD=1 fi #undefined declaration in echo canceler try to fix later - ipfiremake mISDN - ipfiremake dahdi KMOD=1 - ipfiremake cryptodev - ipfiremake compat-wireless -# ipfiremake r8169 -# ipfiremake r8168 -# ipfiremake r8101 - ipfiremake e1000 - ipfiremake e1000e - ipfiremake igb + ipfiremake mISDN KCFG="" + ipfiremake dahdi KCFG="" KMOD=1 + ipfiremake cryptodev KCFG="" + ipfiremake compat-wireless KCFG="" +# ipfiremake r8169 KCFG="" +# ipfiremake r8168 KCFG="" +# ipfiremake r8101 KCFG="" + ipfiremake e1000 KCFG="" + ipfiremake e1000e KCFG="" + ipfiremake igb KCFG="" ipfiremake pkg-config ipfiremake linux-atm ipfiremake cpio -- 2.39.2