This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

JFFS2 Root filesystem flash by U-Booot

Other Parts Discussed in Thread: DM3730

I have a BeagleBoard-xM using DM3730 TI Processor.

I want to write my Android file system to NAND flash by U-Boot.

Follow the link bellow, I've successful written MLO, u-boot.bin and uImage to NAND flash by U-Boot, but not with android_rootfs. I used JFFS2 rootfs.

elinux.org/BeagleBoardNAND

I know this is not recommended way but I really need it to create an auto flash SD Card.

Any body have ideas about this problems, thanks you !!!

  • Hi Hao Nguyen,

    Could you check the hardware revision of your BeagleBoard-xM because in general the BeagleBoard-xM has no NAND unlike the BeagleBoard which has 256 MB NAND Flash memory. I'm wondered how you succeed to write the MLO, u-boot.bin and uImage to NAND.
    Therefore the adding of logs and description of your steps in details should be useful for investigation of the issue.
    Are you try to write (root) file system by kernel? If true the logs also would be interesting.

    BR
    Tsvetolin Shulev
  • Hi Cvetolin Shulev-XID, thanks you for your reply !!

    I'm so sorry, there is a mistake here. It's not Beagleboard-xM. It's my custom board based on Beagboard-xM with 512MB NAND Flash.

    The solution that you support is ok but i want to write in U-Boot promt. It's my mission. I've tried so much times but it's not ok. 

    So, do you have any ideas? Is ubi.img ok or only jffs2 support?

  • Now I understand your environment. Both file systems UBIFS and JFFS2 are supported by there are some particulars with UBIFS described at:
    processors.wiki.ti.com/.../UBIFS_Support
    www.linux-mtd.infradead.org/.../ubi.html
    About flashing the images via u-boot prompt the full logs should be helpful for investigation of the issue.

    BR
    Tsvetolin Shulev
  • Hi Cvetolin Shulev-XID,
    I've read two links that you gave.
    I used two commands bellow to make a ubi.img

    sudo mkfs.ubifs/mkfs.ubifs -r /android_rootfs -m 2048 -e 126976 -c 3991 -o ubifs.img
    sudo ubi-utils/ubinize -o ubi.img -O 2048 -m 2048 -p 128KiB -s 512 ubinize.cfg

    my ubinize.cfg
    "
    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=450MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize
    "
    After copy ubi.img into a microSD card, in u-boot promt, type the command:

    mw.b 0x82000000 0xFF
    mmc init
    fatload mmc 0:1 80000000 ubi.img

    It hangs here and no log appear.

    I thinks my u-boot doesn't support reading ubi.img but i don't know how to enable it. So that, any ideas for my problem?