Ubinize squashfs in ubiblock.

Richard Weinberger richard.weinberger at gmail.com
Mon May 8 05:26:28 PDT 2017


Jonas,

On Mon, May 8, 2017 at 2:03 PM, Jonas Rydow <jrydow at gmail.com> wrote:
> I then tried to make a ubi image of the above with the following ini file:
> *****************************************
> [rootfs-volume]
> mode=ubi
> image=rootfs.sqfs
> vol_id=0
> vol_size=80MiB
> vol_type=dynamic
> vol_name=rootfs
>
> [rootfs-backup-volume]
> mode=ubi
> image=rootfs.sqfs
> vol_id=1
> vol_size=80MiB
> vol_type=dynamic
> vol_name=rootfs-backup
> *****************************************

ubinize does not care what volume data you flash. So, it should just work.
BTW: You can also use static volumes for read-only data.

> This is then ubinized with the following command:
>
> # ubinize -o rootfs.ubi -m 2048 -p 128KiB -s 512 -O 2048 ubinize.ini
>
> I previously used ubifs instead of squashfs and that worked correctly,
> which means that should have working parameters for the flash layout
> for in the ubinize command.
>
> I flash this to target:
> # flash_erase /dev/mtd10 0 0
> # nandwrite -p /dev/mtd10 rootfs.ubi

Why -p?

> When I try to attach:
> # ubiattach -p /dev/mtd10 -O 2048
> I get the following from the kernel:
> *****************************************
> [  241.198465] ubi0: default fastmap pool size: 95
> [  241.203056] ubi0: default fastmap WL pool size: 47
> [  241.208834] ubi0: attaching mtd10
> [  241.213988] omap2-nand 8000000.nand: uncorrectable bit-flips found
> [  241.220805] ubi0 warning: ubi_io_read: error -74 (ECC error) while
> reading 64 bytes from PEB 0:0, read only 64 bytes, retry

This error is long before squashfs and mounting. UBI is unable to read the
very first page. Can it be that the process of writing the image is broken?
Please double check.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list