diff options
Diffstat (limited to 'patches/linux/2.4.26')
-rw-r--r-- | patches/linux/2.4.26/01-kmap-types-cleanup.patch | 306 | ||||
-rw-r--r-- | patches/linux/2.4.26/kaz-types.patch | 60 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4-bsd-expr.patch | 25 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch | 203 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch | 23 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch | 40 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch | 28 | ||||
-rw-r--r-- | patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch | 17 |
8 files changed, 702 insertions, 0 deletions
diff --git a/patches/linux/2.4.26/01-kmap-types-cleanup.patch b/patches/linux/2.4.26/01-kmap-types-cleanup.patch new file mode 100644 index 0000000..4a900bc --- /dev/null +++ b/patches/linux/2.4.26/01-kmap-types-cleanup.patch @@ -0,0 +1,306 @@ +From http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/att-1234/01-kmap-types-cleanup.patch +See http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/1234.html + +From: Marc-Christian Petersen (m.c.p@wolk-project.de) + +> > on alpha: +> > internal.h:19:28: asm/kmap_types.h: No such file or directory +> Same on s390 and some other platforms.We should just get rid of +> this problem by providing a generic kmap_types header. +I agree on this but your patch is bogus. Please use the attached one instead. + +Marcello, please apply this one instead. Against 2.4.22-BK (2.4.21-bk14) + +[ I commented out the hunk +#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +to get this to apply to linux-2.4.26. +- dank] + +diff -Naurp a/crypto/internal.h b/crypto/internal.h +--- a/crypto/internal.h 2003-07-19 14:09:06.000000000 +0200 ++++ b/crypto/internal.h 2003-07-19 14:18:58.000000000 +0200 +@@ -14,9 +14,9 @@ + #include <linux/mm.h> + #include <linux/highmem.h> + #include <linux/init.h> ++#include <linux/kmap_types.h> + #include <asm/hardirq.h> + #include <asm/softirq.h> +-#include <asm/kmap_types.h> + + extern enum km_type crypto_km_types[]; + +diff -Naurp a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h +--- a/include/asm-i386/fixmap.h 2003-07-19 14:09:31.000000000 +0200 ++++ b/include/asm-i386/fixmap.h 2003-07-19 14:18:58.000000000 +0200 +@@ -20,7 +20,7 @@ + #include <asm/page.h> + #ifdef CONFIG_HIGHMEM + #include <linux/threads.h> +-#include <asm/kmap_types.h> ++#include <linux/kmap_types.h> + #endif + + /* +diff -Naurp a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h +--- a/include/asm-i386/highmem.h 2003-07-15 10:28:54.000000000 +0200 ++++ b/include/asm-i386/highmem.h 2003-07-19 14:18:58.000000000 +0200 +@@ -23,7 +23,6 @@ + #include <linux/config.h> + #include <linux/init.h> + #include <linux/interrupt.h> +-#include <asm/kmap_types.h> + #include <asm/pgtable.h> + + #ifdef CONFIG_DEBUG_HIGHMEM +diff -Naurp a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h +--- a/include/asm-i386/kmap_types.h 2003-07-19 14:09:31.000000000 +0200 ++++ b/include/asm-i386/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,16 +0,0 @@ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BH_IRQ, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +diff -Naurp a/include/asm-m68k/kmap_types.h b/include/asm-m68k/kmap_types.h +--- a/include/asm-m68k/kmap_types.h 2003-07-19 14:09:33.000000000 +0200 ++++ b/include/asm-m68k/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,18 +0,0 @@ +-#ifdef __KERNEL__ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BH_IRQ, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +-#endif /* __KERNEL__ */ +diff -Naurp a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h +--- a/include/asm-mips/fixmap.h 2002-09-27 23:26:03.000000000 +0200 ++++ b/include/asm-mips/fixmap.h 2003-07-19 14:18:58.000000000 +0200 +@@ -18,7 +18,7 @@ + #include <asm/page.h> + #ifdef CONFIG_HIGHMEM + #include <linux/threads.h> +-#include <asm/kmap_types.h> ++#include <linux/kmap_types.h> + #endif + + /* +diff -Naurp a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h +--- a/include/asm-mips/highmem.h 2002-12-18 01:03:59.000000000 +0100 ++++ b/include/asm-mips/highmem.h 2003-07-19 14:18:58.000000000 +0200 +@@ -22,7 +22,6 @@ + + #include <linux/init.h> + #include <linux/interrupt.h> +-#include <asm/kmap_types.h> + #include <asm/pgtable.h> + + /* undef for production */ +#diff -Naurp a/include/asm-mips/kmap_types.h b/include/asm-mips/kmap_types.h +#--- a/include/asm-mips/kmap_types.h 2002-12-18 01:03:59.000000000 +0100 +#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +#@@ -1,14 +0,0 @@ +#-#ifndef _ASM_KMAP_TYPES_H +#-#define _ASM_KMAP_TYPES_H +#- +#-enum km_type { +#- KM_BOUNCE_READ, +#- KM_SKB_SUNRPC_DATA, +#- KM_SKB_DATA_SOFTIRQ, +#- KM_USER0, +#- KM_USER1, +#- KM_BIO_IRQ, +#- KM_TYPE_NR +#-}; +#- +#-#endif +diff -Naurp a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h +--- a/include/asm-ppc/highmem.h 2003-07-19 14:09:33.000000000 +0200 ++++ b/include/asm-ppc/highmem.h 2003-07-19 14:18:58.000000000 +0200 +@@ -24,7 +24,7 @@ + + #include <linux/init.h> + #include <linux/interrupt.h> +-#include <asm/kmap_types.h> ++#include <linux/kmap_types.h> + #include <asm/pgtable.h> + + /* undef for production */ +diff -Naurp a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h +--- a/include/asm-ppc/kmap_types.h 2003-07-19 14:09:33.000000000 +0200 ++++ b/include/asm-ppc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,18 +0,0 @@ +-#ifdef __KERNEL__ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BH_IRQ, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +-#endif /* __KERNEL__ */ +diff -Naurp a/include/asm-ppc64/kmap_types.h b/include/asm-ppc64/kmap_types.h +--- a/include/asm-ppc64/kmap_types.h 2003-07-19 14:09:35.000000000 +0200 ++++ b/include/asm-ppc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,23 +0,0 @@ +-#ifdef __KERNEL__ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BIO_SRC_IRQ, +- KM_BIO_DST_IRQ, +- KM_PTE0, +- KM_PTE1, +- KM_IRQ0, +- KM_IRQ1, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +-#endif /* __KERNEL__ */ +diff -Naurp a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h +--- a/include/asm-sparc/highmem.h 2003-07-15 10:28:56.000000000 +0200 ++++ b/include/asm-sparc/highmem.h 2003-07-19 14:18:58.000000000 +0200 +@@ -21,7 +21,7 @@ + #ifdef __KERNEL__ + + #include <linux/interrupt.h> +-#include <asm/kmap_types.h> ++#include <linux/kmap_types.h> + + /* undef for production */ + #define HIGHMEM_DEBUG 1 +diff -Naurp a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h +--- a/include/asm-sparc/kmap_types.h 2003-07-19 14:09:37.000000000 +0200 ++++ b/include/asm-sparc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,16 +0,0 @@ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BH_IRQ, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +diff -Naurp a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h +--- a/include/asm-sparc64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200 ++++ b/include/asm-sparc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,20 +0,0 @@ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-/* Dummy header just to define km_type. None of this +- * is actually used on sparc64. -DaveM +- */ +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_SUNRPC_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_BH_IRQ, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +diff -Naurp a/include/asm-x86_64/kmap_types.h b/include/asm-x86_64/kmap_types.h +--- a/include/asm-x86_64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200 ++++ b/include/asm-x86_64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,15 +0,0 @@ +-#ifndef _ASM_KMAP_TYPES_H +-#define _ASM_KMAP_TYPES_H +- +-enum km_type { +- KM_BOUNCE_READ, +- KM_SKB_DATA, +- KM_SKB_DATA_SOFTIRQ, +- KM_USER0, +- KM_USER1, +- KM_SOFTIRQ0, +- KM_SOFTIRQ1, +- KM_TYPE_NR +-}; +- +-#endif +diff -Naurp a/include/linux/highmem.h b/include/linux/highmem.h +--- a/include/linux/highmem.h 2003-07-19 14:09:37.000000000 +0200 ++++ b/include/linux/highmem.h 2003-07-19 14:18:58.000000000 +0200 +@@ -2,6 +2,7 @@ + #define _LINUX_HIGHMEM_H + + #include <linux/config.h> ++#include <linux/kmap_types.h> + #include <asm/pgalloc.h> + + #ifdef CONFIG_HIGHMEM +diff -Naurp a/include/linux/kmap_types.h b/include/linux/kmap_types.h +--- a/include/linux/kmap_types.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/include/linux/kmap_types.h 2003-07-19 14:18:58.000000000 +0200 +@@ -0,0 +1,16 @@ ++#ifndef _LINUX_KMAP_TYPES_H ++#define _LINUX_KMAP_TYPES_H ++ ++enum km_type { ++ KM_BOUNCE_READ, ++ KM_SKB_SUNRPC_DATA, ++ KM_SKB_DATA_SOFTIRQ, ++ KM_USER0, ++ KM_USER1, ++ KM_BH_IRQ, ++ KM_SOFTIRQ0, ++ KM_SOFTIRQ1, ++ KM_TYPE_NR ++}; ++ ++#endif + diff --git a/patches/linux/2.4.26/kaz-types.patch b/patches/linux/2.4.26/kaz-types.patch new file mode 100644 index 0000000..ec5de36 --- /dev/null +++ b/patches/linux/2.4.26/kaz-types.patch @@ -0,0 +1,60 @@ +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4: + +In file included from sys/ustat.h:30, + from ../sysdeps/unix/sysv/linux/ustat.c:21: +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat' +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc' +make[1]: *** [misc/subdir_lib] Error 2 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2' +make: *** [all] Error 2 + +----------- snip --------------- + +Date: Fri, 06 Jun 2003 08:00:00 +0900 +From: kaz Kojima <kkojima@rr.iij4u.or.jp> +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32: + error: redefinition of `struct user_fpu_struct'" +To: linux-sh@m17n.org +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp> + +Hi, + +Dan Kegel <dank@kegel.com> wrote: +> When I try to build glibc-2.3.2 for sh4, it fails with the error +[snip] +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct' +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user' +[snip] +> The error reminds me of the kind of thing fixed by +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch + +It seems that the definitions in asm/user.h and the above patch collide. +I'm not sure why you need this patch, but is it needed for the problem +about struct ustat that you pointed out in this list, isn't it? +I found why I don't hit ustat problem - my local kernel tree includes +the following patch, though I can't recall about it. + +Regards, + kaz +-- +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003 +@@ -141,6 +141,7 @@ + + #endif /* __KERNEL_STRICT_NAMES */ + ++#ifdef __KERNEL__ + /* + * Below are truly Linux-specific types that should never collide with + * any application/library that wants linux/types.h. +@@ -152,5 +153,6 @@ + char f_fname[6]; + char f_fpack[6]; + }; ++#endif + + #endif /* _LINUX_TYPES_H */ + + diff --git a/patches/linux/2.4.26/linux-2.4-bsd-expr.patch b/patches/linux/2.4.26/linux-2.4-bsd-expr.patch new file mode 100644 index 0000000..17625e5 --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4-bsd-expr.patch @@ -0,0 +1,25 @@ +# http://in3www.epfl.ch/~schaffne/linux-2.4-bsd-expr.patch +The following makes it possible to compile linux 2.4.19 to 2.4.25 on Mac OS X, +where "expr" doesn't understand the "length" construct +(which it doesn't have to, according to SuSv3 +(see http://www.opengroup.org/onlinepubs/007904975/utilities/expr.html) +See also http://sources.redhat.com/ml/crossgcc/2004-02/msg00131.html + +Fixes error + expr: syntax error + KERNELRELEASE "2.4.21" exceeds 64 characters + make: *** [include/linux/version.h] Error 1 + + +diff -ur linux-2.4.23-old/Makefile linux-2.4.23/Makefile +--- linux-2.4.23-old/Makefile 2003-12-09 14:27:56.000000000 +0100 ++++ linux-2.4.23/Makefile 2003-12-09 14:28:37.000000000 +0100 +@@ -353,7 +353,7 @@ + @rm -f .ver1 + + include/linux/version.h: ./Makefile +- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \ ++ @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \ + (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false) + @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver + @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver diff --git a/patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch b/patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch new file mode 100644 index 0000000..8f8ddd6 --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch @@ -0,0 +1,203 @@ +Reconstructed from http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-December/018647.html +See also http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1540 + +Message-ID: <DDA001.8070502@de.bosch.com> +Subject: Help cross compiling the kernel for arm. +From: dirk.behme at de.bosch.com + +Aitor Garcia wrote: +> Hello everybody, +> +> I am having problems cross compiling the kernel for arm. +> +> This is the error message I get: +> +> blkpg.c: In function `blk_ioctl': +> blkpg.c:252: error: asm-specifier for variable `__r1' conflicts with asm clobber list +> blkpg.c:252: confused by earlier errors, bailing out make[3]: *** [blkpg.o] Error 1 +> make[3]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block' +> make[2]: *** [first_rule] Error 2 +> make[2]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block' +> make[1]: *** [_subdir_block] Error 2 +> make[1]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers' +> make: *** [_dir_drivers] Error 2 +> +> These are the toolchain versions I am using: +> host=i686-pc-linux-gnu +> binutils_version=2.14 +> gcc_version=3.3.2 +> glibc_version=2.3.2 +> kernel_version=2.4.21 +> and applied the kernel patch for arm. 2.4.21-rmk1. +> ... +> I have also seen references to this bug in ARM linux +> Developer. Patch Number = 1540. But this patch is +> classified as discarded. + +You need something like 1540 to compile 2.4.21 with gcc 3.3.2. 1540 was +discarded because of AFLAGS change. + +Try the attachment. + +Dirk +-------------- next part -------------- +--- linux/arch/arm/lib/getuser.S.orig Mon Nov 17 07:41:51 2003 ++++ linux/arch/arm/lib/getuser.S Mon Nov 17 07:43:16 2003 +@@ -17,7 +17,7 @@ + * + * Inputs: r0 contains the address + * Outputs: r0 is the error code +- * r1, r2 contains the zero-extended value ++ * r1, ip contains the zero-extended value + * lr corrupted + * + * No other registers must be altered. (see include/asm-arm/uaccess.h +@@ -42,14 +42,14 @@ __get_user_1: + + .global __get_user_2 + __get_user_2: +- bic r2, sp, #0x1f00 +- bic r2, r2, #0x00ff +- ldr r2, [r2, #TSK_ADDR_LIMIT] +- sub r2, r2, #2 +- cmp r0, r2 ++ bic ip, sp, #0x1f00 ++ bic ip, ip, #0x00ff ++ ldr ip, [ip, #TSK_ADDR_LIMIT] ++ sub ip, ip, #2 ++ cmp r0, ip + 2: ldrlsbt r1, [r0], #1 +-3: ldrlsbt r2, [r0] +- orrls r1, r1, r2, lsl #8 ++3: ldrlsbt ip, [r0] ++ orrls r1, r1, ip, lsl #8 + movls r0, #0 + movls pc, lr + b __get_user_bad +@@ -68,20 +68,20 @@ __get_user_4: + + .global __get_user_8 + __get_user_8: +- bic r2, sp, #0x1f00 +- bic r2, r2, #0x00ff +- ldr r2, [r2, #TSK_ADDR_LIMIT] +- sub r2, r2, #8 +- cmp r0, r2 ++ bic ip, sp, #0x1f00 ++ bic ip, ip, #0x00ff ++ ldr ip, [ip, #TSK_ADDR_LIMIT] ++ sub ip, ip, #8 ++ cmp r0, ip + 5: ldrlst r1, [r0], #4 +-6: ldrlst r2, [r0] ++6: ldrlst ip, [r0] + movls r0, #0 + movls pc, lr + + /* fall through */ + + __get_user_bad_8: +- mov r2, #0 ++ mov ip, #0 + __get_user_bad: + mov r1, #0 + mov r0, #-14 +--- linux/arch/arm/lib/putuser.S.orig Mon Nov 17 07:41:57 2003 ++++ linux/arch/arm/lib/putuser.S Mon Nov 17 07:42:26 2003 +@@ -16,7 +16,7 @@ + * __put_user_X + * + * Inputs: r0 contains the address +- * r1, r2 contains the value ++ * r1, ip contains the value + * Outputs: r0 is the error code + * lr corrupted + * +@@ -30,11 +30,11 @@ + + .global __put_user_1 + __put_user_1: +- bic r2, sp, #0x1f00 +- bic r2, r2, #0x00ff +- ldr r2, [r2, #TSK_ADDR_LIMIT] +- sub r2, r2, #1 +- cmp r0, r2 ++ bic ip, sp, #0x1f00 ++ bic ip, ip, #0x00ff ++ ldr ip, [ip, #TSK_ADDR_LIMIT] ++ sub ip, ip, #1 ++ cmp r0, ip + 1: strlsbt r1, [r0] + movls r0, #0 + movls pc, lr +@@ -42,11 +42,11 @@ __put_user_1: + + .global __put_user_2 + __put_user_2: +- bic r2, sp, #0x1f00 +- bic r2, r2, #0x00ff +- ldr r2, [r2, #TSK_ADDR_LIMIT] +- sub r2, r2, #2 +- cmp r0, r2 ++ bic ip, sp, #0x1f00 ++ bic ip, ip, #0x00ff ++ ldr ip, [ip, #TSK_ADDR_LIMIT] ++ sub ip, ip, #2 ++ cmp r0, ip + 2: strlsbt r1, [r0], #1 + movls r1, r1, lsr #8 + 3: strlsbt r1, [r0] +@@ -56,11 +56,11 @@ __put_user_2: + + .global __put_user_4 + __put_user_4: +- bic r2, sp, #0x1f00 +- bic r2, r2, #0x00ff +- ldr r2, [r2, #TSK_ADDR_LIMIT] +- sub r2, r2, #4 +- cmp r0, r2 ++ bic ip, sp, #0x1f00 ++ bic ip, ip, #0x00ff ++ ldr ip, [ip, #TSK_ADDR_LIMIT] ++ sub ip, ip, #4 ++ cmp r0, ip + 4: strlst r1, [r0] + movls r0, #0 + movls pc, lr +@@ -74,7 +74,7 @@ __put_user_8: + sub ip, ip, #8 + cmp r0, ip + 5: strlst r1, [r0], #4 +-6: strlst r2, [r0] ++6: strlst ip, [r0] + movls r0, #0 + movls pc, lr + +--- linux/include/asm-arm/uaccess.h.orig Mon Nov 17 07:41:04 2003 ++++ linux/include/asm-arm/uaccess.h Mon Nov 17 07:41:37 2003 +@@ -86,7 +86,7 @@ extern int __get_user_bad(void); + __get_user_x(__r1, __p, __e, 1, "lr"); \ + break; \ + case 2: \ +- __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \ ++ __get_user_x(__r1, __p, __e, 2, "ip", "lr"); \ + break; \ + case 4: \ + __get_user_x(__r1, __p, __e, 4, "lr"); \ +@@ -122,13 +122,13 @@ extern int __put_user_bad(void); + register int __e asm("r0"); \ + switch (sizeof(*(p))) { \ + case 1: \ +- __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \ ++ __put_user_x(__r1, __p, __e, 1, "ip", "lr"); \ + break; \ + case 2: \ +- __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \ ++ __put_user_x(__r1, __p, __e, 2, "ip", "lr"); \ + break; \ + case 4: \ +- __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \ ++ __put_user_x(__r1, __p, __e, 4, "ip", "lr"); \ + break; \ + case 8: \ + __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \ diff --git a/patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch b/patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch new file mode 100644 index 0000000..384926d --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch @@ -0,0 +1,23 @@ +Fixes +semaphore.c:180:5: missing terminating " character +semaphore.c:213:9: missing terminating " character +make[1]: *** [semaphore.o] Error 1 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast/crosstool-dev/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/linux-2.4.26/arch/arm/kernel' +make: *** [_dir_arch/arm/kernel] Error 2 + +when building kernel.org 2.4.26 for arm with gcc-3.3.x +(Note: one probably wants to apply ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2 +instead of my patches when really building 2.4.26 for arm; +my patches only include the bare minimum to get the vanilla kernel to compile.) + +--- linux-2.4.26/arch/arm/kernel/semaphore.c.old Mon Mar 21 06:50:38 2005 ++++ linux-2.4.26/arch/arm/kernel/semaphore.c Mon Mar 21 06:50:55 2005 +@@ -193,7 +193,7 @@ + bl __down_interruptible \n\ + mov ip, r0 \n\ + ldmfd sp!, {r0 - r3, pc}^ \n\ +- ++ \n\ + .align 5 \n\ + .globl __down_trylock_failed \n\ + __down_trylock_failed: \n\ diff --git a/patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch b/patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch new file mode 100644 index 0000000..1dd0b5e --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch @@ -0,0 +1,40 @@ +Backport of linux-2.6.8-arm-nonofpu.patch. +Fixes error when building linux-2.4.26 kernel with gcc-3.4 on arm. + +/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/bin/arm-unknown-linux-gnu-gcc -D__KERNEL__ -I/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=strongarm110 -mshort-load-bytes -msoft-float -Uarm -S -o constants.h.tmp.1 getconstants.c +cc1: error: invalid option `short-load-bytes' +make[2]: *** [constants.h] Error 1 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools' +make[1]: *** [dep] Error 2 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools' +make: *** [archdep] Error 2 + + +--- linux-2.4.26/Makefile.old Thu Sep 30 23:21:14 2004 ++++ linux-2.4.26/Makefile Thu Sep 30 23:24:12 2004 +@@ -21,6 +21,10 @@ + + CROSS_COMPILE = + ++# From linux-2.6 ++check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) ++export check_gcc ++ + # + # Include the make variables (CC, etc...) + # +--- linux-2.4.26/arch/arm/Makefile.old Thu Sep 30 23:16:49 2004 ++++ linux-2.4.26/arch/arm/Makefile Thu Sep 30 23:25:27 2004 +@@ -50,9 +50,9 @@ + tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 + tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 + +-CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm +-CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm +-AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float ++CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm ++CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm ++AFLAGS +=$(apcs-y) $(arch-y) -msoft-float + + ifeq ($(CONFIG_CPU_26),y) + PROCESSOR := armo diff --git a/patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch b/patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch new file mode 100644 index 0000000..60c68ef --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch @@ -0,0 +1,28 @@ +About ten times, various people have noticed that 'make dep' uses +really, really long commandlines. This breaks sh even on linux sometimes. + +For 2.4, see e.g. +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&w=2 +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&q=p3 +http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt +http://www.uclinux.org/pub/uClinux/archive/1728.html + +Fixes error when building linux kernel for some default arm configurations: + +scripts/mkdep -- `find /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/asm /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/linux /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/scsi /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/net /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend +/bin/sh: line 1: scripts/mkdep: Argument list too long +make: *** [dep-files] Error 126 + +[ For linux-2.4.26 ] + +--- linux-2.4.26/Makefile.old 2004-04-14 06:05:41.000000000 -0700 ++++ linux-2.4.26/Makefile 2004-09-13 21:27:39.000000000 -0700 +@@ -500,7 +500,7 @@ + ifdef CONFIG_MODVERSIONS + $(MAKE) update-modverfile + endif +- scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend ++ find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep | cat > .hdepend + scripts/mkdep -- init/*.c > .depend + + ifdef CONFIG_MODVERSIONS diff --git a/patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch b/patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch new file mode 100644 index 0000000..3dc0a48 --- /dev/null +++ b/patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch @@ -0,0 +1,17 @@ +Fixes drivers/char/char.o(.text+0x178a4): In function `$a': +: undefined reference to `get_user' + +Part of ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2 + +diff -urN linux-2.4.26/drivers/char/wdt977.c linux-2.4.26-vrs1/drivers/char/wdt977.c +--- linux-2.4.26/drivers/char/wdt977.c 2002-11-28 23:53:12.000000000 +0000 ++++ linux-2.4.26-vrs1/drivers/char/wdt977.c 2004-01-14 21:32:25.000000000 +0000 +@@ -27,6 +27,7 @@ + #include <asm/io.h> + #include <asm/system.h> + #include <asm/mach-types.h> ++#include <asm/uaccess.h> + + #define WATCHDOG_MINOR 130 + + |