作者fish39 (沒有女朋友T.T)
看板CSSE
標題[問題] arm-gcc Compiler的問題
時間Fri May 12 23:06:11 2006
我的程式:
#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk("<0>hello\n");
return 0;}
void cleanup_module(void)
{
printk("<0>goodbye\n");}
在終端機下我輸入:arm-linux-gcc -o hello hello.c
會出現下面情況:
http://socdsp.ee.nchu.edu.tw/question/q.JPG
不知該如何解決,我有試著在include下面加入一般linux的version.h檔
不過,發現,加入後,又多了一些檔找不到~=.=
問題二:另外,我在redhat9的終端機下輸入:insmod ./hello.o
會出現版本不同的問題:
http://socdsp.ee.nchu.edu.tw/question/q2.JPG
改用:insmod -f ./hello.o 是可以強迫掛上去,但是有沒有別種較徹底的作法?
PS:arm-linux-gcc是嵌入式板子所提供的tool cahin 的cross compiler
希望有高手能解決我的問題
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.108.108
→ VSBSC:kernel source tree 不是選給arm的吧 05/13 16:09
→ fish39:你是說,要的kernel tree要用redhat的?? 05/14 01:05
→ fish39:kernel source tree 是要用redhat的,不是arm的?? 05/14 01:06
→ VSBSC:好像你也沒define _kernel_ 05/14 15:23
推 cole945:編模組有編模組的參數~ 05/14 21:10
推 fish39:不懂@.@我試過用redhat的kernel tree,但還是有問題~ 05/15 00:02