How to get mainline kernel running on Duo S (SD)?

The SDK is stuck on 5.10 but a lot of support for the SG2000 has been added to the mainline kernel since then. So theoretically it should be possible to run a mainline kernel on the Duo S (albeit with some features missing) but I’m not sure how, if it is even possible.

4 Likes

It should be possible. Here are the features mainlined into Linux: Home · sophgo/linux Wiki · GitHub

Here is a generalized overview of what it takes to get a newer kernel running:

  1. Get or define a DTS for the Duo S. It is not mainlined yet but you can see v3 here: Making sure you're not a bot!
  2. Compile the kernel and DTS. I have my 6.17 config here: 6.17 duo-s .config ($4905818) · Snippets · GitLab . It compiles to a .gz which can be changed, just make sure to update the FIT image.
  3. Create a uBoot FIT image. I posed my multi.its here: Milk-V Duo S uBoot FIT device tree source ($4928874) · Snippets · GitLab . You will need the Image.gz and .dtb in the same directory, then run mkimage -f multi.its boot.sd. mkimage is part of the uboot-tools package.
  4. Copy the boot.sd file to the SD card. The SD card will have to be partitioned correctly, I started by using the released image and updating the OS to my own choosing (Debian in this case) and updating the FIT image with my updated kernel and DTB.
  5. Boot the board and make sure uBoot loads and executes the new kernel correctly
1 Like