tool to generate NAND image for LiveSuit usage

683 views
Skip to first unread message

jun...@linaro.org

unread,
Oct 13, 2017, 10:31:56 AM10/13/17
to linux-sunxi
Hello,

I create a rootfs for cubieboard2, but LiveSuit does not recognize it. I check cubieboard2 lubuntu image that LiveSuit can load successfully, the image start with IMAGEWTY. I wander how to generate image with the format? I tried sunxi-nand-image-builder in sunxi-tools, but it seems not the right tool. Thanks for any help!

Jun

Milos Ladni

unread,
Oct 16, 2017, 10:18:31 AM10/16/17
to linux-sunxi
Hi,

First, i have never used  LiveSuit, i use PhoenixSuit..
Packing/Unpacking image for phoenixsuit have to be done with with imgRePacker tool.
Link: https://forum.xda-developers.com/showthread.php?t=1753473

My advice is to find already ready image which work with phoenixsuite for cubieboard2 and than try to modify it with imgRepacker.
I do not recommend  to start from scratch if you do not have experience with phoenix..

--- There are my short instruction how to do this ---
Assuming that your ready image has name like this 'debian_wheezy_7.4_.img'
Unpack image:
$ imgrepacker /noiso debian_wheezy_7.4_.img
$ cd debian_wheezy_7.4_.img.dump
Make 3 new directories where you will mount boot, root and user file systems.
Maybe you will do not have separated user file system and in that case mount only bootfs and rootfs.
$ mkdir bootfs
$ mkdir rootfs
$ mkdir userfs
Convert rootfs and userfs Android sparse images to raw images:
$ simg2img rootfs.fex rootfs.ext4.img
$ simg2img userfs.fex userfs.ext4.img
Mount images:
$ sudo mount -t vfat -o loop bootloader.fex bootfs
$ sudo mount -t ext4 -o loop rootfs.ext4.img rootfs
$ sudo mount -t ext4 -o loop userfs.ext4.img userfs
Now you can access to whole filesystem and change what you want.
After you're done with the changes you have to pack back user and root filesystems again.
$ sudo make_ext4fs -s -l 2432MB rootfs.fex ./rootfs
$ sudo chown -R milos:milos userfs
$ make_ext4fs -s -l 1024MB userfs.fex ./userfs
Do not omit -s because you need sparse filesistem.
$ sudo chown milos:milos rootfs.fex
$ cd ../
$ sync
$ imgrepacker /noiso debian_wheezy_7.4_.img.dump
This is it.. Now you can try to flash your customized filesystem..

Good luck!
Milos,

jun...@linaro.org

unread,
Oct 17, 2017, 3:54:18 AM10/17/17
to linux-sunxi
Thank you for such detail instructions! Will have a try if I find a windows PC.  Ubuntu is the only OS on my laptop  : (

Jun

在 2017年10月13日星期五 UTC+8下午10:31:56,jun...@linaro.org写道:
Reply all
Reply to author
Forward
0 new messages