added memory allocation flag to run command ``VM_MEMORY=<amount>G cargo run``
This commit is contained in:
+10
-1
@@ -135,6 +135,13 @@ else
|
|||||||
debug_flags=""
|
debug_flags=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $VM_MEMORY ]; then
|
||||||
|
vm_memory_flag="-m $VM_MEMORY"
|
||||||
|
else
|
||||||
|
vm_memory_flag="-m 2G"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $USE_LEGACY_BIOS ]; then
|
if [ $USE_LEGACY_BIOS ]; then
|
||||||
boot_flags=""
|
boot_flags=""
|
||||||
else
|
else
|
||||||
@@ -171,6 +178,8 @@ else
|
|||||||
info "Running OS in QEMU..."
|
info "Running OS in QEMU..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
check_test_res() {
|
check_test_res() {
|
||||||
qemu_exit_code=$?
|
qemu_exit_code=$?
|
||||||
if [ $qemu_exit_code -eq 33 ]; then
|
if [ $qemu_exit_code -eq 33 ]; then
|
||||||
@@ -201,7 +210,7 @@ qemu-system-x86_64 -M q35 \
|
|||||||
-cdrom "$build_dir/image.iso" \
|
-cdrom "$build_dir/image.iso" \
|
||||||
${kvm_flag} \
|
${kvm_flag} \
|
||||||
-boot d \
|
-boot d \
|
||||||
-m 2G \
|
${vm_memory_flag} \
|
||||||
${serial_flags} \
|
${serial_flags} \
|
||||||
-no-reboot \
|
-no-reboot \
|
||||||
${test_flags} \
|
${test_flags} \
|
||||||
|
|||||||
Reference in New Issue
Block a user