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

Commit c63edda

Browse files
committed
driver: Test booting arm64 kernels at both EL1 and EL2
Presubmit: https://travis-ci.com/nathanchance/continuous-integration/builds/103463243 [skip ci] Closes: #92 Suggested-by: Nick Desaulniers <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 02d50bc commit c63edda

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

driver.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ setup_variables() {
8585
image_name=Image.gz
8686
qemu="qemu-system-aarch64"
8787
qemu_ram=512m
88-
qemu_cmdline=( -machine virt
89-
-cpu cortex-a57
88+
qemu_cmdline=( -cpu cortex-a57
9089
-drive "file=images/arm64/rootfs.ext4,format=raw"
9190
-append "console=ttyAMA0 root=/dev/vda" )
9291
export CROSS_COMPILE=aarch64-linux-gnu- ;;
@@ -202,11 +201,18 @@ build_linux() {
202201
boot_qemu() {
203202
local kernel_image=${tree}/arch/${ARCH}/boot/${image_name}
204203
test -e ${kernel_image}
205-
timeout 2m unbuffer ${qemu} \
206-
-m ${qemu_ram} \
207-
"${qemu_cmdline[@]}" \
208-
-nographic \
209-
-kernel ${kernel_image}
204+
qemu=( timeout 2m unbuffer "${qemu}"
205+
-m "${qemu_ram}"
206+
"${qemu_cmdline[@]}"
207+
-nographic
208+
-kernel "${kernel_image}" )
209+
# For arm64, we want to test booting at both EL1 and EL2
210+
if [[ ${ARCH} = "arm64" ]]; then
211+
"${qemu[@]}" -machine virt
212+
"${qemu[@]}" -machine "virt,virtualization=true"
213+
else
214+
"${qemu[@]}"
215+
fi
210216
}
211217

212218
setup_variables "${@}"

0 commit comments

Comments
 (0)