Linux内核模块自动加载不 [英] linux kernel module not autoloading

查看:759
本文介绍了Linux内核模块自动加载不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我STUDING Linux内核,并在这一点上一切的hello world模块开始是好的,但编译后的

I'm studing the linux kernel and start with hello world module at this point everything is fine but after compile

$ make

和安装

$ insmod akmod.ko

它没有显示在KERN_DEBUG一个Hello World的消息模块

the module it's not showing a "hello world" message on KERN_DEBUG

$ dmesg
nothing here
$

只显示在rmmod的

just show on rmmod

$ rmmod akmod
[4543.3423432] hello world
[5462.5323452] goodbye

在code是在这里发现了同样的: HTTP:// WWW .makelinux.net / LDD3 / CHP-2-教派-2

我只是改变了KERN_ALERT为KERN_DEBUG

I just changed the KERN_ALERT for KERN_DEBUG

我使用Debian 8。

I'm using Debian 8.

我认为这是因为该模块无法汇入作业自动加载在 insmod的

I think that occurs because the module it´s not autoloading on insmod

当我运行

$ make menuconfig

我找不到选项的自动内核模块加载

Loadable module support  --->
  [*] Enable loadable module support
  [*]   Module unloading
  [ ]   Module versioning support (EXPERIMENTAL)
  [*]   Automatic kernel module loading **(My menu config don´t show this option)**

任何意见,将AP preciated

Any advice will be appreciated

推荐答案

你所描述的一样,你的声音在你的printk年底不包括换行符(\\ n)。

What you are describing sounds like you did not include a newline ("\n") at the end of your printk.

既然你不同意你的实际code和你的insmod的显然不是从例子。 (insmod的akmod.ko?为什么akmod?akmod是一个完全不同的事情。)调试,这是一个完整的猜测。

Since you didn't share your actual code and your insmod is obviously not from the example. (insmod akmod.ko? Why akmod? akmod is a completely different thing.) debugging this is a complete guess.

这篇关于Linux内核模块自动加载不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆