boot.toml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. [metadata]
  2. # Optional values: "grub-legacy", "grub-efi", "direct", "dragon-stub"
  3. # Note: "dragon-stub" can only be used with the riscv64 architecture
  4. boot-protocol = "grub-legacy"
  5. # Optional values: "graphic", "graphic-vnc", "no-graphic"
  6. boot-mode = "graphic"
  7. # Optional values: "qemu"
  8. hypervisor = "qemu"
  9. # Kernel command line arguments
  10. kcmd-args = [
  11. "console=ttyS0",
  12. "root=/dev/vda"
  13. ]
  14. # Arguments passed to the init process
  15. init-args = []
  16. # (Optional) Grub2 configuration
  17. [grub]
  18. # Time in seconds before the default entry is booted
  19. timeout = 10
  20. # (Optional) Grub2 i386-legacy configuration
  21. [grub.i386-legacy]
  22. grub-file = "/opt/dragonos-grub/arch/i386/legacy/grub/bin/grub-file"
  23. grub-install = "/opt/dragonos-grub/arch/i386/legacy/grub/sbin/grub-install"
  24. # (Optional) Grub2 i386-efi configuration
  25. [grub.i386-efi]
  26. grub-file = "/opt/dragonos-grub/arch/i386/efi/grub/bin/grub-file"
  27. grub-install = "/opt/dragonos-grub/arch/i386/efi/grub/sbin/grub-install"
  28. # (Optional) Grub2 x86_64-efi configuration
  29. [grub.x86_64-efi]
  30. grub-file = "/opt/dragonos-grub/arch/x86_64/efi/grub/bin/grub-file"
  31. grub-install = "/opt/dragonos-grub/arch/x86_64/efi/grub/sbin/grub-install"
  32. # (Optional) DragonStub Bootloader configuration (Only for riscv64)
  33. [dragonstub]
  34. # The path to the source code of the DragonStub project.
  35. src-path = "kernel/submodules/DragonStub"
  36. [uboot]
  37. # URL to download U-Boot binary file
  38. #
  39. # If the URL is `https://mirrors.dragonos.org.cn/pub/third_party/u-boot`,
  40. # then the final download URL will be `https://mirrors.dragonos.org.cn/pub/third_party/u-boot/u-boot-{version}-{arch}.tar.xz`
  41. download-url = "https://mirrors.dragonos.org.cn/pub/third_party/u-boot"
  42. # U-Boot version
  43. version = "v2023.10"
  44. # Prefix directory for U-Boot binary file
  45. #
  46. # Example:
  47. # If the current architecture is `riscv64` and the version is `v2023.10`,
  48. # `path_prefix` is `bin/uboot/`,
  49. # then the path to locate the U-Boot binary file would be: `bin/uboot/riscv64/v2023.10/uboot.bin`
  50. path-prefix = "bin/uboot"
  51. [qemu]
  52. # (Optional) Path prefix for qemu binary.
  53. #
  54. # If not set, the default path will be used.
  55. #
  56. # Example:
  57. # Fill in `/usr/bin/qemu-system-`,
  58. # then for the `x86_64` architecture, `/usr/bin/qemu-system-x86_64` will be used.
  59. path-prefix = "qemu-system-"
  60. # Arguments to pass to qemu.
  61. args = """\
  62. -machine virt \
  63. """
  64. # Parameters to apply when no-graphic is enabled
  65. no-graphic-args = ""
  66. # (Optional) Hardware acceleration
  67. # 可选值:"kvm", "tcg", "hvf", "none". 不填写时,默认为none
  68. accelerate = "kvm"