MTD Subsystem in Torizon

Hi

I am analyzing the possibility to add an external SPI-NOR FLASH memory (model: w25q128, datasheet here) and use it like a normal disk with the help of MTD subsystem. This memory has support in the kernel source tree.
But I found out that MTD isn’t present in TorizonCore 5.3.0+build.7. I checked in linux-toradex.git - Linux kernel for Apalis and Colibri modules, branches toradex-5.4.y, toradex_5.4-2.3.x-imx, and toradex_5.4-2.1.x-imx, and mtd subsystem is in the sources, but I guess it wasn’t compiled.

I think I need to add the whole /drivers/mtd folder to enable support for my FLASH memory, correct me if I’m wrong.
Which is the easiest way to get support for this? Do I have to recompile TorizonCore through Yocto?

Thank you,
Tomás

Greetings @tomas.ayi,

Do you already know which MTD related config options you’ll require for your use-case?

I checked the TorizonCore kernel and it appears the most relevant config option is already set:

colibri-imx8x-v10b-06410685:~$ zcat /proc/config.gz | grep MTD_SPI_NOR
CONFIG_MTD_SPI_NOR=y

Or are their other configs you require?

Best Regards,
Jeremias