cat /data/dfustini/demo/docker/Dockerfile
#########################
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get install -y cmake gcc g++ git libglib2.0-dev ninja-build python3 python3-distutils python3-dev python3-pip
########################
cd /data/dfustini/demo/docker
docker build -t dfustini .
cd /data/dfustini/demo/linux
make ARCH=riscv CROSS_COMPILE=/opt/tenstorrent/tt-riscv-toolchain-latest/bin/riscv64-unknown-linux-gnu- -j128
cd /data/dfustini/demo
docker run -v $HOME/data/demo:/demo -it dfustini bash -c 'cd /demo/qemu; \
./configure --target-list=riscv64-softmmu --enable-slirp'
cd /data/dfustini/demo
docker run -v $HOME/data/demo:/demo -it dfustini bash -c 'cd /demo/qemu; make -j128'
cd /data/dfustini/demo
docker run -v $HOME/data/demo:/demo -it dfustini bash -c 'cd /demo; \
qemu/build/qemu-system-riscv64 -M virt,pflash0=pflash0,pflash1=pflash1 \
-m 2G -serial mon:stdio -nographic \
-blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
-blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
-append "root=/dev/ram ro console=hvc earlycon=sbi loglevel=8" \
-kernel linux/arch/riscv/boot/Image \
-bios opensbi/build/platform/generic/firmware/fw_dynamic.bin \
-smp 2'
cd /data/dfustini/demo
docker run -v $HOME/data/demo:/demo -it dfustini bash -c 'cd /demo; \
qemu/build/qemu-system-riscv64 \
-M virt,pflash0=pflash0,pflash1=pflash1,aia=aplic-imsic \
-m 2G -smp 8 \
-serial mon:stdio \
-device virtio-gpu-pci -full-screen \
-device qemu-xhci \
-device usb-kbd \
-blockdev node-name=pflash0,driver=file,read-only=on,filename=RISCV_VIRT_CODE.fd \
-blockdev node-name=pflash1,driver=file,filename=RISCV_VIRT_VARS.fd \
-netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
-kernel linux/arch/riscv/boot/Image \
-initrd buildroot/output/images/rootfs.cpio \
-append "root=/dev/ram ro console=hvc0 rootwait earlycon=sbi" '