Skip to content

linux-develop/riscv-mkkernel

Repository files navigation

prequirements

$ 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

clone the main repo

$ git clone git@github.com:linux-develop/riscv-mkkernel.git

clone all the submodule

$ git submodule update --init --recursive

compile all the project

# first try
$ cd qemu
$ mkdir -p build
$ cd build
$ ../configure --target-list=riscv64-softmmu

if we use busybox as rootfs

choose build static binary in busybox's menuconfig

is we use buildroot as rootfs(default)

Target options

in menuconfig:

choose Target Architecture as RISCV
choose MMU Page Size as 16KB

next time in top directory

$ make all MENU=y

only compile linux

# first try in top directory
$ make linux MENU=y

# next time in top directory
$ make linux

select HAVE_PAGE_SIZE_16KB and then search '16kb':set MMU page size as 16kb

only compile opensbi

# in top directory
$ make opensbi

enable debug mode

$ make opensbi DEBUG=y

only compile rootfs

busybox

# first try in top directory
$ make busybox MENU=y

# next time in top directory
$ make busybox

buildroot(default)

# first try in top directory
$ make buildroot MENU=y

# next time in top directory
$ make buildroot

only compile qemu

# first try
$ cd qemu
$ mkdir -p build
$ cd build
$ ../configure --target-list=riscv64-softmmu
$ make -j$(nproc)

# next time in top directory
$ make qemu

enable debug mode

$ ../configure --target-list=riscv64-softmmu --enable-debug --enable-debug-tcg

test tool

perf

$ 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

$ iozone -a

About

Support for riscv 16kb page size(opensbi, qemu, linux,buildroot/busybox)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors