Eg. Create a 16Mb jffs2 filesystem from a directory:
/home/guy/Development/git_clones/buildroot/output/host/usr/sbin/mkfs.jffs2 -e 0×20000 –pad=0xFFFFFF -l -s 0×800 -n -d /tmp/output -o /home/guy/Development/git_clones/buildroot/output/images/rootfs.jffs2
In this example I pad the file to be 16Mb in size. Putting this 16Mb image onto a flash chip at 0xcc000000 and performing any jffs2 queries against it (e.g. jffs2 -b 0xcc000000 ls) will cause the system to crash as the uMon code does not see the end of the filesystem and keeps going past until it touches something it shouldn’t. This is because the file is padded with 1’s.
To get around this I need to insert a few bytes of 0’s at the end of my padded image so that uMon knows it is at the end of the filesystem.