Skip to contentSkip to conversation

klibc kernelheaders build failure on mips/mipsel

DISCUSSION maximilian attems 4 participants 6 messages Jul 29, 2007 – Jul 30, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

switching to newer linux-libc-dev linux-2.6 provided kernel headers worked fine beside on mips mipsel:

In file included from usr/klibc/arch/mips/crt0.S:11:
usr/include/arch/mips/machine/asm.h:8:24: error: asm/regdef.h: No such file or directory
usr/include/arch/mips/machine/asm.h:9:21: error: asm/asm.h: No such file or directory

i'm not sure if you want to export both headers in the make kernelheaders target or if it is the fault of klibc to assume that those are available?

Signature · 1 line
maks
#1 lore raw
Quoted 9 lines · maximilian attems

switching to newer linux-libc-dev linux-2.6 provided kernel headers worked fine beside on mips mipsel:

In file included from usr/klibc/arch/mips/crt0.S:11:
usr/include/arch/mips/machine/asm.h:8:24: error: asm/regdef.h: No such file or directory
usr/include/arch/mips/machine/asm.h:9:21: error: asm/asm.h: No such file or directory

Quoted 4 lines

i'm not sure if you want to export both headers in the make kernelheaders target or if it is the fault of klibc to assume that those are available?

If I remember correctly (sorry, I'm on the road at the moment), those files should be exportable. They wouldn't be all that hard to replicate in klibc, though.

-hpa

#2 lore raw
Quoted 8 lines · H. Peter Anvin
Quoted 4 lines

i'm not sure if you want to export both headers in the make kernelheaders target or if it is the fault of klibc to assume that those are available?

If I remember correctly (sorry, I'm on the road at the moment), those files should be exportable. They wouldn't be all that hard to replicate in klibc, though.

Both headers contain cpp macros for assembly code to work with the mariads of mips ABIs. I don't think the kernel should export those headers. And yes, they're both quite trivial.

#3 lore raw
In reply to H. Peter Anvin
Quoted 6 lines · H. Peter Anvin
Quoted 6 lines

In file included from usr/klibc/arch/mips/crt0.S:11:
usr/include/arch/mips/machine/asm.h:8:24: error: asm/regdef.h: No such file or directory
usr/include/arch/mips/machine/asm.h:9:21: error: asm/asm.h: No such file or directory

Quoted 8 lines
Quoted 4 lines

i'm not sure if you want to export both headers in the make kernelheaders target or if it is the fault of klibc to assume that those are available?

If I remember correctly (sorry, I'm on the road at the moment), those files should be exportable. They wouldn't be all that hard to replicate in klibc, though.

<asm/asm.h> would need to add __KERNEL__ wrappers around the CONFIG_* bits. In addition you probably want to have <asm/fpregdef.h> exported. With a few changes you should be able to get away without using <asm/sgidefs.h>.

Ralf

#4 lore raw
Quoted 11 lines · Ralf Baechle
Quoted 11 lines
Quoted 10 lines

In file included from usr/klibc/arch/mips/crt0.S:11:
usr/include/arch/mips/machine/asm.h:8:24: error: asm/regdef.h: No such file or directory
usr/include/arch/mips/machine/asm.h:9:21: error: asm/asm.h: No such file or directory

i'm not sure if you want to export both headers in the make kernelheaders target or if it is the fault of klibc to assume that those are available?

Quoted 7 lines
Quoted 3 lines

If I remember correctly (sorry, I'm on the road at the moment), those files should be exportable. They wouldn't be all that hard to replicate in klibc, though.

<asm/asm.h> would need to add __KERNEL__ wrappers around the CONFIG_* bits. In addition you probably want to have <asm/fpregdef.h> exported. With a few changes you should be able to get away without using <asm/sgidefs.h>.

Oh, the canonical place for these headers outside the kernel is either <{regdef,fpregdef,asm}.h> and <sys/{regdef,fpregdef,asm}.h>, not <asm/...>.

Ralf

#5 lore raw
Quoted 4 lines · Ralf Baechle

Oh, the canonical place for these headers outside the kernel is either <{regdef,fpregdef,asm}.h> and <sys/{regdef,fpregdef,asm}.h>, not <asm/...>.

Well, yes, but klibc implements a lot of headers by #including appropriate kernel bits.

-hpa