Hello
I'm pretty lost with simple compilation. I want to write to parellel port of my device but can not use outb and inb macros. I isolated my problem to very simple program.
Here's what I did:
1) downloaded SDK to Debian Linux
2) used stupid program:
#include <asm/io.h>
int main(void)
{
return (0);
}
3) compiled with:
~/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel$ bin/mipsel-linux-gcc test7.c
4) got always long list of errors starting with:
In file included from /home/petr/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/../lib/gcc/mipsel-linux-uclibc/3.4.4/../../../../mipsel-linux-uclibc/sys-include/linux/sched.h:14,
from /home/petr/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/../lib/gcc/mipsel-linux-uclibc/3.4.4/../../../../mipsel-linux-uclibc/sys-include/linux/mm.h:4,
from /home/petr/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/../lib/gcc/mipsel-linux-uclibc/3.4.4/../../../../mipsel-linux-uclibc/sys-include/linux/pagemap.h:10,
from /home/petr/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/../lib/gcc/mipsel-linux-uclibc/3.4.4/../../../../mipsel-linux-uclibc/sys-include/asm/io.h:15,
from test7.c:1:
/home/petr/OpenWrt-SDK-Linux-i686-1/staging_dir_mipsel/bin/../lib/gcc/mipsel-linux-uclibc/3.4.4/../../../../mipsel-linux-uclibc/sys-include/linux/timex.h:173: error: field `time' has incomplete type
And many different errors.
So my problem is I can not even include asm/io.h, it always leads to errors.
I tried to track problematic place in library header files but got lost after a few modifications. Also compiling with -D__KERNEL__ doesn't help (even if I'm not 100% sure when it should be used). However with this macro defined I got only one error - sys-include/asm/pgtable.h:295:33: asm-generic/pgtable.h: No such file or directory
Would building complete package help me? But this example seems to me easy and should work even for simple compilation.
Thx 4 any help.
Petr