This is a sdk for rv64emu, which contains busybox, linux kernel and opensbi.
Because the linux kernel is TOO LARGE!!!!!, so use --depth 1 to clone the source code.
git submodule update --init --depth 1refer to busybox
Actrually, you can use the busybox binary in rootfs directory directly.Which is built with CFLAG CFLAGS += -march=rv64imac -mabi=lp64.
the rootfs is based on busybox
cd rootfs
mkdir dev
sudo mknod dev/console c 5 1
sudo mknod dev/null c 1 3
sudo mknod dev/zero c 1 5Before build linux kernel, you must create a console device for linux, refer to
Create console for linux.
The defconfig file for linux kernel is rv64emu_linux_defconfig.The script rv64emu_run_linux.sh will build devicetree,linux kernel(with initrootfs support) and opensbi(with linux payload) automatically, and then run linux kernel on rv64emu.
You shall modify the script rv64emu_run_linux.sh to change the path of rv64emu and riscv-gnu-toolchain according to your environment.
