Hi @btarnowski ,
There's some ways :
1. Commit your driver source code into your own linux-imx repository then update the URL and commit HASH of your linux & driver in the following recipe : <path-to-yocto-bsp>/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx_%.bbappend
KERNEL_src="git://git@gitlab.com:/company-name/linux-imx.git;protocol=ssh" # The repository of your company, cloned and modified from https://source.codeaurora.org/external/imx/linux-imx/
SRCBRANCH = "lf-5.10.y"
SRCREV = "a11753a89ec610768301d4070e10b8bd60fde8cd" # The commit that you added your driver
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
or,
2. Add local patches to the default NXP's source (downloaded from https://source.codeaurora.org/external/imx/linux-imx/) :
a. Add patches and .bbappend :
$ tree <path-to-yocto-bsp>/sources/meta-imx/meta-bsp/recipes-kernel/linux/
<path-to-yocto-bsp>/sources/meta-imx/meta-bsp/recipes-kernel/linux/
├── linux-imx
│ ├── 0001-dts-imx8mp-evk-Add-DTS-with-AR0234-sensor-nodes.patch
│ ├── 0002-dts-imx8mp-evk-Add-camera-SYNC-signals.patch
│ ├── 0011-defconfig-Enable-PRINTK-and-set-LOGLEVEL.patch
│ └── 0012-Enable-debugging-of-MIPI-CSI2-interface.patch
├── linux-imx_5.10.bb
├── linux-imx_%.bbappend
├── linux-imx-headers_5.10.bb
└── linux-imx-headers_%.bbappend
b. Modify <path-to-yocto-bsp>/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx_%.bbappend to add patches' location :
SRC_URI_append_mx8 = " \
file://0001-dts-imx8mp-evk-Add-DTS-with-AR0234-sensor-nodes.patch \
file://0002-dts-imx8mp-evk-Add-camera-SYNC-signals.patch \
file://0011-defconfig-Enable-PRINTK-and-set-LOGLEVEL.patch \
file://0012-Enable-debugging-of-MIPI-CSI2-interface.patch \
After that, you will need to re-bitbake your kernel : bitbake virtual/kernel -c cleansstate && bitbake virtual/kernel -c compile && bitbake <image-name>
Regards,
K.