[OpenAFS-devel] Re: Compiling openafs on arm64/aarch64
architecture
Benjamin Kaduk
kaduk@MIT.EDU
Fri, 5 Sep 2014 14:28:19 -0400 (EDT)
On Fri, 5 Sep 2014, Micheal waltz wrote:
> This made it slightly farther into the kernel module build, it's now giving
> errors about pioctl32:
>
> /home/mwaltz/git/openafs/src/libafs/MODLOAD-3.13.0-34-generic-MP/afs_syscall.c:
> In function 'copyin_afs_ioctl':
> /home/mwaltz/git/openafs/src/libafs/MODLOAD-3.13.0-34-generic-MP/afs_syscall.c:146:2:
> error: #error pioctl32 not done for this linux
> #error pioctl32 not done for this linux
> ^
> /home/mwaltz/git/openafs/src/libafs/MODLOAD-3.13.0-34-generic-MP/afs_syscall.c:
> In function 'copyin_iparam':
> /home/mwaltz/git/openafs/src/libafs/MODLOAD-3.13.0-34-generic-MP/afs_syscall.c:421:2:
> error: #error iparam32 not done for this linux platform
> #error iparam32 not done for this linux platform
> ^
> make[6]: ***
> [/home/mwaltz/git/openafs/src/libafs/MODLOAD-3.13.0-34-generic-MP/afs_syscall.o]
> Error 1
>
> Which in src/afs/afs_syscall.c looks like it there are blocks for other 64-bit
> Linux archs when AFS_LINUX_64BIT_KERNEL is defined. I don't think I can just
> copy the amd64 block for arm64 however since it appears to have Intel
> specifics.
These blocks are where the kernel is checking whether the calling process
is a 32-bit process or not. It is (apparently) specific to the system
architecture on linux, which is a bit surprising.
If linux arm64 does not support running 32-bit executables, you can just
put in "if (0)". You could probably do so for now even if arm64 does
support 32-bit executables, with an XXX comment that it needs to be
revisited. I am not a linux kernel expert, so I don't know how to do this
"properly" off the top of my head.
-Ben