All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Rydow <jrydow@gmail.com>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Ubinize squashfs in ubiblock.
Date: Mon, 8 May 2017 15:25:25 +0200	[thread overview]
Message-ID: <CAHwR_AWCQtjh88V-fXKLUA2sPG-y3jKM7PwbvEszG2xjAuBhXw@mail.gmail.com> (raw)
In-Reply-To: <CAFLxGvzgy4H2kE=MJux+axZs=grZa3bE=uRM7NbZrHWTGTqwxA@mail.gmail.com>

Hi Richard,
thanks for the prompt response. You were right, there was a flaw in my
flashing. I had not detached properly from the mtd device.
running
# ubidetach -d 0
before staring flashing was the key. The attach was done on booting
for some reason even though the mtd10 was empty.

Regarding the nandwrite -p, you are right it is not needed.

Thanks again
Jonas

On Mon, May 8, 2017 at 2:26 PM, Richard Weinberger
<richard.weinberger@gmail.com> wrote:
> Jonas,
>
> On Mon, May 8, 2017 at 2:03 PM, Jonas Rydow <jrydow@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

      reply	other threads:[~2017-05-08 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 12:03 Ubinize squashfs in ubiblock Jonas Rydow
2017-05-08 12:26 ` Richard Weinberger
2017-05-08 13:25   ` Jonas Rydow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHwR_AWCQtjh88V-fXKLUA2sPG-y3jKM7PwbvEszG2xjAuBhXw@mail.gmail.com \
    --to=jrydow@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.