How to recompile kernel(mars)

I want to install tailscale, it requires CONFIG_TUN kernel config, but current kernel does not enable it.

can not find any doc for mars to do that.

I tried VisionFive 2 Debian Wiki - 202302 Release | RVspace it complie success, but after reboot, the reboot fail

try my kernel is included there

1 Like

after some digging, finally make it work. supply it here in case others want to do the same thing

  1. download linux source code from
    GitHub - starfive-tech/linux at 4964ce0a869e92df26331833894c9d0fd84d80f3

checkout commit 4964ce0

  1. apt install required dev tools
apt-get install build-essential linux-source bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison git
  1. in the directory of linux
    copy current kernel’s config file to the directory:
cp -v /boot/config-$(uname -r) .config
  1. make some change to .config as you need. also change Linux Version in Makefile, example: 5.15.1

  2. make olddefconfig && make localmodconfig

  3. make -j$(nproc)
    the builded linux kernel will have version “5.15.1+”

  4. make modules_install

  5. make install

  6. done, just reboot.

  7. remove old kernel

# find old linux image installed
dpkg --list | grep linux-image

# removed the old installed linux-mage
apt-get remove $the_found_packet_name --purge

can we have GitHub - milkv-mars/mars-buildroot-sdk update regularly?
The situation now is: we only have the board(mars) and a NOT updated software. Also we do not have
the documents based on which we can do SOME modification

1 Like