This project is based on Fabrice Bellard's TinyEmu RISCV emulator ported to Windows and ESP32.
It uses virtual memory based on files to provide the emulator with desired RAM.
ls -l
in the rootUpdate 2023-04-13: Reduced by 40%, about 1:50 seconds to get to bash from power up, 12 seconds for ls -l
.
Currently there's no support for networking but it should be pretty easy to implement, though I'm not sure how functional its going to be given the above stellar execution time.
Compile and Upload to ESP32
pio run -e esp32 -t upload
The arguments for running temu on ESP32 are hardcoded to root-riscv32.cfg
on sdcard under emu
subfolder, you should put your bbl, kernel and rootfs in the same folder and configure it:
{
version: 1,
machine: "riscv32",
memory_size: 128,
bios: "bbl32.bin",
kernel: "kernel32.bin",
cmdline: "console=hvc0 debug ignore_loglevel earlycon=sbi root=/dev/vda rw",
drive0: { file: "rootfs32.bin" }
}
Please see buildroot-tinyemu