added memory allocation flag to run command ``VM_MEMORY=<amount>G cargo run``

This commit is contained in:
2025-02-27 21:57:58 +00:00
parent 2178215a01
commit db8dbff9f2
+10 -1
View File
@@ -135,6 +135,13 @@ else
debug_flags=""
fi
if [ $VM_MEMORY ]; then
vm_memory_flag="-m $VM_MEMORY"
else
vm_memory_flag="-m 2G"
fi
if [ $USE_LEGACY_BIOS ]; then
boot_flags=""
else
@@ -171,6 +178,8 @@ else
info "Running OS in QEMU..."
fi
check_test_res() {
qemu_exit_code=$?
if [ $qemu_exit_code -eq 33 ]; then
@@ -201,7 +210,7 @@ qemu-system-x86_64 -M q35 \
-cdrom "$build_dir/image.iso" \
${kvm_flag} \
-boot d \
-m 2G \
${vm_memory_flag} \
${serial_flags} \
-no-reboot \
${test_flags} \