i.MX8QM Android13 generate .ko module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8QM Android13 generate .ko module

283 Views
Tamako
Contributor I

Hi 

I'm using i.MX8QM,the development environment is Android13_car.I have a problem with generate device driver.

I added an i2c device in 8QM,and the driver program is written. this driver file in vendor/nxp-opensource/kernel_imx/drivers/mydevice.And then , I create Kconfig and Makefile,and modified upper-level directory,the modification is as follows:

mydevice/Kconfig : 

config xxx_test

          tristate "xxx_test"

          help

               this is my device driver

mydevice/Makefile:

obj-$(CONFIG_XXX_TEST) += test.o

drivers/Kconfig:

# add source

source "drivers/myfm/Kconfig"

drivers/Makefile:

obj-$(CONFIG_XXX_TEST) += mydevice/

 

Then i set the option to m by make menuconfig in the kernel directory

I checked .config file,appended CONFIG_XXX_TEST = m

No gererate .ko file when use make command

Can you tell me what the reason is,and how to generate. ko files

0 Kudos
Reply
1 Reply

254 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Tamako 

1.You need add CONFIG_XXX_TEST = m to vendor/nxp-opensource/kernel_imx/arch/arm64/configs/ imx8q_car_gki.fragment

2.Then add .ko in device/nxp/xxx/board_name/SharedBoardConfig.mk

@@ -61,7 +61,8 @@ BOARD_VENDOR_KERNEL_MODULES += \
$(KERNEL_OUT)/drivers/mxc/hantro_v4l2/vsiv4l2.ko \
$(KERNEL_OUT)/drivers/rtc/rtc-snvs.ko \
$(KERNEL_OUT)/drivers/net/phy/at803x.ko \
- $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko
+ $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko \
+ $(KERNEL_OUT)/drivers/xxxx/xxxx.ko
endif

# CONFIG_TOUCHSCREEN_GOODIX: goodix.ko, rm67199 mipi-panel touch driver module
@@ -157,7 +158,8 @@ BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
$(KERNEL_OUT)/drivers/trusty/trusty-log.ko \
$(KERNEL_OUT)/drivers/trusty/trusty-virtio.ko \
$(KERNEL_OUT)/net/wireless/cfg80211.ko \
- $(KERNEL_OUT)/net/mac80211/mac80211.ko
+ $(KERNEL_OUT)/net/mac80211/mac80211.ko \
+ $(KERNEL_OUT)/drivers/xxxx/xxxx.ko
else

Best Regards

Zhiming

 

0 Kudos
Reply