Kernel Sauce and Build

What is the best Linux kernel source code repo for the Pioneer?

I got this repo working with my Pioneer computer. It is the latest/greatest I’ve found:

This repo, which seems the most logical, hasn’t been updated since last May, so is much older than the latest images. So I thought this would be best, but it appears unmaintained:

Other options would be the main riscv repo from Linux, linux-stable, Linus’ latest, etc. I also checked the /usr/src/kernels/6.1.31 directory in the stock Fedora 38 image, which perhaps corresponds to the running binary, but it is missing files in a “regular” Linux kernel.

Anyway, with the Sophgo linux-riscv repo, I built a fresh kernel for my Pioneer running Debian 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
# For Debian:
make -j$(nproc) deb-pkg
# Others, perhaps
# make -j$(nproc)
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/

Then add it to the bootloader:

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

Happy hacking,

-Jeff

2 Likes

Worked great. Thanks for the writeup Jeff!

1 Like