Brian Hall wrote:
>
> Working on porting lcrash over to Alpha, I've hit a roadblock. To get started,
> I simply copied all lcrash/*/arch/i386 over to lcrash/*/arch/alpha, knowing
> that
Brian,
The real problem results from including kernel header files in applications
source with __KERNEL__ set. I found that there were conflicts between kernel
header files and standard header files that I could only resolve by undef'ing
certain kernel macros (see lib/libklib/include/asm-i386/kl_kernel.h). It's
REALLY
ugly, but since all I wanted was the type definitions, it was OK. I wish there
was an easy solution. The bottom line is, make whatever changes are necessary
to get lcrash to compile -- as long as you have access to the key kernel type
definitions, you will be all right.
Tom
> it would require modification. Problem is, I can't get anywhere trying to
> build
> it for Alpha. Since there is no fixmap.h for Alpha, I removed the reference to
> that include. Now I get a include problem I have not been able to resolve.
> I've
> tried building the whole kernel, and the problem also occurs with almost the
> exact same errors just building lib/libklib.
>
> (cd include ; /bin/ln -s asm-alpha asm; cd ..)
> cc -gstabs -D__KERNEL__ -I/usr/src/linux/include -I. -Iinclude -c -o klib.o
> klib.c
> In file included from /usr/src/linux/include/asm/semaphore.h:11,
> from /usr/src/linux/include/linux/fs.h:164,
> from /usr/src/linux/include/linux/capability.h:13,
> from /usr/src/linux/include/linux/binfmts.h:5,
> from /usr/src/linux/include/linux/sched.h:8,
> from /usr/src/linux/include/linux/mm.h:4,
> from include/asm/kl_kernel.h:10,
> from include/klib.h:12,
> from klib.c:4:
> /usr/src/linux/include/asm/current.h:4: global register variable follows a
> function definition
> /usr/src/linux/include/asm/current.h:4: warning: call-clobbered register used
> for global register variable
>
> This makes it look like the problem is in current.h, but it can't be;
> current.h
> is happy with the rest of the Alpha tree. How do I resolve this apparent
> conflict with the lcrash source?
>
> --
> Brian Hall <brianw.hall@xxxxxxxxxx>
> http://www.bigfoot.com/~brihall
> Linux Consultant
|