How to run executable on the Duo from SD card?

Greeting, guys

I am trying to run some bare metal experiments on the Duo.
I was wondering how can one load/run an executable without an OS or uboot? How should we prepare/set up the sd card to do that?

I’m not an expert, but in order to boot from SDCard uboot will do some magic in the back in order to be able to boot from SDCard… you might check the uboot code to make an idea about it.

1 Like

There are two posts on the official forums explaining this.

https://forum.sophgo.com/t/use-opensbi-to-boot-your-own-operating-system/340

And I made a youtube video with the steps https://youtu.be/UrKmSipiXpc?si=H8WHHjq7kc-XSJHM

The Duo expects a fip.bin file which combines a bl2.bin (generated from the sdk) and a bl33.bin (this is the user application).

The SDK has a tool to combine them.

2 Likes