add some documentation about command-line parameters and other configuration#32
add some documentation about command-line parameters and other configuration#32michaelolbrich wants to merge 1 commit intopengutronix:mainfrom
Conversation
…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. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
Perhaps give a working example cmdline?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| dm-verity hash tree. The following parameters are read from | |
| dm-verity hash tree. | |
| The following parameters are read from |
This assumes that #29 and #30 are merged.