Re: [PATCH] bootchooser: Change name of kernel parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ahmad,

> Existing userspace like RAUC[1] rely on this naming, so the default may
> not be changed.
> 
> [1]: https://github.com/rauc/rauc/blob/f52978d9736f18794f7e277ca440e2e4e78c9703/src/context.c#L47
that is what I already suspected...

For my initramfs (klibc based), I need a very cheap solution for mounting the "right" root fs. Currently
I work only with standard utilities (sh, mount, cat, ...) and I avoid creating a own program for this.
I had just success with the following expression

read CMDLINE < /proc/cmdline
if [ "${CMDLINE#bootchooser.active=system1}" != "${CMDLINE}" ]; then
	root=ubi0:rootfs1
else
	root=ubi0:rootfs0
fi
mount -t ubifs $root /root

If the string "bootchooser.active=system1" appears on the command line, the expression will match.
This way I can distinguish between "system1" and "system0".

As the result, my previous patch should be dropped.

regards
Christian





_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux