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