Skip to content

Instantly share code, notes, and snippets.

@tresf
Last active November 4, 2023 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tresf/2c7547086407a284aca2a14f06287a8d to your computer and use it in GitHub Desktop.
Save tresf/2c7547086407a284aca2a14f06287a8d to your computer and use it in GitHub Desktop.
QEmu with Java MacOS Apple Silicon M1/M2/M3
wget https://download2.gluonhq.com/openjfx/19/openjfx-19_monocle-linux-x64_bin-sdk.zip -O \
out/javafx-linux-x86_64-19_monocle.zip && unzip out/javafx-linux-x86_64-19_monocle.zip && \
cp -R javafx-sdk-19 lib/javafx-linux-x86_64-19_monocle && mv javafx-sdk-19 out/javafx-linux-x86_64-19_monocle
pushd ~/Applications/qemu/debian-riscv64/ && \
qemu-system-riscv64 \
    -machine virt \
    -smp 4\
    -cpu rv64,sv57=off \
    -m 4G \
    -device virtio-blk-device,drive=hd \
    -drive file=overlay.qcow2,if=none,id=hd \
    -device virtio-net-device,netdev=net \
    -netdev user,id=net,hostfwd=tcp::2222-:22,hostfwd=tcp::8184-:8182 \
    -kernel ./u-boot-qemu/uboot.elf \
    -object rng-random,filename=/dev/urandom,id=rng \
    -device virtio-rng-device,rng=rng \
    -append "root=LABEL=rootfs console=ttyS0" \
    -nographic && \
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment