[PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter
Ralph Sennhauser
ralph.sennhauser at gmail.com
Sun Aug 28 02:19:31 PDT 2016
Hi Richard,
On Sun, 28 Aug 2016 10:12:31 +0200
Richard Weinberger <richard at 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
More information about the linux-mtd
mailing list