Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62
My Linux root filesystem is stored on NOR flash, formatted as UBIFS. I need to access this via U-Boot.
I configured U-Boot to enable the appropriate commands. I also configured CONFIG_MTDIDS_DEFAULT="nor0:spi0.0", and set CONFIG_MTDPARTS_DEFAULT to "mtdparts=spi0.0:<flash layout>".
I rebuilt U-Boot, and flashed my device (the SK-AM62 evaluation kit, configured to boot from OSPI). I entered the following commands:
=> sf probe
SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
=> mtd list
List of MTD devices:
* nor0
- type: NOR flash
- block size: 0x40000 bytes
- min I/O: 0x1 bytes
- 0x000000000000-0x000004000000 : "nor0"
- 0x000000000000-0x000000080000 : "tiboot3"
- 0x000000080000-0x000000280000 : "tispl"
- <...>
- 0x000000800000-0x000002800000 : "rootfs"
- <...>
=> ubi part rootfs
ubi0: attaching mtd7
ubi0: scanning is finished
ubi0: attached mtd7 (name "rootfs", size 32 MiB)
...
However, the ubifsmount command failed:
=> ubifsmount ubi0:rootfs
UBIFS error (ubi0:0 pid 0): validate_sb: min. I/O unit mismatch; 16 in superblock, 8 real
UBIFS error (ubi0:0 pid 0): validate_sb: bad superblock, error 1
...
Error reading superblock on volume 'ubi0:rootfs' errno=-22!
When I created the filesystem image, I passed "-m 16" to both mkfs.ubifs and ubinize. (I don't recall how I came to use this value. However, it could be that this is based on the fact that the device uses an ECC on 16-byte data units.)
I rebuilt the root filesystem using "-m 8" for both mkfs.ubifs and ubinize. However, this led to a (worse) problem: Now Linux gets a fatal error when trying to mount the filesystem:
UBIFS error (ubi0:0 pid 1): ubifs_read_superblock: min. I/O unit mismatch; 8 in superblock, 16 real
I've looked at the various U-Boot configuration options, as well as the various options for mkfs.ubifs and ubinize, but haven't found anything that seems relevant.
How do I resolve this problem?