LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Crosscompile Raspberry Pi "stdio.h: No such file or directory" (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/crosscompile-raspberry-pi-stdio-h-no-such-file-or-directory-4175434047/)

kevindebb 10-25-2012 11:29 AM

Crosscompile Raspberry Pi "stdio.h: No such file or directory"
 
Hello everybody,

I'm trying to compile my own module on a Ubuntu system for the Raspberry pi. I followed this guide -> http://mitchtech.net/raspberry-pi-kernel-compile/

I succeeded to compile the testprogram "Hello world" on my ubuntu and import this with insmod in the kernel from my Raspberry Pi. The problem is when I include <stdint.h> in my more complex module I receive the following error: "stdio.h: No such file or directory". I search for hours how to import this into my kernel folder from the Rpi but I didn't found it. Does anybody know how to import this header file?

Makefile:
Code:

KERN_SRC=/home/kevin/Desktop/raspberrypi/linux
obj-m := test.o
 
all:
        make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=`pwd` modules
clean:
        make -C $(KERN_SRC) ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- M=`pwd` clean

Thanks in advance

Kevin

theNbomr 10-26-2012 05:48 PM

I don't know if the Makefile adds some flag(s) to change the default behavior of gcc so that it doesn't look in 'the usual place' for stdio.h, but since I'm pretty sure there is nothing in stdio.h that can be used from kernel space, it might do that. Do non-kernel sources compile and run correctly when cross compiled?

--- rod.


All times are GMT -5. The time now is 02:23 PM.