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

Commit 9c8b91b

Browse files
committed
driver.sh: Alphabetize in setup_variables
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
1 parent 4cdb9d9 commit 9c8b91b

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

driver.sh

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,6 @@ setup_variables() {
8888
-append "console=ttyAMA0 root=/dev/vda" )
8989
export CROSS_COMPILE=aarch64-linux-gnu- ;;
9090

91-
"x86_64")
92-
case ${REPO} in
93-
common-*)
94-
config=x86_64_cuttlefish_defconfig
95-
qemu_cmdline=( -append "console=ttyS0"
96-
-initrd "images/x86_64/rootfs.cpio" ) ;;
97-
*)
98-
config=defconfig
99-
qemu_cmdline=( -drive "file=images/x86_64/rootfs.ext4,format=raw,if=ide"
100-
-append "console=ttyS0 root=/dev/sda" ) ;;
101-
esac
102-
# Use KVM if the processor supports it (first part) and the KVM module is loaded (second part)
103-
[[ $(grep -c -E 'vmx|svm' /proc/cpuinfo) -gt 0 && $(lsmod 2>/dev/null | grep -c kvm) -gt 0 ]] && qemu_cmdline=( "${qemu_cmdline[@]}" -enable-kvm )
104-
image_name=bzImage
105-
qemu="qemu-system-x86_64" ;;
10691
"ppc32")
10792
config=ppc44x_defconfig
10893
image_name=zImage
@@ -128,6 +113,22 @@ setup_variables() {
128113
export ARCH=powerpc
129114
export CROSS_COMPILE=powerpc64le-linux-gnu- ;;
130115

116+
"x86_64")
117+
case ${REPO} in
118+
common-*)
119+
config=x86_64_cuttlefish_defconfig
120+
qemu_cmdline=( -append "console=ttyS0"
121+
-initrd "images/x86_64/rootfs.cpio" ) ;;
122+
*)
123+
config=defconfig
124+
qemu_cmdline=( -drive "file=images/x86_64/rootfs.ext4,format=raw,if=ide"
125+
-append "console=ttyS0 root=/dev/sda" ) ;;
126+
esac
127+
# Use KVM if the processor supports it (first part) and the KVM module is loaded (second part)
128+
[[ $(grep -c -E 'vmx|svm' /proc/cpuinfo) -gt 0 && $(lsmod 2>/dev/null | grep -c kvm) -gt 0 ]] && qemu_cmdline=( "${qemu_cmdline[@]}" -enable-kvm )
129+
image_name=bzImage
130+
qemu="qemu-system-x86_64" ;;
131+
131132
# Unknown arch, error out
132133
*)
133134
echo "Unknown ARCH specified!"

0 commit comments

Comments
 (0)