第一个驱动程序

114 阅读1分钟

在ubuntu的book用户下编译驱动程序

指定那个内核进行编译

image.png

vi Makefile

image.png

执行 make

image.png

编译文件移动到IMX6ULL开发板

image.png

在开发板装载驱动程序

insmod hello_drv.ko image.png image.png 设备节点出来了

image.png 查看驱动程序

cat /proc/devices

lsmod

也可以看到驱动程序

执行测试程序

image.png