diff -uNr openafs-1.4.1.orig/acinclude.m4 openafs-1.4.1/acinclude.m4
--- openafs-1.4.1.orig/acinclude.m4	2006-03-23 16:50:19.000000000 +0100
+++ openafs-1.4.1/acinclude.m4	2006-09-03 13:01:51.000000000 +0200
@@ -457,6 +457,9 @@
 		alpha*-linux*)
 			AFS_SYSNAME="alpha_linux_XX"
 			;;
+                arm*-linux*)
+                        AFS_SYSNAME="arm_linux_XX"
+                        ;;
 		s390-*-linux*)
 			AFS_SYSNAME="s390_linuxXX"
 			;;
diff -uNr openafs-1.4.1.orig/configure openafs-1.4.1/configure
--- openafs-1.4.1.orig/configure	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/configure	2006-09-03 13:01:51.000000000 +0200
@@ -5444,6 +5444,9 @@
 		alpha*-linux*)
 			AFS_SYSNAME="alpha_linux_XX"
 			;;
+                arm*-linux*)
+                        AFS_SYSNAME="arm_linux_XX"
+                        ;;
 		s390-*-linux*)
 			AFS_SYSNAME="s390_linuxXX"
 			;;
@@ -13552,6 +13555,22 @@
 		SHLIB_LINKER="${MT_CC} -shared"
 		;;
 
+
+        arm_linux_26)
+                CCOBJ="${CC} -fPIC"
+                KERN_OPTMZ=-O2
+                LEX="flex -l"
+                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+                MT_LIBS="-lpthread"
+                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+                SHLIB_CFLAGS="-fPIC"
+                SHLIB_LDFLAGS="-shared -Xlinker -x"
+                TXLIBS="-lncurses"
+                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+                YACC="bison -y"
+                SHLIB_LINKER="${MT_CC} -shared"
+                ;;
+
 	hp_ux102)
 		AS="/usr/ccs/bin/as"
 		CC="/opt/ansic/bin/cc -Ae"
diff -uNr openafs-1.4.1.orig/configure-libafs openafs-1.4.1/configure-libafs
--- openafs-1.4.1.orig/configure-libafs	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/configure-libafs	2006-09-03 13:01:52.000000000 +0200
@@ -5445,6 +5445,9 @@
 		alpha*-linux*)
 			AFS_SYSNAME="alpha_linux_XX"
 			;;
+                arm*-linux*)
+                        AFS_SYSNAME="arm_linux_XX"
+                        ;;
 		s390-*-linux*)
 			AFS_SYSNAME="s390_linuxXX"
 			;;
@@ -13552,6 +13555,21 @@
 		SHLIB_LINKER="${MT_CC} -shared"
 		;;
 
+        arm_linux_26)
+                CCOBJ="${CC} -fPIC"
+                KERN_OPTMZ=-O2
+                LEX="flex -l"
+                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+                MT_LIBS="-lpthread"
+                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+                SHLIB_CFLAGS="-fPIC"
+                SHLIB_LDFLAGS="-shared -Xlinker -x"
+                TXLIBS="-lncurses"
+                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+                YACC="bison -y"
+                SHLIB_LINKER="${MT_CC} -shared"
+                ;;
+
 	hp_ux102)
 		AS="/usr/ccs/bin/as"
 		CC="/opt/ansic/bin/cc -Ae"
diff -uNr openafs-1.4.1.orig/debian/changelog openafs-1.4.1/debian/changelog
--- openafs-1.4.1.orig/debian/changelog	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/debian/changelog	2006-09-03 13:04:45.000000000 +0200
@@ -1,3 +1,9 @@
+openafs (1.4.1-4ag) unstable; urgency=low
+
+  * try an ARM port
+
+ -- Build User <debuild@nslu1.home.algepop.net>  Sun,  3 Sep 2006 13:04:45 +0200
+
 openafs (1.4.1-4) unstable; urgency=low
 
   * Apply upstream fix from Derek Atkins for compilation with kernel
diff -uNr openafs-1.4.1.orig/debian/control openafs-1.4.1/debian/control
--- openafs-1.4.1.orig/debian/control	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/debian/control	2006-09-03 13:01:52.000000000 +0200
@@ -7,7 +7,7 @@
 Standards-Version: 3.7.2
 
 Package: openafs-client
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: openafs-modules-source (>= 1.2.9) | openafs-modules2, lsof
 Suggests: openafs-doc
@@ -22,7 +22,7 @@
 
 Package: openafs-kpasswd
 Priority: extra
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Depends: ${shlibs:Depends}, openafs-client
 Conflicts: krb5-user, heimdal-clients, kerberos4kth-clients
 Description: AFS distributed filesystem old password changing
@@ -36,7 +36,7 @@
  package for new cells or for cells using Kerberos v5.
 
 Package: openafs-fileserver
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Depends: ${shlibs:Depends}, ${misc:Depends}, openafs-client
 Recommends: ntp
 Suggests: openafs-doc
@@ -49,7 +49,7 @@
  installed on any machine that will export files into AFS.
 
 Package: openafs-dbserver
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Depends: ${shlibs:Depends}, ${perl:Depends}, openafs-fileserver, openafs-client
 Suggests: openafs-doc
 Conflicts: openafs-ptutil
@@ -76,7 +76,7 @@
  protocol documentation, and other OpenAFS documentation.
 
 Package: openafs-krb5
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Depends: ${shlibs:Depends}
 Description: AFS distributed filesystem Kerberos 5 integration
  AFS is a distributed filesystem allowing cross-platform sharing of files
@@ -90,7 +90,7 @@
 
 Package: libopenafs-dev
 Section: libdevel
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Priority: extra
 Depends: ${shlibs:Depends}
 Suggests: openafs-doc
@@ -117,7 +117,7 @@
 Package: libpam-openafs-kaserver
 Priority: extra
 Depends: ${shlibs:Depends}, openafs-client
-Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64 arm
 Description: AFS distributed filesystem kaserver PAM module
  AFS is a distributed filesystem allowing cross-platform sharing of
  files among multiple computers.  Facilities are provided for access
diff -uNr openafs-1.4.1.orig/debian/kern-sysname openafs-1.4.1/debian/kern-sysname
--- openafs-1.4.1.orig/debian/kern-sysname	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/debian/kern-sysname	2006-09-03 13:01:52.000000000 +0200
@@ -44,6 +44,9 @@
         ;;
     esac
     ;;
+arm*)
+    echo arm_linux_26
+    ;;
 sparc)
     case $KVERS in
     2.2*)
diff -uNr openafs-1.4.1.orig/debian/sysname openafs-1.4.1/debian/sysname
--- openafs-1.4.1.orig/debian/sysname	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/debian/sysname	2006-09-03 13:01:52.000000000 +0200
@@ -12,6 +12,9 @@
 amd64)
     echo amd64_linux26
     ;;
+arm*)
+    echo arm_linux_26
+    ;;
 hppa)
     echo parisc_linux24
     ;;
diff -uNr openafs-1.4.1.orig/src/cf/osconf.m4 openafs-1.4.1/src/cf/osconf.m4
--- openafs-1.4.1.orig/src/cf/osconf.m4	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/src/cf/osconf.m4	2006-09-03 13:01:52.000000000 +0200
@@ -110,6 +110,21 @@
 		SHLIB_LINKER="${MT_CC} -shared"
 		;;
 
+        arm_linux_26)
+                CCOBJ="${CC} -fPIC"
+                KERN_OPTMZ=-O2
+                LEX="flex -l"
+                MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+                MT_LIBS="-lpthread"
+                PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
+                SHLIB_CFLAGS="-fPIC"
+                SHLIB_LDFLAGS="-shared -Xlinker -x"
+                TXLIBS="-lncurses"
+                XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+                YACC="bison -y"
+                SHLIB_LINKER="${MT_CC} -shared"
+                ;;
+
 	hp_ux102)
 		AS="/usr/ccs/bin/as"
 		CC="/opt/ansic/bin/cc -Ae"
diff -uNr openafs-1.4.1.orig/src/config/afs_sysnames.h openafs-1.4.1/src/config/afs_sysnames.h
--- openafs-1.4.1.orig/src/config/afs_sysnames.h	2006-03-15 17:16:36.000000000 +0100
+++ openafs-1.4.1/src/config/afs_sysnames.h	2006-09-03 13:01:52.000000000 +0200
@@ -243,6 +243,8 @@
 
 #define SYS_NAME_ID_i64_w2k             3500
 
+#define SYS_NAME_ID_arm_linux_26        3103
+
 /*
  * Placeholder to keep system-wide standard flags since this file is included by all 
  * files (i.e in afs/param.h)
diff -uNr openafs-1.4.1.orig/src/config/param.arm_linux_26.h openafs-1.4.1/src/config/param.arm_linux_26.h
--- openafs-1.4.1.orig/src/config/param.arm_linux_26.h	1970-01-01 01:00:00.000000000 +0100
+++ openafs-1.4.1/src/config/param.arm_linux_26.h	2006-09-03 13:01:52.000000000 +0200
@@ -0,0 +1,163 @@
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_LINUX24_ENV        1
+#define AFS_LINUX26_ENV        1
+#define AFS_ARM_LINUX20_ENV   1
+#define AFS_ARM_LINUX22_ENV   1
+#define AFS_ARM_LINUX24_ENV   1
+#define AFS_ARM_LINUX26_ENV   1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1	/* User space interface to file system */
+#define AFS_64BIT_ENV		1
+#define AFS_64BIT_CLIENT	1
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#ifndef AFS_SMP
+#define AFS_SMP 1
+#endif
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#ifndef CONFIG_SMP
+#define CONFIG_SMP 1
+#endif
+
+/* FIXME: */
+#if 0
+#ifndef CONFIG_X86_LOCAL_APIC
+#define CONFIG_X86_LOCAL_APIC 1
+#endif
+#endif
+
+#ifndef __SMP__
+#define __SMP__
+#endif
+#endif
+#define AFS_GLOBAL_SUNLOCK
+
+#endif /* __KERNEL__  && !DUMP_KERNEL */
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
+
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1	/* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+#define AFS_USE_GETTIMEOFDAY       1	/* use gettimeofday to implement rx clock */
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#ifndef KERNEL
+#define __USE_LARGEFILE64 1
+#if !defined off64_t
+#define off64_t __off64_t
+#endif
+#endif
+
+/* Machine / Operating system information */
+#define SYS_NAME       "arm_linux_26"
+#define SYS_NAME_ID    SYS_NAME_ID_arm_linux_26
+
+#ifdef __GLIBC__
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+#define USE_UCONTEXT
+#endif
+#endif
+#endif /* AFS_PARAM_H */
+
+
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously i386 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1	/* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_USR_LINUX26_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1	/* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0	/* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "arm_linux_26"
+#define SYS_NAME_ID    SYS_NAME_ID_arm_linux_26
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1	/* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
diff -uNr openafs-1.4.1.orig/src/libafs/MakefileProto.LINUX.in openafs-1.4.1/src/libafs/MakefileProto.LINUX.in
--- openafs-1.4.1.orig/src/libafs/MakefileProto.LINUX.in	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/src/libafs/MakefileProto.LINUX.in	2006-09-03 13:01:52.000000000 +0200
@@ -61,6 +61,10 @@
 <i386_umlinux26>
 EXTRA_CFLAGS = -I$(LINUX_KERNEL_PATH)/arch/um/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/tt/include -I$(LINUX_KERNEL_PATH)/arch/um/kernel/skas/include
 
+<arm_linux_26>
+CCFLAGS = $(COMMON_KERN_CFLAGS) -msoft-float -fno-builtin 
+DEFINES = $(COMMON_DEFINES)
+
 <alpha_linux_22 alpha_linux_24 alpha_linux_26>
 CCFLAGS = $(COMMON_KERN_CFLAGS) -mno-fp-regs -ffixed-8
 DEFINES = $(COMMON_DEFINES)
diff -uNr openafs-1.4.1.orig/src/lwp/process.c openafs-1.4.1/src/lwp/process.c
--- openafs-1.4.1.orig/src/lwp/process.c	2006-09-03 10:11:25.000000000 +0200
+++ openafs-1.4.1/src/lwp/process.c	2006-09-03 13:01:52.000000000 +0200
@@ -112,6 +112,8 @@
 #define LWP_FP 7
 #elif defined(AFS_PARISC_LINUX24_ENV)
 #define LWP_SP 19
+#elif defined(AFS_ARM_LINUX26_ENV)
+#define LWP_SP 20
 #else
 #error Unsupported linux LWP system type.
 #endif
diff -uNr openafs-1.4.1.orig/src/packaging/Debian/kern-sysname openafs-1.4.1/src/packaging/Debian/kern-sysname
--- openafs-1.4.1.orig/src/packaging/Debian/kern-sysname	2006-03-23 21:20:31.000000000 +0100
+++ openafs-1.4.1/src/packaging/Debian/kern-sysname	2006-09-03 13:02:55.000000000 +0200
@@ -34,6 +34,9 @@
 ia64)
     echo ia64_linux24
     ;;
+arm*)
+    echo arm_linux_26
+    ;;
 alpha)
     case $KVERS in
     2.2*)
diff -uNr openafs-1.4.1.orig/src/packaging/Debian/sysname openafs-1.4.1/src/packaging/Debian/sysname
--- openafs-1.4.1.orig/src/packaging/Debian/sysname	2006-03-23 22:07:50.000000000 +0100
+++ openafs-1.4.1/src/packaging/Debian/sysname	2006-09-03 13:01:52.000000000 +0200
@@ -12,6 +12,9 @@
 amd64)
     echo amd64_linux24
     ;;
+arm*)
+    echo arm_linux_26
+    ;;
 hppa)
     echo parisc_linux24
     ;;

