Skip to content

add some documentation about command-line parameters and other configuration#32

Open
michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
michaelolbrich:docs
Open

add some documentation about command-line parameters and other configuration#32
michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
michaelolbrich:docs

Conversation

@michaelolbrich
Copy link
Member

This assumes that #29 and #30 are merged.

…uration

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Kernel Command-Line Parameters
------------------------------

In general, rsinit uses the same parameters that the kernel uses.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In general, rsinit uses the same parameters that the kernel uses.
In general, rsinit uses the same parameters that the kernel would use when booting without an initramfs .


With `rootfstype=9p` and `trans=usbg` in `rootflags=`, rsinit does all the
necessary things to boot from a 9pfs over USB. In this case, `root=` must
be used to specify the USB gadget device.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps give a working example cmdline?

Copy link
Member

@mgrzeschik mgrzeschik Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

root=9pfs rootfstype=9p rootflags="trans=usbg,cache=loose,uname=root,access=0,dfltuid=0,dftlgid=0,aname=/path/to/exported/rootfs/with/diod/eg/"

The rootflags example and parameters are copied from here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/9p.rst#n65

However. The root=9pfs flag is special with rsinit. This is not pointing to the udc that is currently used, instead it is just creating an gadget function with the name set to root= . You ill find this in this code: https://github.com/pengutronix/rsinit/blob/main/src/usbg_9pfs.rs#L53
The udc that is to be used is just copied from /sys/class/udc as you can see here:

https://github.com/pengutronix/rsinit/blob/main/src/usbg_9pfs.rs#L22

When there are more udcs, this will just not work.

If the file `/verity-params` exists in the initramfs then rsinit assumes
that a dm-verity protected rootfs should be mounted.
In this case, `rsinit.verity_root=` must be used to specific the root
device. This is used instead of `root=` because it makes it harder to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
device. This is used instead of `root=` because it makes it harder to
device.
This is used instead of `root=` because it makes it harder to

missing due to some kind of misconfiguration.

rsinit assumes that the specified root device contains the rootfs and the
dm-verity hash tree. The following parameters are read from
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dm-verity hash tree. The following parameters are read from
dm-verity hash tree.
The following parameters are read from

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants