[問題] arm-gcc Compiler的問題

看板CSSE (電腦科學及軟體工程)作者 (沒有女朋友T.T)時間19年前 (2006/05/12 22:48), 編輯推噓2(204)
留言6則, 3人參與, 最新討論串1/2 (看更多)
我的程式: #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

05/13 16:09, , 1F
kernel source tree 不是選給arm的吧
05/13 16:09, 1F

05/14 01:05, , 2F
你是說,要的kernel tree要用redhat的??
05/14 01:05, 2F

05/14 01:06, , 3F
kernel source tree 是要用redhat的,不是arm的??
05/14 01:06, 3F

05/14 15:23, , 4F
好像你也沒define _kernel_
05/14 15:23, 4F

05/14 21:10, , 5F
編模組有編模組的參數~
05/14 21:10, 5F

05/15 00:02, , 6F
不懂@.@我試過用redhat的kernel tree,但還是有問題~
05/15 00:02, 6F
文章代碼(AID): #14PA1GOv (CSSE)
討論串 (同標題文章)
文章代碼(AID): #14PA1GOv (CSSE)