linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: JH <jupiter.hce@gmail.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: Where to define multiple volumes sizes in one MTD rootfs partition?
Date: Tue, 29 Oct 2019 17:00:24 +1100	[thread overview]
Message-ID: <CAA=hcWSovagee+Kecuby5hhtRwhBThBQpn1wVBbwosuXfK1MHQ@mail.gmail.com> (raw)
In-Reply-To: <CAFLxGvxC3wHY2Jciv0OOJCdtObSq-1vqJyAMJ=X=_j3cJr49LA@mail.gmail.com>

Hi Richard,

On 10/16/19, Richard Weinberger <richard.weinberger@gmail.com> wrote:
> On Mon, Oct 14, 2019 at 6:57 AM JH <jupiter.hce@gmail.com> wrote:
>>
>> Hi,
>>
>> Sorry, if it is not right the mailing list to ask helps for multiple
>> volumes in a single ubi0 instance, any advice please?
>
> I'm a little lost in your questions.
>
> If you have more than one volume on UBI, you get an /dev/ubiX_Y for each
> volume. Where X is the UBI number, usually 0 and Y the volume number.
> You can have an UBIFS on both volumes.

Sorry for not being clear about the question, I double checked the
document, it is better not to set kernel in MTD partition, but to UBI
volume partition, let me rephrase it.

Let's say I have following MTD partitions:

MFG_NAND_PARTITION
"mtdparts=gpmi-nand:4m(boot),2m(ubootenv),2m(dtb),-(ubi)"

So the volume partitions will be in mtd3 and ubi0.

/dev/ubi0_0 kernel
/dev/ubi0_1 rootfs
/dev/ubi0_2 data

It seems to me there are two ways to create UBI volumes, one is to
directly use MTD tools (correct me if it is wrong):

ubimkvol /dev/ubi0_0 -s 10MiB -N kernel_data
ubimkvol /dev/ubi0_1 -s 130MiB -N rootfs_data
ubimkvol /dev/ubi0_2 -s 10MiB -N storage_data

Another way as many document also suggested to use volume configure
file and ubinize to create and to read volume configure file, which I
don't know how to do it. Appreciate if anyone used kernel in UBI
volume partition and show the tips of how to use ubinize to create and
to read the volume configure file.

If the kernel is in one MTD partition and a single volume in rootfs of
another MTD partition, I can define following boot command to boot the
rootfs from the NAND.

bootargs "root=ubi0:rootfs_data rw ubi.mtd=5,2048 noinitrd
rootfstype=ubifs mem=256M rootwait=1"

For multiple UBIFS volume partitions in ubi0, especially when one ubi
volume is for kernel, how can I boot the kernel volume partition
first, then to rootfs volume partition? I am sure the following setup
boot args is wrong,could anyone correct it please?

bootargs "kernel=ubi0:kernel_data root=ubi0:rootfs_data rw
ubi.mtd=5,2048 noinitrd rootfstype=ubifs mem=256M rootwait=1"

Thank you.

Kind regards,

- jh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2019-10-29  6:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05  0:50 Where to define multiple volumes sizes in one MTD rootfs partition? JH
2019-10-05  8:43 ` Richard Weinberger
2019-10-11  9:38   ` JH
2019-10-14  4:57     ` JH
2019-10-15 19:17       ` Richard Weinberger
2019-10-29  6:00         ` JH [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='CAA=hcWSovagee+Kecuby5hhtRwhBThBQpn1wVBbwosuXfK1MHQ@mail.gmail.com' \
    --to=jupiter.hce@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).