$ sudo apt install libncurses-dev flex bison gcc-riscv64-linux-gnu qemu-utils python3-pip libxen-deva libglib2.0-dev
$ pip3 install tomli sphinx ninja
$ git clone git@github.com:linux-develop/riscv-mkkernel.git$ git submodule update --init --recursive# first try
$ cd qemu
$ mkdir -p build
$ cd build
$ ../configure --target-list=riscv64-softmmuchoose
build static binaryin busybox's menuconfig
in menuconfig:
choose
Target ArchitectureasRISCV
chooseMMU Page Sizeas16KB
$ make all MENU=y# first try in top directory
$ make linux MENU=y
# next time in top directory
$ make linuxselect
HAVE_PAGE_SIZE_16KBand then search '16kb':set MMU page size as 16kb
# in top directory
$ make opensbi$ make opensbi DEBUG=y# first try in top directory
$ make busybox MENU=y
# next time in top directory
$ make busybox# first try in top directory
$ make buildroot MENU=y
# next time in top directory
$ make buildroot# first try
$ cd qemu
$ mkdir -p build
$ cd build
$ ../configure --target-list=riscv64-softmmu
$ make -j$(nproc)
# next time in top directory
$ make qemu$ ../configure --target-list=riscv64-softmmu --enable-debug --enable-debug-tcg$ perf stat -e task-clock,cycles,iTLB-load-misses,dTLB-load-misses,dTLB-store-misses,page-faults,major-faults,minor-faults,cpu-migrations test_01$ iozone -a