当前位置:  技术问答>linux和unix

9命啊,insmod后/dev下没有

    来源: 互联网  发布时间:2016-12-08

    本文导语:  我在Ubuntu10.10下写了个hello world的 编译通过,insmod后lsmod也有,但为神马dev里木有啊 我鸟蛋,求大虾们相救啊 .c #include  #include  #include  static int hello_init(void) {     printk(KERN_ALERT "Hello, WARush!n");     return 0; }...

我在Ubuntu10.10下写了个hello world的 编译通过,insmod后lsmod也有,但为神马dev里木有啊
我鸟蛋,求大虾们相救啊
.c
#include 
#include 
#include 

static int hello_init(void)
{
    printk(KERN_ALERT "Hello, WARush!n");
    return 0;
}

static void hello_exit(void)
{
    printk(KERN_ALERT "Goodbye, WARushn");
}

module__init(hello_init);
module__exit(hello_exit);

MODULE_LICENSE("GPL");



Makefile
#Begin---Makefile
KERNELDIR=/lib/modules/2.6.35-28-generic/build
PWD:=$(shell pwd)
INSTALLDIR=/home/helloseeworld/OSHello/install
obj-m:= hello.o
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
cp hello.ko $(INSTALLDIR)
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
.PHONY: modules modules_install clean
#End---Makefile

|
当然没有,没有分配设备编号,没有mknod

|
出现设备是需要使用mknod创建设备节点的。

另外,你说的编译错误,怎么是查找/usr/include目录下的头文件啊?怎么不是内核头文件啊?

为什么别人的就没有呢?我也奇怪。

    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 升级linux到2.6.11后insmod模块都出现insmod invalid format??
  • insmod加载模块问题
  • 请高手帮忙解释一下,insmod ./$module.ko || exit 1中的“||”是什么意思啊,多谢!
  • 运行insmod ip_tables后,reboot后又无效了?
  • 驱动编译insmod问题,100分相送,在线等待,有效马上结贴
  • insmod加载模块问题.
  • 如何在程序中执行 insmod mydriver.ko命令?
  • Linux串口驱动insmod后无效
  • insmod是否每次开机都要运行
  • insmod 加载sis650_dvr.o-4-02
  • insmod或modprobe具体怎么用啊
  • RH9.0 insmod命令在默认的shell中找不到?
  • 自己写的模块insmod后变成permanent了。。。。奇怪
  • 在开发板上insmod模块led.o出错。
  • insmod模块无显示,但rmmod模块有显示
  • insmod: unsolved sysbol srand类似的错误!
  • insmod bridge.ko出错
  • [急] insmod时,报错unresolved symbol!!
  • insmod scull.ko出错 Unknown symbol in module
  • insmod 安装内核模块的问题


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,