Zynq7020 添加自己的驱动到内核

最近写完了一个驱动,生成ko文件在板子上执行,没有问题之后就想着把驱动编译到内核里,总不可能每次都加载ko文件吧。具体添加方法如下。

1、每个驱动文件夹下都会有个Kconfig的文件,这个文件就是你在menuconfig里看到那些选项的文件,我以一个HDMI驱动为例子,添加在最下方:

config DRM_I2C_ADV7511
	tristate "AV7511 encoder"
	depends on OF
	select DRM_KMS_HELPER
	select REGMAP_I2C
	help
	  Support for the Analog Device ADV7511(W) and ADV7513 HDMI encoders.

config DRM_I2C_ADV7511_AUDIO
	bool "ADV7511 HDMI Audio driver"
	depends on DRM_I2C_ADV7511 && SND_SOC
	select SND_SOC_HDMI_CODEC
	help
	  Support the ADV7511 HDMI Audio interface. This is used in
	  conjunction with the AV7511  HDMI driver.

config DRM_I2C_ADV7533
	bool "ADV7533 encoder"
	depends on DRM_I2C_ADV7511
	select DRM_MIPI_DSI
	default y
	help
	  Support for the Analog Devices ADV7533 DSI to HDMI encoder.

config ITE66121
	tristate  "it66121 driver"
	default  y
	help
	   it66121 driver

2、每个文件夹里也有个Makefile文件,在Makefile里添加如下:

adv7511-y := adv7511_drv.o
adv7511-$(CON

你可能感兴趣的:(Xilinx,Zynq7020)