Today, i try to replace OSELAS JFFS2 filesystem with android OS. seems to be too much thing to do. As known, JFFS2 does not support memory mapping. the problem with previous post is android runtime is not able to write data to flash. Caused, when i try to export environment vars, commands seems to be executed, but there’s no change, unless export is done before mounting android.
So, i try to take a tricky method, export env vars before android booting. but there’s no change with my first attempt to boot android up.the strace runtime results the same. Android shared library is not loaded correctly.
The other problem is building file system. i contacted phytec regarding to this issue, as they provide ptxdist, and it needs localedef ver 2.2.x and mine 2.3.5. so that i can’t install it. I just didn’t receive any response from them. So, i decide to dig into ptxdist script to build filesystem, my own. I found in ptxdist.x.x.x/scripts/make_image_root.sh:
echo `awk -F: “$DOPERMISSIONS” $PERMISSIONS && echo “mkfs.jffs2 -d $WORKDIR –eraseblock=$ERASEBLOCKSIZE $JFFS2EXTRA -o $OUTFILE” ` | fakeroot –
there are parameters, extra params while mkfs.jffs2 executed. $ERASEBLOCKSIZE, $JFFS2EXTRA. and the parameters are fully depend on board specific architecture, not that dramatic
, NAND flash, i mean. the erase block size i can get from u-boot> flinfo
this will show block device addresses, and from this we can determine erase block size. BUT, i also need to know $JFFS2EXTRA, such –pad, –devtable. There’s too much messy. While i replace the rootfs for the first time, i just got much lines in u-boot after kernel booting up.
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160024: 0xf5e7 i stead CLEANMARKER node found at 0x00163000, not first node in block (0x00160000)
CLEANMARKER node found at 0x00168000, not first node in block (0x00160000) Empty flash at 0x0016cffc ends at 0x0016d000 CLEANMARKER node found at 0x0016d000, not first node in block (0x00160000) Empty flash at 0x00171ffc ends at 0x00172000 Empty flash at 0x00176ffc ends at 0x00177000 CLEANMARKER node found at 0x00177000, not first node in block (0x00160000) Empty flash at 0x0017bf6c ends at 0x0017c000 CLEANMARKER node found at 0x0017c000, not first node in block (0x00160000) VFS: Mounted root (jffs2 filesystem). Freeing init memory: 116K Warning: unable to open an initial console. Kernel panic - not syncing: No init found. Try passing init= option to kernel.
This caused by error eraseblock size (-e) in mkfs.jffs2. and also JFFS2EXTRA something. I just didn’t get it until this evening, but if you get the same problem, you can see this page. very good documentation.