[PATCH/RFC 0/3] UBI: unify mouting rootfs based on cmdline parameter

Richard Weinberger richard at nod.at
Sun Aug 28 01:12:31 PDT 2016


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?
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.
Or a initramfs...

But IMHO it still does not justify adding these hacks to the kernel.

> 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



More information about the linux-mtd mailing list