Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 766cd4f

Browse files
committed
driver: Use bash's default assignment operator for qemu_ram
qemu_ram only needs to be assigned to something different if the default causes issues. Move the default assignment to its first use, which will make adding new architectures this script easier as there is one less variable to worry about. [skip ci] Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 47f0e51 commit 766cd4f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

driver.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ setup_variables() {
4545
config=multi_v5_defconfig
4646
image_name=zImage
4747
qemu="qemu-system-arm"
48-
qemu_ram=512m
4948
qemu_cmdline=( -machine palmetto-bmc
5049
-no-reboot
5150
-dtb "${tree}/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dtb"
@@ -57,7 +56,6 @@ setup_variables() {
5756
config=aspeed_g5_defconfig
5857
image_name=zImage
5958
qemu="qemu-system-arm"
60-
qemu_ram=512m
6159
qemu_cmdline=( -machine romulus-bmc
6260
-no-reboot
6361
-dtb "${tree}/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dtb"
@@ -69,7 +67,6 @@ setup_variables() {
6967
config=multi_v7_defconfig
7068
image_name=zImage
7169
qemu="qemu-system-arm"
72-
qemu_ram=512m
7370
qemu_cmdline=( -machine virt
7471
-no-reboot
7572
-drive "file=images/arm/rootfs.ext4,format=raw,id=rootfs,if=none"
@@ -85,7 +82,6 @@ setup_variables() {
8582
esac
8683
image_name=Image.gz
8784
qemu="qemu-system-aarch64"
88-
qemu_ram=512m
8985
qemu_cmdline=( -cpu cortex-a57
9086
-drive "file=images/arm64/rootfs.ext4,format=raw"
9187
-append "console=ttyAMA0 root=/dev/vda" )
@@ -103,8 +99,7 @@ setup_variables() {
10399
-append "console=ttyS0 root=/dev/sda" ) ;;
104100
esac
105101
image_name=bzImage
106-
qemu="qemu-system-x86_64"
107-
qemu_ram=512m ;;
102+
qemu="qemu-system-x86_64" ;;
108103
"ppc32")
109104
config=ppc44x_defconfig
110105
image_name=zImage
@@ -272,7 +267,7 @@ boot_qemu() {
272267
local kernel_image=${tree}/arch/${ARCH}/boot/${image_name}
273268
test -e ${kernel_image}
274269
qemu=( timeout 2m unbuffer "${qemu}"
275-
-m "${qemu_ram}"
270+
-m "${qemu_ram:=512m}"
276271
"${qemu_cmdline[@]}"
277272
-nographic
278273
-kernel "${kernel_image}" )

0 commit comments

Comments
 (0)