Setting up Linux drivers/configuration to access mtd flash

I’ve been working on firmware for the HiFive Unleashed, and have lost access to the built-in rescue Linux. Unfortunately the SD card images don’t have /dev/mtd0 etc., and my attempts to build a Linux image that contains the driver have failed: despite building in support for SPI-NOR, /dev/mtd0 never gets found. I’ve got the mtd-utils at least, so I do have flashcp - just not the driver to access the flash.

Does anyone know what set of drivers and configuration (e.g. are any special kernel parameters needed?) I’d need to get /dev/mtd0 to show up?

I’m not sure it’s relevant, but I’m building the Linux images using Yocto and the meta-sifive layer.

We recently updated the master branch of meta-sifive to include support for the SPI-NOR chip on the board. Could you please try the instructions on this page?

1 Like

Wow, great timing - thanks!
I built a new image and can now access /dev/mtd0.

1 Like