MTD flash partition names not passed to the kernel
I have created the flash partition map using the PetaLinux system configuration menu, however when the kernel boots the '/proc/mtd' file is empty, and there are no MTD partitions defined.
Problem Description
There is a bug in PetaLinux SDK v1.1 tool 'petalinux-update-dts', which updates the DTS (Device Tree) file to match the kernel and system configuration. petalinux-update-dts is called automatically during the system build process.
In particular, the name of the flash memory interface peripheral is hard-coded as 'FLASH'. If your MicroBlaze system's flash memory controller does not have this name, the MTD partition map in the DTS will not be updated.
This bug also impacts the use of the JFFS2 Root Filesystem option, which requires an MTD partition called 'jffs2' to exist.
Workaround
To work around this problem, please do one of the following:
Change the flash peripheral instance in the hardware project
Modify your EDK hardware project so that the XPS_EMC peripheral instance is called 'FLASH'.
Be sure to update your MSS file as well, regenerate the EDK software configuration files, and re-run petalinux-copy-autoconfig
Finally, rebuild your system image by running 'make' from the petalinux-dist directory.
Adjust the DTS file manually
Edit the file
- software/petalinux-dist/linux-2.6.x/arch/microblaze/boot/dts/<vendor>-<platform>.dts
Substitute the appropriate <vendor> and <platform> names respectively.
Find the entry corresponding to your flash memory controller peripheral. It will look something like this, although the name and/or address will be different, depending upon your hardware configuration:
my-flash: flash@0x85000000 {...
rename it from 'my-flash' to FLASH (upper case required)
You may also wish to run
$ petalinux-platform-config --update
to update the default platform configuration as well.
Finally, rebuild your system image by running 'make' from the petalinux-dist directory.
Resolution
This issue will be fixed in PetaLinux version 1.2
Customer stories

