[uClinux-dev] linux-2.6.11.8-hsc0 and gcc 4 [PATCH]

Shaun Jackman sjackman at gmail.com
Tue Aug 16 17:16:22 EDT 2005


2005-05-19 17:12:22, Mike Voytovich <mike at zermattsystems.com>
> I patched a vanilla 2.6.11.8 kernel with the
> linux-2.6.11.8-hsc0.patch.gz patch, configured for AT91xxx ARM system
> type, and attempted to build.
>
> I get the following compile error:
>
> $ make ARCH=arm CROSS_COMPILE=arm-linux-uclibc-
>  CHK     include/linux/version.h
>  CC      arch/arm/kernel/asm-offsets.s
> In file included from arch/arm/kernel/asm-offsets.c:13:
> include/linux/sched.h: In function `arch_pick_mmap_layout':
> include/linux/sched.h:1174: error: `TASK_UNMAPPED_BASE' undeclared
...
> This error is clearly due to TASK_SIZE being defined in
> asm/arch/memory.h, which causes TASK_UNMAPPED_BASE to be conditionally
> compiled out in asm/memory.h .  There are more compile errors in
> addition to this one too.
...

I found I needed the following patch to compile linux 2.6.11.8 +
linux-2.6.11.8-hsc0.patch.gz. This fixes the issue Mike noticed above,
and also cleans up a number of warnings that pop up with gcc 4.0.1.

Cheers,
Shaun

2005-08-15  Shaun Jackman  <sjackman at gmail.com>

	* arch/arm/kernel/head-common.S: Include asm/constants.h.
	* include/asm-arm/memory.h (TASK_UNMAPPED_BASE): Define even if
	TASK_SIZE is defined.
	* arch/arm/kernel/traps.c (__bug): Remove volatile from the return type.
	* include/asm-arm/bug.h (__bug): Ditto.
	* include/asm-arm/cpu-single.h (cpu_reset): Ditto.

diff -ur linux-2.6.11.8.orig/arch/arm/kernel/head-common.S
linux-2.6.11.8/arch/arm/kernel/head-common.S
--- linux-2.6.11.8.orig/arch/arm/kernel/head-common.S	2005-08-15
16:55:37.000000000 -0700
+++ linux-2.6.11.8/arch/arm/kernel/head-common.S	2005-08-15
16:56:52.000000000 -0700
@@ -9,6 +9,8 @@
  *
  */
 
+#include <asm/constants.h>
+
 /*
  * Exception handling.  Something went wrong and we can't proceed.  We
  * ought to tell the user, but since we don't have any guarantee that
diff -ur linux-2.6.11.8.orig/arch/arm/kernel/traps.c
linux-2.6.11.8/arch/arm/kernel/traps.c
--- linux-2.6.11.8.orig/arch/arm/kernel/traps.c	2005-08-15
16:55:37.000000000 -0700
+++ linux-2.6.11.8/arch/arm/kernel/traps.c	2005-08-15 16:59:02.000000000 -0700
@@ -531,7 +531,7 @@
 	die_if_kernel("unknown data abort code", regs, instr);
 }
 
-volatile void __bug(const char *file, int line, void *data)
+void __bug(const char *file, int line, void *data)
 {
 	printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
 	if (data)
diff -ur linux-2.6.11.8.orig/include/asm-arm/bug.h
linux-2.6.11.8/include/asm-arm/bug.h
--- linux-2.6.11.8.orig/include/asm-arm/bug.h	2005-04-29
18:23:11.000000000 -0700
+++ linux-2.6.11.8/include/asm-arm/bug.h	2005-08-15 16:58:22.000000000 -0700
@@ -4,7 +4,7 @@
 #include <linux/config.h>
 
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern volatile void __bug(const char *file, int line, void *data);
+extern void __bug(const char *file, int line, void *data);
 
 /* give file/line information */
 #define BUG()		__bug(__FILE__, __LINE__, NULL)
diff -ur linux-2.6.11.8.orig/include/asm-arm/cpu-single.h
linux-2.6.11.8/include/asm-arm/cpu-single.h
--- linux-2.6.11.8.orig/include/asm-arm/cpu-single.h	2005-08-15
16:55:37.000000000 -0700
+++ linux-2.6.11.8/include/asm-arm/cpu-single.h	2005-08-15
16:58:10.000000000 -0700
@@ -46,4 +46,4 @@
 #ifdef CONFIG_MMU
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
 #endif
-extern volatile void cpu_reset(unsigned long addr);
+extern void cpu_reset(unsigned long addr);
diff -ur linux-2.6.11.8.orig/include/asm-arm/memory.h
linux-2.6.11.8/include/asm-arm/memory.h
--- linux-2.6.11.8.orig/include/asm-arm/memory.h	2005-08-15
16:55:37.000000000 -0700
+++ linux-2.6.11.8/include/asm-arm/memory.h	2005-08-15 16:56:52.000000000 -0700
@@ -43,6 +43,8 @@
 
 #ifndef TASK_SIZE
 #define TASK_SIZE		(0x01a00000UL)
+#endif
+#ifndef TASK_UNMAPPED_BASE
 #define TASK_UNMAPPED_BASE	(0x00000000UL)
 #endif
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linux-2.6.11.8-sdj0.diff
URL: <http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20050816/e0c6b467/attachment.ksh>


More information about the uClinux-dev mailing list