So far I have used squashfs as rootfs in the internal 8MB SPI flash. I want to be able to write to my rootfs, so I want to switch to jffs2 or ubifs. We'll not be using extra NAND or NOR storage, it should all go into the little SPI flash.
I store the kernel at 0x80000 and the rootfs starts at 0x2a0000. I write it into the flash using TFTP to fetch it, then use
sf probe 0 ; sf erase 0x2a0000 0x550000 ; sf write 0xc0700000 0x2a0000 0x420000
to dump the downloaded rootfs into the SPI flash (the rootfs downloaded size is 0x420000 bytes)
To create the filesystem (the same I used for squashfs, which mounts and boots fine) I invoke mkfs.jffs2 as follows:
mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 --pad --little-endian --eraseblock=0x10000
bootargs in u-boot environ:
bootargs=console=ttyS2,115200n8 mem=32M@0xc0000000 mem=64M@0xc4000000 root=/dev/mtdblock4 ip=off rootfstype=squashfs,jffs2
Partition table according to the kernel:
0x000000000000-0x000000010000 : "UBL"
0x000000010000-0x000000070000 : "U-Boot"
0x000000070000-0x000000080000 : "U-Boot-Env"
0x000000080000-0x0000002a0000 : "Kernel"
0x0000002a0000-0x0000007f0000 : "Filesystem"
0x0000007f0000-0x000000800000 : "MAC-Address"
At the end, the kernel writes a last line and stops. Nothing else output after:
omap_rtc omap_rtc: setting system clock to 2012-03-28 14:50:55 UTC (1332946255)
If I store a squashfs image at 0x2a0000, everithing's fine. It does not matter if I remove squashfs from the rootfstype in the bootargs. Also with or without rootwait does not make a difference. The kernel has jffs2 compiled-in.
What am I doing wrong?