mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
run: port argparse
This commit is contained in:
73
README.adoc
73
README.adoc
@@ -9577,79 +9577,6 @@ Otherwise, it becomes very difficult to keep everything working across path refa
|
||||
|`-q` |QEMU |
|
||||
|===
|
||||
|
||||
==== run
|
||||
|
||||
....
|
||||
./run [OPTIONS] [-- EXTRA_RUN_ARGS]
|
||||
....
|
||||
|
||||
`EXTRA_RUN_ARGS` gets appended to the end of the emulator command line.
|
||||
|
||||
[options="header"]
|
||||
|===
|
||||
|Name |Argument name |Description
|
||||
|`-c` |`NCPUS` |Emulate `NCPUS` guest CPUs.
|
||||
|`-D` | |Run GDB on the emulator itself.
|
||||
|`-d` | |Wait for GDB to connect before starting execution.
|
||||
|`-E` |`CMDSTR` |Replace the normal init with a minimal init that just evals
|
||||
with given `CMDSTR` bash command string. Example:
|
||||
`-E 'insmod /hello.ko;'`
|
||||
|`-e` |`CLI_OPTIONS` |Pass an extra Linux kernel command line options,
|
||||
and place them before the dash separator `-`.
|
||||
Only options that come before the `-`, i.e. "standard"
|
||||
options, should be passed with this option.
|
||||
Example: `./run -a arm -e 'init=/poweroff.out'`
|
||||
|`-F` |`CMDSTR` |Much like `-f`, but base64 encodes the string.
|
||||
Mnemonic: `-F` is to `-f` what `-E` is to `-e`.
|
||||
|`-f` |`CLI_OPTIONS` |Pass an extra Linux kernel command line options,
|
||||
add a dash `-` separator, and place the options after the dash.
|
||||
Intended for custom options understood by our `init` scripts,
|
||||
most of which are prefixed by `lkmc_`, e.g.:
|
||||
`./run -f 'lkmc_eval="wget google.com" lkmc_lala=y'`
|
||||
Mnenomic: comes after `-e`.
|
||||
|`-G` | |Pass extra options to the gem5 executable.
|
||||
Do not confuse with the arguments passed to config scripts,
|
||||
like `fs.py`. Example: `./run -G '--debug-flags=Exec --debug' -g`
|
||||
|`-h` | |Show this help message.
|
||||
|`-I` | |Run with initramfs.
|
||||
|`-i` | |Run with initrd.
|
||||
|`-K` | |Use KVM. Only works if guest arch == host arch.
|
||||
|`-k` | |Enable KGDB.
|
||||
|`-L` |`VARIANT` |Linux kernel build variant.
|
||||
|`-l` |`CHECKPOINT` |Restore the nth most recently taken gem5 checkpoint according to
|
||||
directory timestamps.
|
||||
|`-M` |`VARIANT` |gem5 build output variant.
|
||||
|`-m` | |Set the memory size of the guest. E.g.: `-m 512M`. Default: `256M`.
|
||||
The default is the minimum amount that boots all archs without extra
|
||||
options added. Anything lower will lead some arch to fail to boot.
|
||||
Any
|
||||
|`-R` | |Replay a QEMU run record deterministically.
|
||||
|`-r` | |Record a QEMU run record for later replay with `-R`.
|
||||
|`-P` | |Run the downloaded prebuilt images.
|
||||
|`-Q` |`VARIANT`` |QEMU build variant.
|
||||
|`-T` |`TRACE_TYPES` |Set trace events to be enabled.
|
||||
If not given, gem5 tracing is completely disabled, while QEMU tracing
|
||||
is enabled but uses default traces that are very rare and don't affect
|
||||
performance. `./configure --enable-trace-backends=simple` seems to enable
|
||||
some traces by default, e.g. `pr_manager_run`, and I don't know how to
|
||||
get rid of them.
|
||||
|`-U` | |Pass extra parameters to the program running on the `-u` tmux split.
|
||||
|`-u` | |Create a tmUx split the window.
|
||||
You must already be inside of a `tmux` session to use this option.
|
||||
* on the main window, run the emulator as usual
|
||||
* on the split:
|
||||
** if on QEMU and `-d` is given, GDB
|
||||
** if on gem5, the gem5 terminal
|
||||
|`-V` | |Run QEMU with VNC instead of the default SDL.
|
||||
Connect to it with: `vinagre localhost:5900`.
|
||||
|`-X` |`EXTRA_OPTS` |Extra options that did not fit into `A-z`!
|
||||
This string is parsed by `getopt` on a separate parse step with different
|
||||
meanings for each flag.
|
||||
|`-X-b` | |Use `fs_bigLITTLE.py` instead of `fs.py` on gem5 simulation.
|
||||
Ignored by QEMU.
|
||||
|`-x` | |Run in graphic mode. Mnemonic: X11.
|
||||
|===
|
||||
|
||||
==== runtc
|
||||
|
||||
The link:runtc[] helper script runs a Tool Chain executable built by Buildroot.
|
||||
|
||||
Reference in New Issue
Block a user