LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 10-25-2012, 11:29 AM   #1
kevindebb
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
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

Last edited by kevindebb; 10-25-2012 at 12:06 PM.
 
Old 10-26-2012, 05:48 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stdio.h: No such file or directory. file is missing during gcc complile. culser Linux - Software 4 03-03-2011 01:59 PM
[SOLVED] LFS 6.2 Ch. 6.12 - Glibc 4.0.3: Stdio.h - No such file or directory PhoenixzeroX Linux From Scratch 4 01-23-2011 05:00 AM
stdio.h: No such file or directory elaa82 Linux - Software 2 12-29-2009 04:31 AM
test.c:1:19: error: stdio.h: No such file or directory Lokathor Debian 2 09-14-2006 12:11 PM
test.c:1:19: Stdio.h: No such file or directory :( wogga Linux - Software 1 06-11-2004 02:57 PM


All times are GMT -5. The time now is 06:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration