Skip to content

Commit

Permalink
feat(platform): include script to lauch test platform
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Costa <[email protected]>
  • Loading branch information
Diogo21Costa committed Oct 26, 2023
1 parent 17ac782 commit 4b465e8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions platform/qemu/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -p qemu -i bash

# Check if a version argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <qemu-version>"
exit 1
fi

qemu_version="$1"
# -s -S -nographic\
qemu-system-"$qemu_version" -nographic\
-M virt,secure=on,virtualization=on,gic-version=3 \
-cpu cortex-a53 -smp 4 -m 4G\
-bios ./result-2/bin/qemu-"$qemu_version"-virt/flash.bin \
-device loader,file="./result-3/bin/bao.bin",addr=0x50000000,force-raw=on\
-device virtio-net-device,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:5555-:22\
-serial pty

# qemu-system-"$qemu_version" -nographic\
# -M virt,secure=on,virtualization=on,gic-version=3 \
# -cpu cortex-a53 -smp 4 -m 4G\
# -bios ./result-2/bin/qemu-"$qemu_version"-virt/flash.bin \
# -device loader,file="./result-3/bin/bao.bin",addr=0x50000000,force-raw=on\
# -device virtio-net-device,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:5555-:22\
# -device virtio-serial-device -chardev pty,id=serial3 -device virtconsole,chardev=serial3

0 comments on commit 4b465e8

Please sign in to comment.