How to recompile kernel to enable BINFMT_MISC support?

Reply to my own post, so that others in the same shoes know what to do:

  • I’m using Image-69, whose README says corresponding kernel tag is VF2_2.5.0
  • Check out kernel with this tag, GitHub - starfive-tech/linux
  • Follow Part 1 of this instruction to re-build kernel debian packages
    • Make sure add BINFMT_MISC option in “make menuconfig” step
    • Also make sure using the same local version, “LOCALVERSION=-starfive”
  • Then copy over ./debian/linux-image/boot/vmlinuz-5.15.0-starfive to /boot/boot directory on visionfive 2 board.

Reboot! That is it!

2 Likes