run-usage.adoc 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 encods 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. |`-T` | |Enable extra QEMU trace events.
  42. `./configure --enable-trace-backends=simple` seems to enable
  43. some by default, e.g. `pr_manager_run`, and I don't know how to
  44. get rid of them. But those events are rare and should not impact
  45. performance, so we just ignore them for now.
  46. |`-U` | |Pass extra parameters to the program running on the `-u` tmux split.
  47. |`-u` | |Create a tmUx split the window.
  48. You must already be inside of a `tmux` session to use this option.
  49. * on the main window, run the emulator as usual
  50. * on the split:
  51. ** if on QEMU and `-d` is given, GDB
  52. ** if on gem5, the gem5 terminal
  53. |`-V` | |Run QEMU with VNC instead of the default SDL.
  54. Connect to it with: `vinagre localhost:5900`.
  55. |`-x` | |Run in graphic mode. Mnemonic: X11.
  56. |===