03修改上一级目录spi/下的Makefile和Kconfig
vi OK8MP-linux-kernel/drivers/net/can/spi/Makefile
添加:
[url=]复制[/url]
obj-y += mcp25xxfd/
复制代码
vi OK8MP-linux-kernel/drivers/net/can/spi/Kconfig
添加:
[url=]复制[/url]
source "drivers/net/can/spi/mcp25xxfd/Kconfig"
复制代码
04修改驱动配置文件,将MCP2518编译进内核
vi OK8MP-linux-kernel/arch/ARM64/configs/OK8MP-C_defconfig
找到:CONFIG_CAN_MCP251X=y
改为:# CONFIG_CAN_MCP251X is not set
添加:CONFIG_CAN_MCP25XXFD=y
05在设备树中配置时钟
vi OK8MP-linux-kernel/arch/arm64/boot/dts/freescale/OK8MP-C.dts
添加: