This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.vm-boot: add -nographic flag, start with graphics by default

+51 -21
+51 -21
tools/vm-boot/vm-boot.sh
··· 7 7 MEMORY="2048" 8 8 CPUS="2" 9 9 ARCH="" 10 + NOGRAPHIC=false 10 11 11 12 usage() { 12 13 cat <<EOF ··· 18 19 -m, --memory SIZE Memory in MB (default: 2048) 19 20 -c, --cpus COUNT Number of CPU cores (default: 2) 20 21 -a, --arch ARCH Force architecture (x86_64 or aarch64) 22 + -n, --nographic Run in text mode without graphics 21 23 -h, --help Show this help message 22 24 23 25 EXAMPLE: ··· 41 43 -a|--arch) 42 44 ARCH="$2" 43 45 shift 2 46 + ;; 47 + -n|--nographic) 48 + NOGRAPHIC=true 49 + shift 44 50 ;; 45 51 -h|--help) 46 52 usage ··· 115 121 exit 1 116 122 fi 117 123 echo "Using UEFI firmware: $UEFI_FW" 118 - exec qemu-system-x86_64 \ 119 - -machine q35 \ 120 - -cpu qemu64 \ 121 - -m "$MEMORY" \ 122 - -smp "$CPUS" \ 123 - -accel tcg \ 124 - -bios "$UEFI_FW" \ 125 - -cdrom "$ISO_FILE" \ 126 - -boot d \ 127 - -nographic \ 128 - -serial mon:stdio 124 + if [ "$NOGRAPHIC" = true ]; then 125 + exec qemu-system-x86_64 \ 126 + -machine q35 \ 127 + -cpu qemu64 \ 128 + -m "$MEMORY" \ 129 + -smp "$CPUS" \ 130 + -accel tcg \ 131 + -bios "$UEFI_FW" \ 132 + -cdrom "$ISO_FILE" \ 133 + -boot d \ 134 + -nographic \ 135 + -serial mon:stdio 136 + else 137 + exec qemu-system-x86_64 \ 138 + -machine q35 \ 139 + -cpu qemu64 \ 140 + -m "$MEMORY" \ 141 + -smp "$CPUS" \ 142 + -accel tcg \ 143 + -bios "$UEFI_FW" \ 144 + -cdrom "$ISO_FILE" \ 145 + -boot d 146 + fi 129 147 elif [ "$ARCH" = "aarch64" ]; then 130 148 echo "Starting aarch64 VM..." 131 149 # Get the aarch64-linux UEFI firmware ··· 142 160 exit 1 143 161 fi 144 162 echo "Using UEFI firmware: $UEFI_FW" 145 - exec qemu-system-aarch64 \ 146 - -machine virt \ 147 - -cpu cortex-a57 \ 148 - -m "$MEMORY" \ 149 - -smp "$CPUS" \ 150 - -accel tcg \ 151 - -bios "$UEFI_FW" \ 152 - -cdrom "$ISO_FILE" \ 153 - -boot d \ 154 - -nographic 163 + if [ "$NOGRAPHIC" = true ]; then 164 + exec qemu-system-aarch64 \ 165 + -machine virt \ 166 + -cpu cortex-a57 \ 167 + -m "$MEMORY" \ 168 + -smp "$CPUS" \ 169 + -accel tcg \ 170 + -bios "$UEFI_FW" \ 171 + -cdrom "$ISO_FILE" \ 172 + -boot d \ 173 + -nographic 174 + else 175 + exec qemu-system-aarch64 \ 176 + -machine virt \ 177 + -cpu cortex-a57 \ 178 + -m "$MEMORY" \ 179 + -smp "$CPUS" \ 180 + -accel tcg \ 181 + -bios "$UEFI_FW" \ 182 + -cdrom "$ISO_FILE" \ 183 + -boot d 184 + fi 155 185 else 156 186 echo "Error: Unsupported architecture '$ARCH'" 157 187 echo "Supported architectures: x86_64, aarch64"