荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: jjksam (embedded), 信区: Linux
标  题: Re: 为何加载不了helloworld?
发信站: 荔园晨风BBS站 (Thu Jan  9 11:56:04 2003), 转信

please read LDD2.P24-26 Version Dependency for more detail.

and please 3rd paragraph in LDD2.P16
It says that:
"However, we storngly suggest you compile and run your own kernel(without ver-
sion support) before you run the sample code."

看来你的内核是有版本控制的.
另外一个方法就是在那个程序前面加一行

【 在 chenguang.bbs@bbs.DormForce.net (晨光) 的大作中提到: 】
: 按照LDD2 copy了一个hello.c
+ #define __NO_VERSION__
: #define MODULE
: #include <linux/module.h>
: int init_module(void) { printk("<1>Hello, world\n"); return 0; }
: void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); }
: 编译很顺利,但在insmod 的时候出了问题:
: hello.o: kernel-module version mismatch
:         hello.o was compiled for kernel version 2.4.9-9
:         while this kernel is version 2.4.18-14.
: 请问2.4.18的核心到底做了哪些改动,应该怎样改才可以加载呢?


--
    ~
  ' v '
 //   \\                  ←--这个是企鹅!
/(     )\
  ^ ~ ^

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.0.234]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店