Mainline Linux support question

I have the mainline kernel run to the console on my duo-s finally.
If someone else want to run mainline kernel on duo-s, maybe you can try this way, prepare:

  1. fip.bin (official u-boot binary)
  2. dtb (compiled from official duo-buildroot-sdk)
  3. busybox (used to compile into kernel Image as initramfs)
  4. Linux kernel Image (compiled from mainline kernel, i.e. arch/riscv/boot/Image)

Prepare an sd card, and copy 1) 2) 4) to sd card, power on board, wait for u-boot print ’ Hit any key to stop autoboot: 0 ', press any key to enter u-boot command, then you can see the content on sd card with the command ‘ls mmc’, the output would be like:

# ls mmc 0
436736 fip.bin
20656 cv1813h_milkv_duos_sd.dtb
22079488 Image
3 file(s), 0 dir(s)

Then type four commands like below:

# setenv bootargs ${reserved_mem} ${root} ${mtdparts} console=$consoledev,$baudrate $othbootargs
# fatload mmc 0 0x81800000 Image
# fatload mmc 0 0x83000000 cv1813h_milkv_duos_sd.dtb
# booti 0x81800000 - 0x83000000

Then u-boot will tranfer control to kernel.

3 Likes