Shr*_*tel 1 device-driver linux-device-driver linux-kernel device-tree beagleboneblack
我的目标是将此驱动程序移植到当前的Linux内核上。我到目前为止所做的事情...
1)下载了当前内核版本的源代码。
2)下载了dev_parallel.c,Makefile,Kconfig以便重新编写代码。
3)使用“ make”命令,我能够正确编译驱动程序。
4)使用“ make modules”命令,我可以生成一个.o文件。
5)使用“ make modules_install”命令,我可以得到.ko文件。
6)使用“ modprobe”命令,我可以成功加载模块,而不会出现内核崩溃。
但是,我看到有该驱动程序所在的文件DTS 这里。我知道dts文件被编译为dtb文件,内核在启动时会读取它们,它会自动加载模块。
但是是否有必要拥有这个DTS文件,或者仅modprobe命令可以为我完成这项工作?
我在说的驱动程序是用于电子纸显示器(EPD)的。
因此,如果我连接EPD,然后执行modprobe来加载驱动程序,它将正常工作还是我需要DTS文件才能使其正常工作?
设备树是Linux内核源树中的一组文本文件,用于描述特定平台的硬件。它们可以具有两个扩展名:
Usually the kernel image and the device tree binary( a low level device description, specific to your device) are loaded.The 3.8+ kernel already have the support of device tree for all Armadeus platforms except APF9328.Most embedded platforms do not provide a way of discovering the hardware they have. You either have to resort to guesswork (which is not viable), or provide the Linux kernel with information about the board and the peripherals.Device tree files are present in arch/your_device_arch/boot/dts.
| 归档时间: |
|
| 查看次数: |
296 次 |
| 最近记录: |