LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 12-09-2009, 11:59 PM   #1
ravi_chobey
Member
 
Registered: Sep 2007
Location: Bangalore,India
Distribution: Fedora,Mandriva,Debian
Posts: 180

Rep: Reputation: 30
Unhappy Problem while compiling driver for ARM9 EP9307A.


Dear All,

I am facing problems while compiling driver for ARM9 EP9307A.Its a very small "hello kernel" related C program.I am posting the driver logs and Makefile for you:

[root@localhost Driver]# /usr/local/arm/4.1.1-920t/bin/arm-linux-gcc -02 -D__KERNEL__ -DMODULE -I /root/linux-crater/arm/arm-linux/include -c test.c
arm-linux-gcc: unrecognized option '-02'
In file included from test.c:1:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:9:28: error: linux/spinlock.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:10:24: error: linux/list.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:12:28: error: linux/compiler.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:13:25: error: linux/cache.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:14:24: error: linux/kmod.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:16:29: error: linux/stringify.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:17:27: error: linux/kobject.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:18:31: error: linux/moduleparam.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:19:23: error: asm/local.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:21:24: error: asm/module.h: No such file or directory
In file included from test.c:1:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:48: error: field 'attr' has incomplete type
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/module.h:59: error: field 'kobj' has incomplete type
In file included from test.c:2:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:11:27: error: linux/linkage.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:15:26: error: linux/bitops.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:16:24: error: linux/log2.h: No such file or directory
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:18:21: error: asm/bug.h: No such file or directory
In file included from test.c:2:
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:102: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:107: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'NORET_TYPE'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:127: error: expected ')' before 'gfp'
/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4/include/linux/kernel.h:164: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'printk_timed_ratelimit'
test.c:8: error: expected ')' before string constant

And the Makefile:

KERNELDIR=/root/ACB_project/linux-crater_1-0-3/kernel/linux-2.6.20.4
#include $(KERNELDIR)/.config

CC = /usr/local/arm/4.1.1-920t/bin/arm-linux-gcc
LD = /usr/local/arm/4.1.1-920t/bin/arm-linux-ld
CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include \
-I$(KERNELDIR)/arch/arm \
-O -Wall

ifdef CONFIG_SMP
CFLAGS += -D__SMP__ -DSMP
endif

test.o: test.c

Please support me sorting this error.

Regards,
Ravi
 
Old 12-11-2009, 02:25 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Example : locate linkage.h
linux-2.6.2x.x/include/asm-arm/linkage.h
linux-2.6.2x.x/include/linux/linkage.h

Example2 : locate spinlock.h
linux-2.6.2x.x/include/asm-arm/spinlock.h
linux-2.6.2x.x/include/linux/spinlock.h

Suggest : ... example ... something like ..

make CC="arm-gcc -I/kernel/linux-2.6.20.4/include/"

( The ' -I ' is an upper case i.)
.....
 
  


Reply



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
compiling glic for ARM9 in Cygwin J_K_L Linux - Embedded & Single-board computer 1 03-13-2009 02:31 PM
ALSA driver for ARM9 kkchoudari@gmail.com Linux - Newbie 1 01-07-2009 07:23 AM
Compiling linux-2.6.26 for ln2440sbc (ARM9 core) jituelect Linux - Embedded & Single-board computer 2 09-29-2008 10:46 PM
USB device driver on ARM9 ravi_chobey Linux - Hardware 1 11-29-2007 01:20 AM
serial port device driver for linux ported on ARM9 mayank_linux Linux - Software 0 06-12-2006 02:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:19 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration