[OpenAFS] openafs in user-mode-linux, status?

Horst Birthelmer horst@riback.net
Tue, 12 Oct 2004 13:56:39 +0200


On Oct 12, 2004, at 12:48 PM, Andreas Schuldei wrote:

> On Mon, Oct 11, 2004 at 08:37:33PM +0200, Andreas Schuldei wrote:
>> gcc -pipe -I. -I.. -I../nfs -I/tmp/modules/openafs/src=20
>> -I/tmp/modules/openafs/src/afs -I/tmp/modules/openafs/src/afs/LINUX=20=

>> -I/tmp/modules/openafs/src/config -I/tmp/modules/openafs/src/rx/LINUX=20=

>> -I/tmp/modules/openafs/src/rxkad=20
>> -I/tmp/modules/openafs/src/rxkad/domestic=20
>> -I/tmp/modules/openafs/src/util -I/tmp/modules/openafs/src=20
>> -I/tmp/modules/openafs/src/afs -I/tmp/modules/openafs/src/afs/LINUX=20=

>> -I/tmp/modules/openafs/src/util -I/tmp/modules/openafs/src/rxkad=20
>> -I/tmp/modules/openafs/src/config -I/tmp/modules/openafs/src/fsint=20
>> -I/tmp/modules/openafs/src/vlserver -I/tmp/modules/openafs/include=20
>> -I/tmp/modules/openafs/include/afs   -O2  -O2  -fomit-frame-pointer=20=

>> -fno-strength-reduce -fno-strict-aliasing -fno-common -pipe=20
>> -march=3Dpentium -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE  -DCPU=3D586=20=

>> -I. -I../ -I/tmp/modules/openafs/src/config=20
>> -I/tmp/modules/openafs/src/rx -I/tmp/modules/openafs/src/rxstat -c=20
>> /tmp/modules/openafs/src/afs/afs_analyze.c
>> In file included from ../linux/prefetch.h:13,
>>                  from ../linux/list.h:6,
>>                  from ../linux/wait.h:14,
>>                  from /tmp/modules/openafs/src/afs/sysincludes.h:57,
>>                  from /tmp/modules/openafs/src/afs/afs_analyze.c:20:
>> ../asm/processor.h:56: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared=20=

>> here (not in a function)
>> ../asm/processor.h:56: error: requested alignment is not a constant
>> In Datei, eingef=C3=BCgt von ../linux/fs.h:327,
>>                     von ../linux/capability.h:17,
>>                     von ../linux/binfmts.h:5,
>>                     von ../linux/sched.h:9,
>>                     von ../asm/uaccess.h:8,
>>                     von =
/tmp/modules/openafs/src/afs/sysincludes.h:82,
>>                     von =
/tmp/modules/openafs/src/afs/afs_analyze.c:20:
>> ../linux/hostfs_fs_i.h:4:24: filehandle.h: Datei oder Verzeichnis=20
>> nicht gefunden
>
> this is caused by a brokenness in=20
> libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs
> where it resets the UML kernel settings:
>
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/linux h
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/linux linux
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/net net
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/linux netinet
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/linux sys
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/asm-generic asm-generic
> ./libafs/MODLOAD-2.4.26-3um-SP/Makefile.afs:    ln -fs=20
> ${LINUX_KERNEL_PATH}/include/asm-i386 asm
>
> where is this makefile generated and what would be the proper
> fix?  why are all the links deleted in the first place? what
> buissness does this makefile have to change setting in an other
> source tree?

Nobody changes settings in another source tree. It's just making some=20
links in our own.
OpenAFS and of course AFS (from Transarc and and later IBM) didn't=20
always have an autoconf/automake buildprocess so having makefiles=20
including always the same directories (you know those "-I./h" in the=20
Makefiles or the " #include <sys/whatever_header.h>" in the sourcecode=20=

for example) but having the appropriate directory linked there on=20
different platforms is pretty reasonable.
You won't have to change the sourcecode for every platform. It's full=20
of "ifdefs" and we actually don't need more of them.

I don't know about UM-Linux but on a lot of other platforms the=20
Makefiles are generated from the MakefileProto.<Platform> files by the=20=

Makefile itself. (which are created form the MakefileProto<Platform>.in=20=

by configure)
You should build from the AFS root tree if you changed the=20
"MakefileProto" files.

Horst=