[OpenAFS] porting to Linux ARM

Albrecht Gebhardt albrecht.gebhardt@uni-klu.ac.at
Sun, 3 Sep 2006 12:08:16 +0200


--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I'm currently trying to move all services from my i386 home server to
LinkSys NSLU2 ARM machines.

I was wondering if these NSLU2's could also take over my AFS cell when I no=
ticed
that there is no ARM port of OpenAFS available.

So I was trying to find out how I could get this to work.

I looked at the sources and added some ARM specific parts just similar
to the other architecture specific stuff.

No I'm at the following state:

bosserver, vlserver, fileserver, volserver, ptserver can be compiled
and are running (but untested if they really work, testing this would
easier with a running openafs client).

But the kernel module seems to be a little bit trickier:

In order to compile I had to re-add the afs syscall to include/asm-arm/unis=
td.h.
Then it compiles but when I modprobe it, it segfaults:

Unable to handle kernel paging request at virtual address c25c7af8
pgd =3D c0964000
[c25c7af8] *pgd=3D00000000
Internal error: Oops: f5 [#1]
Modules linked in: openafs af_packet ixp400_eth ixp400 usbhid ext3 jbd
mbcache
CPU: 0
pc : [<bf181ba0>]    lr : [<bf19c078>]    Tainted: PF
sp : c0fbff00  ip : 000000dd  fp : c0fbff30
r10: c0075918  r9 : c003b718  r8 : bf19c0f8
r7 : 00000000  r6 : 00001eb8  r5 : bf19c198  r4 : c01c7ae0
r3 : 00900006  r2 : 00000008  r1 : 00000000  r0 : ffffffff
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 397F  Table: 00964000  DAC: 00000015
Process modprobe (pid: 1728, stack limit =3D 0xc0fbe198)
Stack: (0xc0fbff00 to 0xc0fc0000)
ff00: 00030000 c01c0000 c02074f0 bf19c0f8 c02074e0 00000000 c001ff24
c0fbe000
ff20: 00018fd4 c0fbff48 c0fbff34 bf181de4 bf181aa0 c02074f0 bf19c840
c0fbff68
ff40: c0fbff4c bf182554 bf181ce0 c02074f0 bf19c840 c02074e0 00000000
c0fbff80
ff60: c0fbff6c bf1ab01c bf18254c c02074f0 bf19c840 c0fbffa4 c0fbff84
c0054720
ff80: bf1ab00c 00000000 00000000 00019100 00000080 c001ff24 00000000
c0fbffa8
ffa0: c001fd80 c00545bc 00000000 00000000 40131000 0009e4de 00019958
00000000
ffc0: 00000000 00000000 00019100 000160b8 00018fc8 00000000 00018fd4
00016050
ffe0: 400d35e0 be81aac4 0000b338 400d35ec 60000010 40131000 00000000
00000021
Backtrace:
Function entered at [<bf181a94>] from [<bf181de4>]
Function entered at [<bf181cd4>] from [<bf182554>]
 r5 =3D BF19C840  r4 =3D C02074F0
Function entered at [<bf182540>] from [<bf1ab01c>]
 r7 =3D 00000000  r6 =3D C02074E0  r5 =3D BF19C840  r4 =3D C02074F0
Function entered at [<bf1ab000>] from [<c0054720>]
 r5 =3D BF19C840  r4 =3D C02074F0
Function entered at [<c00545b0>] from [<c001fd80>]
 r8 =3D C001FF24  r7 =3D 00000080  r6 =3D 00019100  r5 =3D 00000000
 r4 =3D 00000000
Code: e89daff0 e5981008 e5953004 e0613003 (e7942103)

There are several possible reasons:

* I forgot to add some needed architecture specific stuff (I'm almost
  sure that this is the case anyway)=20

  My current patches are:

  http://algepop.net/slug/openafs-1.4.1-arm.diff
  (applies to the debian/unstable openafs_1.4.1-4 package)

  and

  http://algepop.net/slug/linux-2.6.16-afs-arm-syscall.diff

  Debian packages of the current state can also be found at
  http://algepop.net/slug/debian

* Issues with compiling/cross-compiling:
  The kernel itself is cross-compiled, the openafs module is
  compiled natively on the NSLU2. At least I used in both cases a
  gcc-3.4.

  I'm using DebianSlug
  (http://www.nslu2-linux.org/wiki/DebianSlug/HomePage),
  and had to compile everything myself using OpenEmbedded (see
  http://www.nslu2-linux.org/wiki/DebianSlug/BuildDebianSlug)=20
  which sets up everything needed for cross-compilation and finally=20
  builds an uploadable firmware image.

  After finishing this initial setup you can use the NSLU2 (with
  DebianSlug) as an ordinary Debian (ARM) system - the firmware only
  acts as an "initrd" image wich finally boots the Debian installation
  from an USB disk. That means: only changing the kernel results in the
  need to make a new firmware image.

  So maybe first I have to rebuild my firmware image with the changed
  include/asm-arm/unistd.h file ...  currently I changed only the=20
  headers during openafs module compilation.

* problems with kernel 2.6.16?

* ...? any other ideas?



Albrecht


--=20
// Albrecht Gebhardt          Tel.: (++43 463) 2700/3118
// Institut fuer Mathematik   Fax : (++43 463) 2700/3198
// Universitaet Klagenfurt    mailto:albrecht.gebhardt@uni-klu.ac.at
// Universitaetsstr. 65       http://www.math.uni-klu.ac.at/~agebhard
// A-9020 Klagenfurt, Austria
// GPG PK: http://www.math.uni-klu.ac.at/~agebhard/agebhard.asc
// GPG FP: F46F 656E E83C 9323 CE30  FF8F 9DBA D1A3 B55A 78A6

--uAKRQypu60I7Lcqm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFE+qmQnbrRo7VaeKYRAn5nAKCmrx7tXQukFiw2hZydHotQokHvMwCgtc57
UTUUWR8VlpoDlWZf/JVISGY=
=29pz
-----END PGP SIGNATURE-----

--uAKRQypu60I7Lcqm--