mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
Otherwise, checking out branches is too insane, as it does not update the worktrees, even though the gem5/gem5 module was updated. gem5: expose build types, document debug builds. simultaneous runs: store stdout and stderr on a file to allow running all from a single terminal on the background cleanly.
70 lines
4.0 KiB
Plaintext
70 lines
4.0 KiB
Plaintext
= run usage
|
|
|
|
....
|
|
./run [OPTIONS] [-- EXTRA_RUN_ARGS]
|
|
....
|
|
|
|
[options="header"]
|
|
|===
|
|
|Name |Argument name |Description
|
|
|`-a` |`ARCH` |Run architecture `ARCH`.
|
|
|`-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`
|
|
|`-g` | |Use gem5 instead of QEMU.
|
|
|`-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.
|
|
|`-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
|
|
|`-N` |`VARIANT` |gem5 source input variant.
|
|
|`-n` | |Run ID.
|
|
|`-P` | |Run the downloaded prebuilt images.
|
|
|`-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.
|
|
|===
|