木一 发表于 2018-5-19 07:58:18

linux驱动

  字符驱动
  https://github.com/derekmolloy/exploringBB/blob/master/extras/kernel/ebbchar/ebbchar.c
  可惜的是函数不完整,只有几个
  

  块设备驱动
  http://blog.csdn.net/fulinus/article/details/8637957
  

  网络设备驱动
  http://blog.chinaunix.net/uid-25885064-id-3077098.html
  

  

  Makefile
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
else
KDIR := /lib/modules/$(shell uname -r)/build
all:
make -C $(KDIR) M=$(PWD) modules
clean:
rm -f *.ko *.o *.mod.o *.mod.c *.symvers
endif  
页: [1]
查看完整版本: linux驱动