# HG changeset patch # User Rob Landley # Date 1311474006 18000 # Node ID 9fcb35fbdbd7bb172c788d7bf88746262b0b1d99 # Parent 594e155517812d67f58651e41e251cb67ca6ccc2 Linux kernel 3.0. diff -r 594e15551781 -r 9fcb35fbdbd7 download.sh --- a/download.sh Sat Jul 23 18:35:10 2011 -0500 +++ b/download.sh Sat Jul 23 21:20:06 2011 -0500 @@ -21,9 +21,9 @@ # Building a cross compile toolchain requires linux headers, uClibc, # binutils, and gcc. -URL=http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2 \ -SHA1=68518112821e55f4ac1df64f2e0e809cedfcc5ef \ -#UNSTABLE=http://kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.32-rc7.tar.bz2 \ +URL=http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.bz2 \ +SHA1=45b64bffc860f70ab7956da4493c488010714650 \ +#UNSTABLE=http://kernel.org/pub/linux/kernel/v3.0/testing/linux-3.0-rc1.tar.bz2 \ maybe_fork "download || dienow" URL=http://uclibc.org/downloads/uClibc-0.9.31.1.tar.bz2 \ diff -r 594e15551781 -r 9fcb35fbdbd7 sources/patches/busybox-sysinfo.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/busybox-sysinfo.patch Sat Jul 23 21:20:06 2011 -0500 @@ -0,0 +1,65 @@ +# Block copying crap out of header files in the name of "portability" is +# never a good idea. It breaks stuff. In this case, it won't build under +# Linux 3.0. + + +--- busybox/include/libbb.h 2011-03-12 19:45:40.000000000 -0600 ++++ busybox.new/include/libbb.h 2011-07-23 18:24:06.563634320 -0500 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -100,25 +101,6 @@ + #if !defined __FreeBSD__ + char *dirname(char *path); + #endif +-/* Include our own copy of struct sysinfo to avoid binary compatibility +- * problems with Linux 2.4, which changed things. Grumble, grumble. */ +-struct sysinfo { +- long uptime; /* Seconds since boot */ +- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ +- unsigned long totalram; /* Total usable main memory size */ +- unsigned long freeram; /* Available memory size */ +- unsigned long sharedram; /* Amount of shared memory */ +- unsigned long bufferram; /* Memory used by buffers */ +- unsigned long totalswap; /* Total swap space size */ +- unsigned long freeswap; /* swap space still available */ +- unsigned short procs; /* Number of current processes */ +- unsigned short pad; /* Padding needed for m68k */ +- unsigned long totalhigh; /* Total high memory size */ +- unsigned long freehigh; /* Available high memory size */ +- unsigned int mem_unit; /* Memory unit size in bytes */ +- char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding: libc5 uses this.. */ +-}; +-int sysinfo(struct sysinfo* info); + #ifndef PATH_MAX + # define PATH_MAX 256 + #endif +diff -ru busybox/networking/Config.src busybox.new/networking/Config.src +--- busybox/networking/Config.src 2011-03-12 19:45:40.000000000 -0600 ++++ busybox.new/networking/Config.src 2011-07-23 19:12:14.379897634 -0500 +@@ -740,7 +740,7 @@ + + config TCPSVD + bool "tcpsvd" +- default y ++ default n + help + tcpsvd listens on a TCP port and runs a program for each new + connection. +diff -ru busybox/networking/Config.src busybox.new/networking/Config.src +--- busybox/networking/Config.src 2011-07-23 19:30:19.800800291 -0500 ++++ busybox.new/networking/Config.src 2011-07-23 19:39:50.129877165 -0500 +@@ -972,7 +972,7 @@ + + config UDPSVD + bool "udpsvd" +- default y ++ default n + help + udpsvd listens on an UDP port and runs a program for each new + connection. diff -r 594e15551781 -r 9fcb35fbdbd7 sources/patches/linux-fixmips.patch --- a/sources/patches/linux-fixmips.patch Sat Jul 23 18:35:10 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -Date: Fri, 27 May 2011 15:00:11 +0100 -From: Ralf Baechle -To: Rob Landley -Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org -Subject: Re: MIPS panic in 2.6.39 (bisected to 7eaceaccab5f) -Message-ID: <20110527140011.GF30117@linux-mips.org> -References: <4DDB5673.5060206@landley.net> - <20110524143937.GB30117@linux-mips.org> - <4DDCB1EB.4020707@landley.net> - <20110527075512.GE30117@linux-mips.org> -In-Reply-To: <20110527075512.GE30117@linux-mips.org> - -On Fri, May 27, 2011 at 08:55:13AM +0100, Ralf Baechle wrote: - -> > Have you guys been able to reproduce the problem? -> -> Staring at the disassembly was good enough, I think. The commit you -> bisected is restructuring some of the hardware probing code for Malta and -> seems to result in gcmp_present being set without _gcmp_base having been -> assigned, thus the null pointer dereference. - -Can you test below patch? Thanks, - - Ralf - -Since af3a1f6f4813907e143f87030cde67a9971db533 the Malta code does no -longer probe for presence of GCMP if CMP is not configured. This means -that the variable gcmp_present well be left at its default value of -1 -which normally is meant to indicate that GCMP has not yet been mmapped. -This non-zero value is now interpreted as GCMP being present resulting -in a write attempt to a GCMP register resulting in a crash. - -Signed-off-by: Ralf Baechle - - arch/mips/include/asm/smp-ops.h | 41 +++++++++++++++++++++++++++-- - arch/mips/mipssim/sim_setup.c | 17 ++++++------ - arch/mips/mti-malta/malta-init.c | 14 +++++----- - arch/mips/pmc-sierra/msp71xx/msp_setup.c | 8 ++--- - 4 files changed, 55 insertions(+), 24 deletions(-) - -diff --git a/arch/mips/include/asm/smp-ops.h b/arch/mips/include/asm/smp-ops.h -index 9e09af3..48b03ff 100644 ---- a/arch/mips/include/asm/smp-ops.h -+++ b/arch/mips/include/asm/smp-ops.h -@@ -56,8 +56,43 @@ static inline void register_smp_ops(struct plat_smp_ops *ops) - - #endif /* !CONFIG_SMP */ - --extern struct plat_smp_ops up_smp_ops; --extern struct plat_smp_ops cmp_smp_ops; --extern struct plat_smp_ops vsmp_smp_ops; -+static inline int register_up_smp_ops(void) -+{ -+#ifdef CONFIG_SMP_UP -+ extern struct plat_smp_ops up_smp_ops; -+ -+ register_smp_ops(&up_smp_ops); -+ -+ return 0; -+#else -+ return -ENODEV; -+#endif -+} -+ -+static inline int register_cmp_smp_ops(void) -+{ -+#ifdef CONFIG_MIPS_CMP -+ extern struct plat_smp_ops cmp_smp_ops; -+ -+ register_smp_ops(&cmp_smp_ops); -+ -+ return 0; -+#else -+ return -ENODEV; -+#endif -+} -+ -+static inline int register_vsmp_smp_ops(void) -+{ -+#ifdef CONFIG_MIPS_MT_SMP -+ extern struct plat_smp_ops vsmp_smp_ops; -+ -+ register_smp_ops(&vsmp_smp_ops); -+ -+ return 0; -+#else -+ return -ENODEV; -+#endif -+} - - #endif /* __ASM_SMP_OPS_H */ -diff --git a/arch/mips/mipssim/sim_setup.c b/arch/mips/mipssim/sim_setup.c -index 55f22a3..1970069 100644 ---- a/arch/mips/mipssim/sim_setup.c -+++ b/arch/mips/mipssim/sim_setup.c -@@ -59,18 +59,17 @@ void __init prom_init(void) - - prom_meminit(); - --#ifdef CONFIG_MIPS_MT_SMP -- if (cpu_has_mipsmt) -- register_smp_ops(&vsmp_smp_ops); -- else -- register_smp_ops(&up_smp_ops); --#endif -+ if (cpu_has_mipsmt) { -+ if (!register_vsmp_smp_ops()) -+ return; -+ - #ifdef CONFIG_MIPS_MT_SMTC -- if (cpu_has_mipsmt) - register_smp_ops(&ssmtc_smp_ops); -- else -- register_smp_ops(&up_smp_ops); -+ return; - #endif -+ } -+ -+ register_up_smp_ops(); - } - - static void __init serial_init(void) -diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c -index 31180c3..3a73d69 100644 ---- a/arch/mips/mti-malta/malta-init.c -+++ b/arch/mips/mti-malta/malta-init.c -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -358,15 +359,14 @@ void __init prom_init(void) - #ifdef CONFIG_SERIAL_8250_CONSOLE - console_config(); - #endif --#ifdef CONFIG_MIPS_CMP - /* Early detection of CMP support */ - if (gcmp_probe(GCMP_BASE_ADDR, GCMP_ADDRSPACE_SZ)) -- register_smp_ops(&cmp_smp_ops); -- else --#endif --#ifdef CONFIG_MIPS_MT_SMP -- register_smp_ops(&vsmp_smp_ops); --#endif -+ if (!register_cmp_smp_ops()) -+ return; -+ -+ if (!register_vsmp_smp_ops()) -+ return; -+ - #ifdef CONFIG_MIPS_MT_SMTC - register_smp_ops(&msmtc_smp_ops); - #endif -diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c -index 2413ea6..0abfbe0 100644 ---- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c -+++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c -@@ -228,13 +228,11 @@ void __init prom_init(void) - */ - msp_serial_setup(); - --#ifdef CONFIG_MIPS_MT_SMP -- register_smp_ops(&vsmp_smp_ops); --#endif -- -+ if (register_vsmp_smp_ops()) { - #ifdef CONFIG_MIPS_MT_SMTC -- register_smp_ops(&msp_smtc_smp_ops); -+ register_smp_ops(&msp_smtc_smp_ops); - #endif -+ } - - #ifdef CONFIG_PMCTWILED - /* diff -r 594e15551781 -r 9fcb35fbdbd7 sources/patches/linux-noperl-headers.patch --- a/sources/patches/linux-noperl-headers.patch Sat Jul 23 18:35:10 2011 -0500 +++ b/sources/patches/linux-noperl-headers.patch Sat Jul 23 21:20:06 2011 -0500 @@ -1,47 +1,9 @@ -X-Mozilla-Status: 0001 -X-Mozilla-Status2: 00000000 -Delivered-To: rob@landley.net -Received: by 10.223.124.142 with SMTP id u14cs15891far; - Tue, 18 Jan 2011 06:06:52 -0800 (PST) -Received: by 10.231.11.2 with SMTP id r2mr5976931ibr.174.1295359611366; - Tue, 18 Jan 2011 06:06:51 -0800 (PST) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) - by mx.google.com with ESMTP id fm28si4777782vbb.87.2011.01.18.06.06.50; - Tue, 18 Jan 2011 06:06:51 -0800 (PST) -Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1751955Ab1AROGm (ORCPT ); - Tue, 18 Jan 2011 09:06:42 -0500 -Received: from mx2.parallels.com ([64.131.90.16]:45151 "EHLO mx2.parallels.com" - rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP - id S1751229Ab1AROGk (ORCPT ); - Tue, 18 Jan 2011 09:06:40 -0500 -Received: from rr-ah-dc.swsoft.net ([96.31.168.200] helo=mail.parallels.com) - by mx2.parallels.com with esmtps (TLSv1:AES128-SHA:128) - (Exim 4.72) - (envelope-from ) - id 1PfCCl-0001Xc-I0; Tue, 18 Jan 2011 09:06:40 -0500 -Received: from [192.168.6.242] (64.134.148.71) by mail.parallels.com - (10.255.249.32) with Microsoft SMTP Server (TLS) id 14.0.702.0; Tue, 18 Jan - 2011 06:06:36 -0800 Message-ID: <4D359E5C.1070002@parallels.com> Date: Tue, 18 Jan 2011 08:06:20 -0600 From: Rob Landley -User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 -MIME-Version: 1.0 -To: Michal Marek , , - , Jesper Juhl Subject: [PATCH] Replace scripts/headers_install.pl with a shell script. -Content-Type: text/plain; charset="ISO-8859-1" -Content-Transfer-Encoding: 7bit -Sender: linux-kernel-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: linux-kernel@vger.kernel.org -From: Rob Landley +From: Rob Landley Remove perl from make headers_install by replacing a perl script (doing a simple regex search and replace) with a smaller and faster shell script @@ -109,7 +71,7 @@ diff -ruN linux-2.6.30.old/scripts/Makefile.headersinst linux-2.6.30/scripts/Makefile.headersinst --- linux-2.6.30.old/scripts/Makefile.headersinst 2009-06-09 22:05:27.000000000 -0500 +++ linux-2.6.30/scripts/Makefile.headersinst 2009-06-22 16:21:23.000000000 -0500 -@@ -45,8 +45,8 @@ +@@ -50,8 +50,8 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ file$(if $(word 2, $(all-files)),s)) cmd_install = \ @@ -117,10 +79,10 @@ - $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ + $(CONFIG_SHELL) $< $(srctree)/$(obj) $(install) $(header-y); \ + $(CONFIG_SHELL) $< $(objtree)/$(obj) $(install) $(objhdr-y); \ - touch $@ - - quiet_cmd_remove = REMOVE $(unwanted) -@@ -69,7 +69,7 @@ + for F in $(wrapper-files); do \ + echo "\#include " > $(install)/$$F; \ + done; \ +@@ -77,7 +77,7 @@ @: targets += $(install-file)