run-usage.adoc 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. = run usage
  2. ....
  3. ./run [OPTIONS] [-- EXTRA_RUN_ARGS]
  4. ....
  5. [options="header"]
  6. |===
  7. |Name |Argument name |Description
  8. |`-a` |`ARCH` |Run architecture `ARCH`.
  9. |`-c` |`NCPUS` |Emulate `NCPUS` guest CPUs.
  10. |`-D` | |Run GDB on the emulator itself.
  11. |`-d` | |Wait for GDB to connect before starting execution.
  12. |`-E` |`CMDSTR` |Replace the normal init with a minimal init that just evals
  13. with given `CMDSTR` bash command string. Example:
  14. `-E 'insmod /hello.ko;'`
  15. |`-e` |`CLI_OPTIONS` |Pass an extra Linux kernel command line options,
  16. and place them before the dash separator `-`.
  17. Only options that come before the `-`, i.e. "standard"
  18. options, should be passed with this option.
  19. Example: `./run -a arm -e 'init=/poweroff.out'`
  20. |`-F` |`CMDSTR` |Much like `-f`, but base64 encodes the string.
  21. Mnemonic: `-F` is to `-f` what `-E` is to `-e`.
  22. |`-f` |`CLI_OPTIONS` |Pass an extra Linux kernel command line options,
  23. add a dash `-` separator, and place the options after the dash.
  24. Intended for custom options understood by our `init` scripts,
  25. most of which are prefixed by `lkmc_`, e.g.:
  26. `./run -f 'lkmc_eval="wget google.com" lkmc_lala=y'`
  27. Mnenomic: comes after `-e`.
  28. |`-G` | |Pass extra options to the gem5 executable.
  29. Do not confuse with the arguments passed to config scripts,
  30. like `fs.py`. Example: `./run -G '--debug-flags=Exec --debug' -g`
  31. |`-g` | |Use gem5 instead of QEMU.
  32. |`-h` | |Show this help message.
  33. |`-I` | |Run with initramfs.
  34. |`-i` | |Run with initrd.
  35. |`-K` | |Use KVM. Only works if guest arch == host arch.
  36. |`-k` | |Enable KGDB.
  37. |`-m` | |Set the memory size of the guest. E.g.: `-m 512M`. Default: `256M`.
  38. The default is the minimum amount that boots all archs without extra
  39. options added. Anything lower will lead some arch to fail to boot.
  40. Any
  41. |`-P` | |Run the downloaded prebuilt images.
  42. |`-T` |`TRACE_TYPES` |Set trace events to be enabled.
  43. If not given, gem5 tracing is completely disabled, while QEMU tracing
  44. is enabled but uses default traces that are very rare and don't affect
  45. performance. `./configure --enable-trace-backends=simple` seems to enable
  46. some traces by default, e.g. `pr_manager_run`, and I don't know how to
  47. get rid of them.
  48. |`-U` | |Pass extra parameters to the program running on the `-u` tmux split.
  49. |`-u` | |Create a tmUx split the window.
  50. You must already be inside of a `tmux` session to use this option.
  51. * on the main window, run the emulator as usual
  52. * on the split:
  53. ** if on QEMU and `-d` is given, GDB
  54. ** if on gem5, the gem5 terminal
  55. |`-V` | |Run QEMU with VNC instead of the default SDL.
  56. Connect to it with: `vinagre localhost:5900`.
  57. |`-x` | |Run in graphic mode. Mnemonic: X11.
  58. |===