From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d7hkY-00086V-4p for linux-mtd@lists.infradead.org; Mon, 08 May 2017 12:26:51 +0000 Received: by mail-oi0-x231.google.com with SMTP id h4so47988133oib.3 for ; Mon, 08 May 2017 05:26:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Richard Weinberger Date: Mon, 8 May 2017 14:26:28 +0200 Message-ID: Subject: Re: Ubinize squashfs in ubiblock. To: Jonas Rydow Cc: "linux-mtd@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Jonas, On Mon, May 8, 2017 at 2:03 PM, Jonas Rydow 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