I have a scenario where I have to write my jffs2 filesystem in nand then lock it permanently. u-boot support that functionality and off course I have to use a NAND that is capable of locking its block/s. Scenario # 1 will work correctly when it comes to locking a block/s but, it will not work when the kernel start mounting the jffs2 partition due to a crc incompatibility issue between u-boot and the kernel. Scenario #2 will work when the kernel start mounting the jffs2 partition but the locking mechanism may not work.
scenario # 1:
Initialize NAND (unlock) offset size
erase nand blocks
load jffs image and write it to nand
nand lock tight
scanario # 2:
boot on sdcard
flash_eraseall -j /dev/device_node
nandwrite -p /dev/device_node myrootfs.jffs2
fw_setenv status_flag 1
reboot
check status_flag if set to 1
if 1;
initialize NAND (unlock) offset size
no-instruction then proceed to next command (or it depends on nand chip)???
nand lock tight
Any idea if it’s possible?
Thanks,
John