All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralph Sennhauser <ralph.sennhauser@gmail.com>
To: Richard Weinberger <richard@nod.at>
Cc: Daniel Golle <daniel@makrotopia.org>,
	linux-mtd@lists.infradead.org, Zoltan HERPAI <wigyori@uid0.hu>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	lede-dev@lists.infradead.org, openwrt-devel@lists.openwrt.org,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Subject: Re: [PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter
Date: Sun, 28 Aug 2016 11:19:31 +0200	[thread overview]
Message-ID: <20160828111931.6eb3a10d@gmail.com> (raw)
In-Reply-To: <d150f68e-688f-0fff-1d4f-b768d6665ff1@nod.at>

Hi Richard,

On Sun, 28 Aug 2016 10:12:31 +0200
Richard Weinberger <richard@nod.at> wrote:

> Ralph,
> 
> On 28.08.2016 09:10, Ralph Sennhauser wrote:
> > Using CONFIG_CMDLINE or the dtb isn't an option either for dual
> > firmware devices. You'd have to provide two images, one for each
> > partition so the rootfs belonging to the kernel gets mounted.
> > Sounds like a recipe for disaster.  
> 
> With "image" you mean the uImage?

uImage - padding to 6MB - ubinized rootfs. A firmware image as is
flashed by users.

Linksys set it up so that if one firmware image is broken there is a
good chance the bootloader will attempt to boot the other.

> Well, then you need to add the cmdline to the DT.
> If your bootloader does not support DT loading and you need to append
> it to uImage, yes, you'll have to two uImage for these devices.

Two uImages / firmware images is probably more problematic than asking
the user to fix the kernel parameters passed by u-boot.

> Or a initramfs...
> 
> But IMHO it still does not justify adding these hacks to the kernel.
> 

Those hacks can be justified if there is a case an initramfs or
CONFIG_CMDLINE/dtb doesn't work. I can't think of such a case right
now.

> > On the other hand an initramfs can carry the logic to figure out
> > which to mount and is what I use for my self. The busybox based
> > implementation I use adds a tad over 300Kb to the uImage, perfectly
> > acceptable in my case.  
> 
> When your minimal initramfs consumes 300KiB you're doing something
> wrong. As I said in another thread, for your special purpose you'd
> need to create a minitmal userspace for initramfs, no fancy (eg)libc,
> just a bare minimum /init program which does the mount probing.
> Shouldn’t be more than a few system calls.
> 
> Thanks,
> //richard

Well, I use busybox because I'm lazy and still get away with only 300Kb.
And as I said there is plenty space on my device. (6M per uImage OEM
firmware configuration)

Cheers
Ralph

  reply	other threads:[~2016-08-28  9:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27 19:43 [PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter Daniel Golle
2016-08-27 20:43 ` Richard Weinberger
2016-08-27 21:06   ` Daniel Golle
2016-08-27 21:23     ` Richard Weinberger
2016-08-27 23:13       ` Daniel Golle
2016-08-27 23:33         ` Richard Weinberger
2016-08-28  6:47           ` Boris Brezillon
2016-08-28  7:10   ` Ralph Sennhauser
2016-08-28  8:12     ` Richard Weinberger
2016-08-28  9:19       ` Ralph Sennhauser [this message]
2016-08-28  9:28         ` Richard Weinberger
2016-08-28 11:44           ` Daniel Golle
2016-08-28 11:57             ` Richard Weinberger
2016-08-28 13:47               ` Daniel Golle
2016-08-28 14:17                 ` Boris Brezillon
2016-08-28 12:10             ` Ralph Sennhauser
2016-08-28 13:24             ` Boris Brezillon
2016-08-28 14:12 ` Ezequiel Garcia
2016-08-28 14:20   ` Boris Brezillon
2016-08-28 14:25     ` Ezequiel Garcia
2016-08-28 14:40       ` Daniel Golle
2016-08-28 15:00         ` Boris Brezillon
2016-08-28 15:24           ` Daniel Golle
2016-08-28 16:35             ` Boris Brezillon
2016-08-28 14:32     ` Daniel Golle
2016-08-28 14:27   ` Daniel Golle
2016-08-28 14:54     ` Ezequiel Garcia

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=20160828111931.6eb3a10d@gmail.com \
    --to=ralph.sennhauser@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hauke@hauke-m.de \
    --cc=lede-dev@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=richard@nod.at \
    --cc=wigyori@uid0.hu \
    /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.