• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: A wish to flash openWrt to nand  (Read 2270 times)
lyzby
Newbie
*

Karma: 0
Posts: 48


View Profile
« on: July 29, 2010, 11:22:14 AM »

I posted a question about how to get openWrt installed to flash under the "Linux distribution" here -- http://plugcomputer.org/plugforum/index.php?topic=2060.0 -- but it may turn out to be really a u-Boot question, so I'm continuing here.

I think I made a bit of progress by setting the files openwrt-kirkwood-uImage and openwrt-kirkwood-rootfs.tar.gz to run with the ESIA/EPIA installer.  This appears to have installed ok as far as the uImage goes (iminfo reports a good image), and my other problem with a bad block at 0x2a0000 is avoided because this uImage is less than one meg. 

But it appears that ESIA/EPIA makes a ubifs with the rootfs file, and openWrt doesn't support ubifs.  Is there a way to flash a rootfs as a jffs2 nand image?  openWrt would understand that.

I'm open to any other suggestions about how to get openWrt installed to nand (tho I'd prefer a u-Boot command solution, so I would understand what is happening).
Logged

blueqoo0321
Newbie
*

Karma: 0
Posts: 4



View Profile
« Reply #1 on: July 29, 2010, 10:44:43 PM »

Hi lyzby

Try not rely on EISA or EPIA, these tools makes you learn nothing.

About JFFS2 image:
Just mkfs.jffs2 your openwrt Rootfs. (assume the output name RFS.jffs2)

at U-Boot prompt
>> tftp 2000000 RFS.jffs2
>> nand erase 500000 $(size of this rootfs)
>> nand write.jffs2 2000000 500000 $(size of this rootfs)

Your RootFS is writen to NAND address from 0x500000~(0x500000+rootfs size).
Remember to fix U-Boot env:
1. reallocate your MTD partition. (mtdpart: ......)
2. change bootargs (rootfstype= .....)
then, boot your plug.


About UBIFS, I think ... google may help a lot.
points: (in linux console)
flash_eraseall-->ubiattach --> ubimkvol --> mount --> cp your RootFS to UBI device
If you tried UBIFS and met problems, we can discuss about it.


Regards
Logged

Pages: [1]
Print
Jump to: