From b6dae6acad683922ad254fa9c67df00d1bae7235 Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Sun, 23 Nov 2008 13:33:58 +0200 Subject: [PATCH] linux26: Updated (2.6.22.19 -> 2.6.27.6), adapted patches, enhanced linux build system to honor arches that were merged (x86 and x86_64 etc) --- base/linux26/12-conf-hacks.patch | 161 +++++++++++------- .../96-usb-hid-apple-kbd-mapping.patch | 20 +-- base/linux26/adaptec-usbxchange.patch | 22 +-- base/linux26/linux-conf.in | 29 +++- base/linux26/linux26.desc | 6 +- base/linux26/sk98lin-export-id-table.patch | 31 ---- 6 files changed, 147 insertions(+), 122 deletions(-) delete mode 100644 base/linux26/sk98lin-export-id-table.patch diff --git a/base/linux26/12-conf-hacks.patch b/base/linux26/12-conf-hacks.patch index 91b51a356..029868f1a 100644 --- a/base/linux26/12-conf-hacks.patch +++ b/base/linux26/12-conf-hacks.patch @@ -2,8 +2,9 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../linux26/12-conf-hacks.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# Copyright (C) 1998 - 2003 Clifford Wolf +# Copyright (C) 2008 The OpenSDE Project +# Copyright (C) 2004 - 2008 The T2 SDE Project +# Copyright (C) 1998 - 2003 ROCK Linux Project # # More information can be found in the files COPYING and README. # @@ -15,14 +16,76 @@ # version. # --- SDE-COPYRIGHT-NOTE-END --- -Set all unset options to module. Needed by the T2 / ROCK Linux kernel -configuration. +Set all unset options to module. Needed by the T2 SDE Linux kernel +auto configuration. -Initally written by Clifford Wold and adapted +Initally written by Clifford Wolf and adapted for various new 2.5/2.6 kernels by Rene Rebe . ---- ./scripts/kconfig/Makefile.orig 2006-03-19 19:38:46.080184500 +0100 -+++ ./scripts/kconfig/Makefile 2006-03-19 20:01:55.859040250 +0100 +diff -ur linux-2.6.27/scripts/kconfig/conf.c linux-2.6.27.work/scripts/kconfig/conf.c +--- linux-2.6.27/scripts/kconfig/conf.c 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27.work/scripts/kconfig/conf.c 2008-10-19 14:39:10.000000000 +0200 +@@ -22,6 +22,7 @@ + ask_all, + ask_new, + ask_silent, ++ set_no2mod, + set_default, + set_yes, + set_mod, +@@ -438,7 +439,7 @@ + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + +- while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) { ++ while ((opt = getopt(ac, av, "osdD:nmMyrh")) != -1) { + switch (opt) { + case 'o': + input_mode = ask_silent; +@@ -460,6 +461,9 @@ + case 'm': + input_mode = set_mod; + break; ++ case 'M': ++ input_mode = set_no2mod; ++ break; + case 'y': + input_mode = set_yes; + break; +@@ -533,6 +537,9 @@ + else if (!stat("all.config", &tmpstat)) + conf_read_simple("all.config", S_DEF_USER); + break; ++ case set_no2mod: ++ conf_read_simple(".config", S_DEF_USER); ++ break; + default: + break; + } +@@ -559,6 +566,9 @@ + case set_mod: + conf_set_all_new_symbols(def_mod); + break; ++ case set_no2mod: ++ conf_set_all_new_symbols(def_no2mod); ++ break; + case set_random: + conf_set_all_new_symbols(def_random); + break; +diff -ur linux-2.6.27/scripts/kconfig/lkc.h linux-2.6.27.work/scripts/kconfig/lkc.h +--- linux-2.6.27/scripts/kconfig/lkc.h 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27.work/scripts/kconfig/lkc.h 2008-10-19 14:14:59.000000000 +0200 +@@ -46,6 +46,7 @@ + def_default, + def_yes, + def_mod, ++ def_no2mod, + def_no, + def_random + }; +diff -ur linux-2.6.27/scripts/kconfig/Makefile linux-2.6.27.work/scripts/kconfig/Makefile +--- linux-2.6.27/scripts/kconfig/Makefile 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27.work/scripts/kconfig/Makefile 2008-10-19 14:14:59.000000000 +0200 @@ -2,7 +2,7 @@ # Kernel configuration targets # These targets are used from top-level makefile @@ -30,19 +93,19 @@ for various new 2.5/2.6 kernels by Rene Rebe . -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig no2modconfig update-po-config - xconfig: $(obj)/qconf - $< arch/$(ARCH)/Kconfig -@@ -56,6 +56,9 @@ + Kconfig := arch/$(SRCARCH)/Kconfig + +@@ -61,6 +61,9 @@ allmodconfig: $(obj)/conf - $< -m arch/$(ARCH)/Kconfig + $< -m $(Kconfig) +no2modconfig: scripts/kconfig/conf -+ $< -M arch/$(ARCH)/Kconfig ++ $< -M $(Kconfig) + defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) - $< -d arch/$(ARCH)/Kconfig -@@ -77,6 +80,7 @@ + $< -d $(Kconfig) +@@ -83,6 +86,7 @@ @echo ' randconfig - New config with random answer to all options' @echo ' defconfig - New config with default answer to all options' @echo ' allmodconfig - New config selecting modules when possible' @@ -50,55 +113,23 @@ for various new 2.5/2.6 kernels by Rene Rebe . @echo ' allyesconfig - New config where all options are accepted with yes' @echo ' allnoconfig - New config where all options are answered with no' ---- linux-2.6.17/scripts/kconfig/conf.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux26.macbook/scripts/kconfig/conf.c 2006-07-22 11:57:17.000000000 +0200 -@@ -21,6 +21,7 @@ - ask_all, - ask_new, - ask_silent, -+ set_no2mod, - set_default, - set_yes, - set_mod, -@@ -83,6 +84,15 @@ - } - - switch (input_mode) { -+ case set_no2mod: -+ if (type == S_TRISTATE && -+ sym_get_tristate_value(sym) == no) { -+ fprintf(stderr, "Setting %s to 'm'.\n", sym->name); -+ line[0] = 'm'; -+ line[1] = '\n'; -+ line[2] = 0; -+ break; +--- linux-2.6.27.vanilla/scripts/kconfig/confdata.c 2008-10-10 00:13:53.000000000 +0200 ++++ linux-2.6.27/scripts/kconfig/confdata.c 2008-10-20 12:45:07.000000000 +0200 +@@ -824,6 +824,17 @@ + for_all_symbols(i, sym) { + if (sym_has_value(sym)) + continue; ++ if ((mode == def_no2mod) && (sym_get_type(sym) == S_TRISTATE)) { ++ if (sym_get_tristate_value(sym) == no) ++ fprintf(stderr, "Setting %s to 'm'.\n", sym->name); ++ if (sym_get_tristate_value(sym) == mod) ++ fprintf(stderr, "Keep %s as 'm'.\n", sym->name); ++ if (sym_get_tristate_value(sym) != yes) ++ sym->def[S_DEF_USER].tri = mod; ++ if (!sym_is_choice(sym)) ++ sym->flags |= SYMBOL_DEF_USER; ++ continue; + } - case set_no: - case set_mod: - case set_yes: -@@ -372,6 +382,7 @@ - break; - case set_random: - def = (random() % cnt) + 1; -+ case set_no2mod: - case set_default: - case set_yes: - case set_mod: -@@ -523,6 +534,9 @@ - case 'm': - input_mode = set_mod; - break; -+ case 'M': -+ input_mode = set_no2mod; -+ break; - case 'y': - input_mode = set_yes; - break; -@@ -565,6 +579,7 @@ - } - case ask_all: - case ask_new: -+ case set_no2mod: - conf_read(NULL); - break; - case set_no: + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: diff --git a/base/linux26/96-usb-hid-apple-kbd-mapping.patch b/base/linux26/96-usb-hid-apple-kbd-mapping.patch index 04c8ec196..44976d849 100644 --- a/base/linux26/96-usb-hid-apple-kbd-mapping.patch +++ b/base/linux26/96-usb-hid-apple-kbd-mapping.patch @@ -2,8 +2,8 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../linux26/96-usb-hid-apple-kbd-mapping.patch -# Copyright (C) 2007 The OpenSDE Project -# Copyright (C) 2004 - 2007 The T2 SDE Project +# Copyright (C) 2008 The OpenSDE Project +# Copyright (C) 2004 - 2008 The T2 SDE Project # # More information can be found in the files COPYING and README. # @@ -46,14 +46,14 @@ Likewise, default to the normal F* keys for usability on the Linux desktop. } else map_key(KEY_UNKNOWN); ---- linux-2.6.20/drivers/hid/hid-input.c.vanilla 2007-02-05 11:24:46.737682437 +0100 -+++ linux-2.6.20/drivers/hid/hid-input.c 2007-02-05 11:24:52.770026201 +0100 -@@ -35,7 +35,7 @@ - +--- linux-2.6.25/drivers/hid/hid-input.c.vanilla 2008-04-18 12:36:56.000000000 +0200 ++++ linux-2.6.25/drivers/hid/hid-input.c 2008-04-18 12:37:03.000000000 +0200 +@@ -34,7 +34,7 @@ #include + #include --static int hid_pb_fnmode = 1; -+static int hid_pb_fnmode = 2; - module_param_named(pb_fnmode, hid_pb_fnmode, int, 0644); +-static int hid_apple_fnmode = 1; ++static int hid_apple_fnmode = 2; + module_param_named(pb_fnmode, hid_apple_fnmode, int, 0644); MODULE_PARM_DESC(pb_fnmode, - "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); + "Mode of fn key on Apple keyboards (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); diff --git a/base/linux26/adaptec-usbxchange.patch b/base/linux26/adaptec-usbxchange.patch index 31d52a98f..1ffcfd148 100644 --- a/base/linux26/adaptec-usbxchange.patch +++ b/base/linux26/adaptec-usbxchange.patch @@ -2,8 +2,8 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../linux26/adaptec-usbxchange.patch -# Copyright (C) 2007 The OpenSDE Project -# Copyright (C) 2006 The T2 SDE Project +# Copyright (C) 2008 The OpenSDE Project +# Copyright (C) 2006 - 2008 The T2 SDE Project # # More information can be found in the files COPYING and README. # @@ -375,11 +375,11 @@ Support for the Adaptec USB*Xchange family of USB<->SCSI cables. +#define CPUCS_REG_FX2 0xE600 /* FX2 */ + +#endif ---- linux-2.6.15/drivers/usb/storage/transport.c 2006-01-03 04:21:10.000000000 +0100 -+++ ./drivers/usb/storage/transport.c 2006-01-30 19:41:26.727402000 +0100 -@@ -984,6 +984,11 @@ +--- ./drivers/usb/storage/transport.c~ 2008-10-10 00:13:53.000000000 +0200 ++++ ./drivers/usb/storage/transport.c 2008-10-17 10:14:01.000000000 +0200 +@@ -925,6 +925,11 @@ bcb->Lun = srb->device->lun; - if (us->flags & US_FL_SCM_MULT_TARG) + if (us->fflags & US_FL_SCM_MULT_TARG) bcb->Lun |= srb->device->id << 4; + /* Adaptec USB2Xchange */ + if (us->pusb_dev->descriptor.idVendor == 0x03f3 && @@ -389,13 +389,14 @@ Support for the Adaptec USB*Xchange family of USB<->SCSI cables. bcb->Length = srb->cmd_len; /* copy the command payload */ -@@ -1069,6 +1074,20 @@ +@@ -1008,6 +1013,22 @@ US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", le32_to_cpu(bcs->Signature), bcs->Tag, residue, bcs->Status); ++ + if (bcs->Status > US_BULK_STAT_FAIL) { + /* Adaptec USB2XCHANGE ? */ -+ if (us->pusb_dev->descriptor.idVendor == 0x03f3 && ++ if (us->pusb_dev->descriptor.idVendor == 0x03f3 && + us->pusb_dev->descriptor.idProduct == 0x2003) { + + /* This device will send @@ -407,6 +408,7 @@ Support for the Adaptec USB*Xchange family of USB<->SCSI cables. + US_DEBUGP("Patched Bulk status to %d.\n", bcs->Status); + } + } - if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) { ++ + if (!(bcs->Tag == us->tag || (us->fflags & US_FL_BULK_IGNORE_TAG)) || + bcs->Status > US_BULK_STAT_PHASE) { US_DEBUGP("Bulk logical error\n"); - return USB_STOR_TRANSPORT_ERROR; diff --git a/base/linux26/linux-conf.in b/base/linux26/linux-conf.in index ec2f746e4..cf2084567 100644 --- a/base/linux26/linux-conf.in +++ b/base/linux26/linux-conf.in @@ -19,10 +19,24 @@ treever=${pkg/linux/} ; treever=${treever/-*/} [ "$lx_cpu" ] || # powerpc and mips share the same arch for 32/64, maybe more follow lx_cpu=`echo $arch | arch2uname | sed -e s/ppc.*/powerpc/ -e s/mips64/mips/` +lx_arch=`echo $lx_cpu | sed 's/i386/x86/;s/x86_64/x86/;s/ppc.*/powerpc/'` +lx_subarch=`echo $lx_cpu | sed 's/i.86/i386/;s/sun4u/sparc64/;\ + s/arm.*/arm/;s/sa110/arm/;\ + s/s390x/s390/;s/parisc64/parisc/;\ + s/ppc.*/powerpc/;s/mips.*/mips/'` lx_extraversion= lx_kernelrelease= lx_customconf="\$base/config/$config/linux.cfg" +# $lx_mergedarch is 1 if the kernel has x86 and x86_64 arches merged +lx_mergedarch= +ver_n=0 +for x in $( echo "$ver" | cut -d. -f1-3 | tr '.' ' ' ); do + ver_n=$( expr $ver_n \* 1000 + $x ) +done +if [ $ver_n -ge 2006024 ]; then + lx_mergedarch=1 +fi # $lx_confmerge list of config snaps gets merged to .config.3 on auto_config() # lx_confmerge= @@ -53,7 +67,11 @@ makeopt= # we need +1 to really saturate the CPUs during the kernel build [ $SDECFG_PARALLEL_MAX -gt 1 ] && var_append makeopt ' ' -j$(( $SDECFG_PARALLEL_MAX + 1 )) -var_append makeopt ' ' "ARCH=$lx_cpu CROSS_COMPILE=$archprefix KCC=$KCC" +if [ $lx_mergedarch = 1 ]; then + var_append makeopt ' ' "ARCH=$lx_arch CROSS_COMPILE=$archprefix KCC=$KCC" +else + var_append makeopt ' ' "ARCH=$lx_cpu CROSS_COMPILE=$archprefix KCC=$KCC" +fi makeinstopt="$makeopt" auto_config_merge() { @@ -70,9 +88,14 @@ auto_config() { # get defconfig (.config.0) # echo "Creating linux default config" - cp arch/$lx_cpu/defconfig .config - cp .config{,.0} + if [ -f arch/$lx_cpu/defconfig ]; then + cp arch/$lx_cpu/defconfig .config + cp .config{,.0} + else + cp arch/$lx_arch/configs/${lx_subarch}_defconfig .config + cp .config{,.0} + fi # architecture specific configuration (will be merged) x=$( ls -1 $base/package/*/linux26/arch/config.$arch.sh 2> /dev/null | head -n 1) if [ -f "$x" ]; then diff --git a/base/linux26/linux26.desc b/base/linux26/linux26.desc index bd5ef30de..58671ff2d 100644 --- a/base/linux26/linux26.desc +++ b/base/linux26/linux26.desc @@ -31,8 +31,8 @@ [L] GPL [S] Stable -[V] 2.6.22.19 +[V] 2.6.27.6 [P] X -?---5---9 102.060 -[D] 1574942628 linux-2.6.22.tar.bz2 http://ftp.kernel.org/pub/linux/kernel/v2.6/ -[D] 973184464 patch-2.6.22.19.bz2 http://kernel.org/pub/linux/kernel/v2.6/ +[D] 617394643 linux-2.6.27.tar.bz2 http://ftp.kernel.org/pub/linux/kernel/v2.6/ +[D] 1311319754 patch-2.6.27.6.bz2 http://kernel.org/pub/linux/kernel/v2.6/ diff --git a/base/linux26/sk98lin-export-id-table.patch b/base/linux26/sk98lin-export-id-table.patch deleted file mode 100644 index 3d4b1a5dc..000000000 --- a/base/linux26/sk98lin-export-id-table.patch +++ /dev/null @@ -1,31 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../linux26/sk98lin-export-id-table.patch -# Copyright (C) 2004 - 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. -# --- SDE-COPYRIGHT-NOTE-END --- - -Well, no idea why this is missing ... - - - Rene Rebe - ---- linux-2.6.11/drivers/net/sk98lin/skge.c.vanilla 2005-05-25 18:36:44.000000000 +0200 -+++ linux-2.6.11/drivers/net/sk98lin/skge.c 2005-05-25 18:38:33.000000000 +0200 -@@ -5152,6 +5152,8 @@ - { 0, } - }; - -+MODULE_DEVICE_TABLE(pci, skge_pci_tbl); -+ - static struct pci_driver skge_driver = { - .name = "skge", - .id_table = skge_pci_tbl,