[root@localhost drivertest]# make make -C /lib/modules/2.6.23.1-42.fc8/build M=/home/stone/drivertest modules make[1]: Entering directory `/usr/src/kernels/2.6.23.1-42.fc8-i686' CC [M] /home/stone/drivertest/hello.o Building modules, stage 2. MODPOST 1 modules WARNING: "struct_module" [/home/stone/drivertest/hello.ko] undefined! CC /home/stone/drivertest/hello.mod.o LD [M] /home/stone/drivertest/hello.ko make[1]: Leaving directory `/usr/src/kernels/2.6.23.1-42.fc8-i686' [root@localhost drivertest]# ls hello.c hello.ko hello.mod.o helloworld Makefile~ myproject1-0.9.10 hello.c~ hello.mod.c hello.o Makefile Module.symvers [root@localhost drivertest]# insmod hello.ko [root@localhost drivertest]# Message from syslogd@localhost at Feb 17 19:50:45 ... kernel: Hello World enter!
[root@localhost drivertest]# rmmod hello [root@localhost drivertest]# Message from syslogd@localhost at Feb 17 19:51:43 ... kernel: Hello world exit!
[root@localhost drivertest]# vi hello.c [root@localhost drivertest]# tail /var/log/messages Feb 17 19:33:21 localhost gconfd (root-1949): 地址“xml:readonly:/etc/gconf/gconf.xml.mandatory”解析为位于 0 的只读配置源 Feb 17 19:33:21 localhost gconfd (root-1949): 地址“xml:readwrite:/root/.gconf”解析为位于 1 的可写入配置源 Feb 17 19:33:21 localhost gconfd (root-1949): 地址“xml:readonly:/etc/gconf/gconf.xml.defaults”解析为位于 2 的只读配置源 Feb 17 19:33:26 localhost pulseaudio[1965]: main.c: This program is not intended to be run as root (unless --system is specified). Feb 17 19:33:26 localhost pulseaudio[1965]: pid.c: Daemon already running. Feb 17 19:33:26 localhost pulseaudio[1965]: main.c: pa_pid_file_create() failed. Feb 17 19:33:33 localhost gconfd (root-1949): 地址“xml:readwrite:/root/.gconf”解析为位于 0 的可写入配置源 Feb 17 19:34:11 localhost yum-updatesd-helper: error getting update info: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its pat