diff -ur linux-2.4.6.uc0pre0.orig/Makefile linux-2.4.6.uc0pre0.actiontec/Makefile
--- linux-2.4.6.uc0pre0.orig/Makefile	2004-12-06 19:34:58.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/Makefile	2004-12-06 19:35:49.000000000 +0100
@@ -44,7 +48,8 @@
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
 	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
-	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL
+	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS \
+	PERL CONFIG_UCLINUX
 
 .PHONY: dummy
 
diff -ur linux-2.4.6.uc0pre0.orig/fs/binfmt_script.c linux-2.4.6.uc0pre0.actiontec/fs/binfmt_script.c
--- linux-2.4.6.uc0pre0.orig/fs/binfmt_script.c	2004-12-06 19:34:59.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/fs/binfmt_script.c	2004-12-06 19:35:49.000000000 +0100
@@ -83,7 +83,7 @@
 	 * DAVIDM look at implementing remove_arg_zero and copy_strings so
 	 * code like this should work.
 	 */
-	printk("%s,%d: #! not implemented yet !\n", __FILE__, __LINE__);
+//	printk("%s,%d: #! not implemented yet !\n", __FILE__, __LINE__);	OZH
 	return -ENOEXEC;
 #endif
 	bprm->argc++;
diff -ur linux-2.4.6.uc0pre0.orig/fs/namei.c linux-2.4.6.uc0pre0.actiontec/fs/namei.c
--- linux-2.4.6.uc0pre0.orig/fs/namei.c	2001-07-03 17:05:42.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/fs/namei.c	2004-12-06 19:35:49.000000000 +0100
@@ -99,14 +99,17 @@
  *
  * POSIX.1 2.4: an empty pathname is invalid (ENOENT).
  */
-static inline int do_getname(const char *filename, char *page)
+//static inline int do_getname(const char *filename, char *page)
+static int do_getname(const char *filename, char *page)
 {
 	int retval;
 	unsigned long len = PATH_MAX + 1;
 
 	if ((unsigned long) filename >= TASK_SIZE) {
 		if (!segment_eq(get_fs(), KERNEL_DS))
+		  {
 			return -EFAULT;
+		  }
 	} else if (TASK_SIZE - (unsigned long) filename < PATH_MAX + 1)
 		len = TASK_SIZE - (unsigned long) filename;
 
diff -ur linux-2.4.6.uc0pre0.orig/fs/proc/generic.c linux-2.4.6.uc0pre0.actiontec/fs/proc/generic.c
--- linux-2.4.6.uc0pre0.orig/fs/proc/generic.c	2001-07-01 06:42:21.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/fs/proc/generic.c	2004-12-06 19:35:49.000000000 +0100
@@ -56,10 +56,9 @@
 	ssize_t	n, count;
 	char	*start;
 	struct proc_dir_entry * dp;
-
-	dp = (struct proc_dir_entry *) inode->u.generic_ip;
 	if (!(page = (char*) __get_free_page(GFP_KERNEL)))
 		return -ENOMEM;
+	dp = (struct proc_dir_entry *) inode->u.generic_ip;
 
 	while ((nbytes > 0) && !eof)
 	{
diff -ur linux-2.4.6.uc0pre0.orig/include/linux/init.h linux-2.4.6.uc0pre0.actiontec/include/linux/init.h
--- linux-2.4.6.uc0pre0.orig/include/linux/init.h	2004-12-06 19:34:59.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/include/linux/init.h	2004-12-06 19:35:49.000000000 +0100
@@ -35,10 +35,34 @@
  * as gcc otherwise puts the data into the bss section and not into the init
  * section.
  * 
- * Also note, that this data cannot be "const".
+ * Adapted for Brecis MSP5000 by Michael Leslie <mleslie@lineo.com>
+ * - init sections were posing problems for gdb and for EPI tools
+ * Copyright (c) 2001 Lineo, Inc./Lineo Canada Corp. (www.lineo.com)
+ *
  */
 
-#ifndef MODULE
+//#define MODULE //...MaTed--- testing without init sections (problem)
+
+/* #ifndef MODULE */
+
+/*
+ * We are defining INIT_DATA and SQUASH_INIT for the ability to be able 
+ * to remove init sections from the kernel.  The init code then ends up in 
+ * normal sections.  The reason for this is that one cannot debug the init code
+ * if it is in the init sections.
+ * 
+ * Also the conditional below should also include DEBUG.  That is, it should be
+ * CONFIG_MIPS and DEBUG, then set the two macros.
+ *
+ * SFA - 2001-09-12
+ */
+#ifdef CONFIG_MIPS
+#define INIT_DATA 1 // ...MaTed***
+
+#define SQUASH_INIT 1 /* mleslie */
+#endif
+
+#if !defined(MODULE) && !defined(SQUASH_INIT)
 
 #ifndef __ASSEMBLY__
 
@@ -122,12 +123,74 @@
 #define __exit
 #define __initdata
 #define __exitdata
-#define __initcall(fn)
 /* For assembly routines */
 #define __INIT
 #define __FINIT
 #define __INITDATA
 
+#ifdef INIT_DATA
+#define __initsetup	__attribute__ ((unused,__section__ (".setup.init")))
+#define __init_call	__attribute__ ((unused,__section__ (".initcall.init")))
+#define __exit_call	__attribute__ ((unused,__section__ (".exitcall.exit")))
+
+#define module_init(x)	__initcall(x);
+#define module_exit(x)	__exitcall(x);
+
+#ifndef __ASSEMBLY__
+
+/*
+ * Used for initialization calls..
+ */
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+extern initcall_t __initcall_start, __initcall_end;
+
+#define __initcall(fn)								\
+	static initcall_t __initcall_##fn __init_call = fn
+#define __exitcall(fn)								\
+	static exitcall_t __exitcall_##fn __exit_call = fn
+
+/*
+ * Used for kernel command line parameter setup
+ */
+struct kernel_param {
+	const char *str;
+	int (*setup_func)(char *);
+};
+
+extern struct kernel_param __setup_start, __setup_end;
+
+#define __setup(str, fn)								\
+	static char __setup_str_##fn[] __initdata = str;				\
+	static struct kernel_param __setup_##fn __attribute__((unused)) __initsetup = { __setup_str_##fn, fn }
+#endif // __ASSEMBLY__
+ 
+#else
+
+#define __setup(str,func) /* nothing */
+#define __initcall(fn)
+#define __exitcall(fn)
+
+#endif // INIT_DATA
+
+#endif  //MODULE
+
+#ifdef CONFIG_HOTPLUG
+#define __devinit
+#define __devinitdata
+#define __devexit
+#define __devexitdata
+#else
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit __exit
+#define __devexitdata __exitdata
+#endif
+
+
+#if defined(MODULE)
+
 /* These macros create a dummy inline: gcc 2.9x does not count alias
  as usage, hence the `unused function' warning when __init functions
  are declared static. We use the dummy __*_module_inline functions
@@ -143,21 +206,35 @@
 	void cleanup_module(void) __attribute__((alias(#x))); \
 	extern inline __cleanup_module_func_t __cleanup_module_inline(void) \
 	{ return x; }
+#endif
 
-#define __setup(str,func) /* nothing */
 
-#endif
 
-#ifdef CONFIG_HOTPLUG
-#define __devinit
-#define __devinitdata
-#define __devexit
-#define __devexitdata
-#else
-#define __devinit __init
-#define __devinitdata __initdata
-#define __devexit __exit
-#define __devexitdata __exitdata
+#if defined(SQUASH_INIT)
+
+#if !defined(INIT_DATA)
+/*
+ * Used for kernel command line parameter setup
+ */
+struct kernel_param {
+	const char *str;
+	int (*setup_func)(char *);
+};
+
+extern struct kernel_param __setup_start, __setup_end;
+#endif // !INIT_DATA
+
+/*
+ * Used for initialization calls..
+ */
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+extern initcall_t __initcall_start, __initcall_end;
+
+#define module_init(x)	__initcall(x);
+#define module_exit(x)	__exitcall(x);
+
 #endif
 
 #endif /* _LINUX_INIT_H */
diff -ur linux-2.4.6.uc0pre0.orig/include/linux/limits.h linux-2.4.6.uc0pre0.actiontec/include/linux/limits.h
--- linux-2.4.6.uc0pre0.orig/include/linux/limits.h	1999-07-28 19:30:10.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/include/linux/limits.h	2004-12-06 19:35:49.000000000 +0100
@@ -11,7 +11,7 @@
 #define MAX_CANON        255	/* size of the canonical input queue */
 #define MAX_INPUT        255	/* size of the type-ahead buffer */
 #define NAME_MAX         255	/* # chars in a file name */
-#define PATH_MAX        4095	/* # chars in a path name */
+#define PATH_MAX         256	/* # chars in a path name */
 #define PIPE_BUF        4096	/* # bytes in atomic write to a pipe */
 
 #define RTSIG_MAX	  32
diff -ur linux-2.4.6.uc0pre0.orig/include/linux/msg.h linux-2.4.6.uc0pre0.actiontec/include/linux/msg.h
--- linux-2.4.6.uc0pre0.orig/include/linux/msg.h	2001-07-04 00:45:08.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/include/linux/msg.h	2004-12-06 19:35:49.000000000 +0100
@@ -34,7 +34,7 @@
 /* message buffer for msgsnd and msgrcv calls */
 struct msgbuf {
 	long mtype;         /* type of message */
-	char mtext[1];      /* message text */
+	char *mtext;        /* message text */
 };
 
 /* buffer for msgctl calls IPC_INFO, MSG_INFO */
diff -ur linux-2.4.6.uc0pre0.orig/init/main.c linux-2.4.6.uc0pre0.actiontec/init/main.c
--- linux-2.4.6.uc0pre0.orig/init/main.c	2001-06-20 20:10:27.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/init/main.c	2004-12-06 19:35:49.000000000 +0100
@@ -199,6 +203,8 @@
 	{ "cdu535",  0x1800 },
 	{ "sonycd",  0x1800 },
 	{ "aztcd",   0x1d00 },
+	{ "rom0",    0x1f00 },	/* OZH */
+	{ "rom1",    0x1f01 },  /* OZH */
 	{ "cm206cd", 0x2000 },
 	{ "gscd",    0x1000 },
 	{ "sbpcd",   0x1900 },
@@ -516,6 +522,7 @@
  * enable them
  */
 	lock_kernel();
+	printk("\n\n\n");
 	printk(linux_banner);
 	setup_arch(&command_line);
 	printk("Kernel command line: %s\n", saved_command_line);
diff -ur linux-2.4.6.uc0pre0.orig/kernel/printk.c linux-2.4.6.uc0pre0.actiontec/kernel/printk.c
--- linux-2.4.6.uc0pre0.orig/kernel/printk.c	2004-12-06 19:34:59.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/kernel/printk.c	2004-12-06 19:35:49.000000000 +0100
@@ -111,8 +111,9 @@
  * DAVIDM - put this in so 2.0 and 2.4 NETtel images work with the
  *          same boot args.
  */
-
-static int __init CONSOLE_setup(char *str)
+// ...MaTed--- need it external
+//static int __init CONSOLE_setup(char *str)
+int __init CONSOLE_setup(char *str)
 {
 	/*
 	 *	2.4 does not want the /dev/ options on the front
diff -ur linux-2.4.6.uc0pre0.orig/kernel/sched.c linux-2.4.6.uc0pre0.actiontec/kernel/sched.c
--- linux-2.4.6.uc0pre0.orig/kernel/sched.c	2001-06-27 23:12:04.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/kernel/sched.c	2004-12-06 19:35:49.000000000 +0100
@@ -652,7 +652,7 @@
 			atomic_inc(&oldmm->mm_count);
 			enter_lazy_tlb(oldmm, next, this_cpu);
 		} else {
-			if (next->active_mm != mm) BUG();
+//			if (next->active_mm != mm) BUG();
 			switch_mm(oldmm, mm, next, this_cpu);
 		}
 
diff -ur linux-2.4.6.uc0pre0.orig/mmnommu/vmalloc.c linux-2.4.6.uc0pre0.actiontec/mmnommu/vmalloc.c
--- linux-2.4.6.uc0pre0.orig/mmnommu/vmalloc.c	2004-12-06 19:34:59.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/mmnommu/vmalloc.c	2004-12-06 19:35:49.000000000 +0100
@@ -25,7 +25,11 @@
 
 void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot)
 {
-	return kmalloc(size, gfp_mask);
+	/*
+	 * kmalloc doesn't like __GFP_HIGHMEM for some reason
+	 * I doubt we need it - DAVIDM
+	 */
+	return kmalloc(size, gfp_mask & ~__GFP_HIGHMEM);
 }
 
 long vread(char *buf, char *addr, unsigned long count)
diff -ur linux-2.4.6.uc0pre0.orig/net/core/sock.c linux-2.4.6.uc0pre0.actiontec/net/core/sock.c
--- linux-2.4.6.uc0pre0.orig/net/core/sock.c	2001-06-30 04:38:26.000000000 +0200
+++ linux-2.4.6.uc0pre0.actiontec/net/core/sock.c	2004-12-06 19:35:49.000000000 +0100
@@ -621,15 +621,11 @@
 	if (!sk_cachep)
 		printk(KERN_CRIT "sk_init: Cannot create sock SLAB cache!");
 
-	if (num_physpages <= 4096) {
-		sysctl_wmem_max = 32767;
-		sysctl_rmem_max = 32767;
-		sysctl_wmem_default = 32767;
-		sysctl_wmem_default = 32767;
-	} else if (num_physpages >= 131072) {
-		sysctl_wmem_max = 131071;
-		sysctl_rmem_max = 131071;
-	}
+   		sysctl_wmem_max = 131072;
+		sysctl_rmem_max = 131072;
+		sysctl_wmem_default = 131072;
+		sysctl_wmem_default = 131072;
+  
 }
 
 /*

