run-usage.adoc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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` |`CLI_OPTIONS` |Pass an extra Linux kernel command line options,
  21. add a dash `-` separator, and place the options after the dash.
  22. Intended for custom options understood by our `init` scripts,
  23. most of which are prefixed by `lkmc_`, e.g.:
  24. `./run -f 'lkmc_eval="wget google.com" lkmc_lala=y'`
  25. Mnenomic: comes after `-e`.
  26. |`-G` | |Pass extra options to the gem5 executable.
  27. Do not confuse with the arguments passed to config scripts,
  28. like `fs.py`. Example: `./run -G '--debug-flags=Exec --debug' -g`
  29. |`-g` | |Use gem5 instead of QEMU.
  30. |`-h` | |Show this help message.
  31. |`-I` | |Run with initramfs.
  32. |`-i` | |Run with initrd.
  33. |`-K` | |Use KVM. Only works if guest arch == host arch.
  34. |`-k` | |Enable KGDB.
  35. |`-m` | |Set the memory size of the guest. E.g.: `-m 512M`. Default: `256M`.
  36. The default is the minimum amount that boots all archs without extra
  37. options added. Anything lower will lead some arch to fail to boot.
  38. Any
  39. |`-T` | |Enable extra QEMU trace events.
  40. `./configure --enable-trace-backends=simple` seems to enable
  41. some by default, e.g. `pr_manager_run`, and I don't know how to
  42. get rid of them. But those events are rare and should not impact
  43. performance, so we just ignore them for now.
  44. |`-U` | |Pass extra parameters to the program running on the `-u` tmux split.
  45. |`-u` | |Create a tmUx split the window.
  46. You must already be inside of a `tmux` session to use this option.
  47. * on the main window, run the emulator as usual
  48. * on the split:
  49. ** if on QEMU and `-d` is given, GDB
  50. ** if on gem5, the gem5 terminal
  51. |`-V` | |Run QEMU with VNC instead of the default SDL.
  52. Connect to it with: `vinagre localhost:5900`.
  53. |`-x` | |Run in graphic mode. Mnemonic: X11.
  54. |===