Kernel

The milkV Pioneer runs the Linux kernel.

Linux

All of the known to me working operating systems (distributions) for the milkV Pioneer run the Linux kernel.

Kernel Sources

The best latest and greatest kernel source for the milkV Pioneer appears to be the Sophgo repository.

  • The Sophgo repo has support, and appears recently updated. This is the only kernel I have working so far. https://github.com/sophgo/linux-riscv

  • The stock Fedora 38 image us running kernel 6.1.31. There is source in the /usr/src/kernels/6.1.31/ directory. But this source is missing a lot of the standard kernel (e.g. no Documentation directory), so it doesn’t build cleanly. I was unable to determine which Fedora SRPM this was built from.

  • The there is a kernel source in the milkv-pioneer repositories that seems like it would be ideal. But it is just a single branch, with no tags. It has just the 6.1.22 source, which doesn’t seem to be the right one for this board, despite having a name that makes it seem like the right repo. It also hasn’t been touched since May, 2023, so it is older than the image that ships with the Pioneer: https://github.com/milkv-pioneer/linux-riscv

  • There’s Linus’ kernel and/or the linux-stable repo. It is unknown if all the Pioneer bits have been upstreamed yet. That is unlikely though.

Kernel Build

A kernel for Debian can be built thusly.

mkdir -p sophgo
cd sophgo/
git clone https://github.com/sophgo/linux-riscv
cd linux-riscv/
make ARCH=riscv sophgo_mango_ubuntu_defconfig
scripts/config --disable DEBUG_INFO
make menuconfig
make -j$(nproc) deb-pkg
cd ../
sudo dpkg -i linux-headers-*_riscv64.deb linux-image-*_riscv64.deb linux-libc-dev_*_riscv64.deb 
mkdir -p /boot/dtb/debian/
sudo cp -p /usr/lib/linux-image-6.1.61-0fyi+/sophgo/mango-milkv-pioneer.dtb /boot/dtb/debian/

vim /boot/extlinux/extlinux.conf

label debian
        menu label Debian
        linux /vmlinuz-6.1.61-0fyi+
        initrd /initrd.img-6.1.61-0fyi+
        fdt /dtb/debian/mango-milkv-pioneer.dtb
        append console=ttyS0,115200 root=/dev/nvme0n1p5 rootfstype=ext4  rootwait rw earlycon selinux=0 LANG=en_US.UTF-8

Fedorea Kernel Configuration

Below is a link to the kernel .config that ships with the stock Fedora OS.