Hello,
I would like to backport the driver ADS1015 used for the ADC TLA2404 from kernel v5.19 into the current kernel v5.15 used in Toradex BSP. 6.3
I was thinking to proceed in this way:
- clone locally toradex_5.15-2.1.x-imx
- modify the ADS1015 source code
- create a recipes-kernel/linux/linux-toradex_5.15%.bbappend which modify the SCR_URI for recipe like this:
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex:"
SRC_URI += " \
file://<path to my local linux-kernel-source.tar.gz>\
"
is this enough? is this the right way to backport an in-tree driver?
Regards,
Rocco
Greetings @RoccoBr,
I see some issues with this working the way you think it might. While providing a tar archive in a bb recipe is suitable for supplying source-code. The issue here is that you’re appending on a recipe that already provides source code (via git repo). What is happening here then is that there would 2 sources supplying the source code in this recipe. In which case I’m not sure exactly what would happen here.
As an alternative suggestion I would recommend supplying a patch file instead. If you can get a patch/diff of the changes to the kernel you can add it in your bbappend instead. In this way the build will clone our original kernel source then apply your patch on top of it, before compilation.
If you need an example of this, you can reference how we apply patch files in our own kernel recipe here: linux-toradex_5.15-2.1.x.bb « linux « recipes-kernel - meta-toradex-nxp.git - Toradex BSP layer, recipes for NXP based modules
Best Regards,
Jeremias