Booting software on Odroid-C4

Hello, I would like to boot my Microkit software on an Odroid-C4, but I’m a bit confused about the process. Is there any tutorial available, or perhaps an existing U-Boot image that I could use? Thank you for your help. Best regards, Julia Royer

Hi Julia Yes, if you haven’t done this kind of thing before (building U-Boot, flashing a device etc) it is confusing. Right now Microkit/seL4 don’t have any guides for setting up a board from scratch, but for the Odroid-C4 I have a pre-built image that you can use and is known to work. If you go to [1] and then download the image you can flash a microSD card or eMMC with a GUI like balenaEtcher or the dd utility. I’ve added a hello world Microkit image to the second partition of the image so once you get into the U-Boot you can try load that and run it. When you power on the Odroid-C4, you’ll see a line from U-Boot: Hit any key to stop autoboot: 1 You want to hit some key to stop the auto booting process and now you’ll be in the U-Boot command line where you can run commands. In [1] I’ve listed the commands to try out the hello world. Once you can run Microkit images you can start thinking about how you want to do your development/setup your workflow. There’s lots of different ways to boot images via U-Boot, the most common is either TFTP boot or over the persistent storage like with the hello world image I described above. Booting off the persistent storage is easy to setup but annoying over time as you must constantly take the microSD/eMMC out, mount it, copy over the new image, and then reboot the board. Booting over TFTP requires setting up a TFTP/DHCP server, but can save a lot of time as you develop. I don’t have specific instructions for setting up a TFTP/DHCP server, but you can look on the internet for various guides. The first time I did it on a Linux machine it took 1-2 hours to setup and get working. With either approach, what you’ll want to do is setup the bootcmd [2] of U-Boot such that it automatically runs certain commands when it starts which will save you a lot of time during development. For example, setting up the bootcmd for booting of the microSD would look something like this: ``` setenv bootcmd 'fatload mmc 0:2 0x20000000 loader.img; go 0x20000000’ saveenv ``` Next time you boot it will automatically load the image without any input from you. For setting up TFTP boot, you would do: ``` setenv bootcmd 'dhcp; tftpboot 0x10000000 /<YOUR TFTP DIR>/loader.img; go 0x20000000 saveenv ``` As you can see, it is not a trivial process. It also can't be completely automated by us (the providers of Microkit) as it really depends on how people want to setup their workflow. Please let me know if you run into any issues. [1]: https://github.com/Ivan-Velickovic/flash_uboot_odroidc4/releases/tag/2025.05... [2]: https://docs.u-boot.org/en/latest/usage/environment.html Ivan

In addition to Ivan’s answer below, I believe the seL4 dev kit has a longer description of various boot options and getting set up with hardware at https://sel4devkit.github.io/ It uses the Avnet MaaXBoard, but most of what it talks about looks transferable. Cheers, Gerwin On 21 May 2025, at 05:16, Ivan Velickovic via Devel <devel@sel4.systems> wrote: Hi Julia Yes, if you haven’t done this kind of thing before (building U-Boot, flashing a device etc) it is confusing. Right now Microkit/seL4 don’t have any guides for setting up a board from scratch, but for the Odroid-C4 I have a pre-built image that you can use and is known to work. If you go to [1] and then download the image you can flash a microSD card or eMMC with a GUI like balenaEtcher or the dd utility. I’ve added a hello world Microkit image to the second partition of the image so once you get into the U-Boot you can try load that and run it. When you power on the Odroid-C4, you’ll see a line from U-Boot: Hit any key to stop autoboot: 1 You want to hit some key to stop the auto booting process and now you’ll be in the U-Boot command line where you can run commands. In [1] I’ve listed the commands to try out the hello world. Once you can run Microkit images you can start thinking about how you want to do your development/setup your workflow. There’s lots of different ways to boot images via U-Boot, the most common is either TFTP boot or over the persistent storage like with the hello world image I described above. Booting off the persistent storage is easy to setup but annoying over time as you must constantly take the microSD/eMMC out, mount it, copy over the new image, and then reboot the board. Booting over TFTP requires setting up a TFTP/DHCP server, but can save a lot of time as you develop. I don’t have specific instructions for setting up a TFTP/DHCP server, but you can look on the internet for various guides. The first time I did it on a Linux machine it took 1-2 hours to setup and get working. With either approach, what you’ll want to do is setup the bootcmd [2] of U-Boot such that it automatically runs certain commands when it starts which will save you a lot of time during development. For example, setting up the bootcmd for booting of the microSD would look something like this: ``` setenv bootcmd 'fatload mmc 0:2 0x20000000 loader.img; go 0x20000000’ saveenv ``` Next time you boot it will automatically load the image without any input from you. For setting up TFTP boot, you would do: ``` setenv bootcmd 'dhcp; tftpboot 0x10000000 /<YOUR TFTP DIR>/loader.img; go 0x20000000 saveenv ``` As you can see, it is not a trivial process. It also can't be completely automated by us (the providers of Microkit) as it really depends on how people want to setup their workflow. Please let me know if you run into any issues. [1]: https://github.com/Ivan-Velickovic/flash_uboot_odroidc4/releases/tag/2025.05... [2]: https://docs.u-boot.org/en/latest/usage/environment.html Ivan _______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems

Hello, On 2025-05-21 03:16, Ivan Velickovic via Devel wrote:
Booting over TFTP requires setting up a TFTP/DHCP server, but can save a lot of time as you develop. I don’t have specific instructions for setting up a TFTP/DHCP server, but you can look on the internet for various guides. The first time I did it on a Linux machine it took 1-2 hours to setup and get working.
I highly recommend using Dnmasq on your local machine, which is simple to setup. See the --enable-tftp option at thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html. You may need to disable DHCP if that clashes with an existing DHCP server.
As you can see, it is not a trivial process. It also can't be completely automated by us (the providers of Microkit) as it really depends on how people want to setup their workflow.
There might be a third way: Using Android fastboot protocol. U-boot has support for it, but your SoC may have a vendor specific implementation too if you are pre-U-boot. E.g. i.MX based SoCs have the UUU tool. This would give the smoothest and fastest development flow, as all you need is a USB cable. You want to use the 'download' command to upload your image to a specific memory address in RAM and then boot it. (You can also use it to write to the eMMC or SD card, but that's less useful.) Greetings, Indan

Hi Ivan, Gerwin, and Indan, Thank you all for your help and detailed explanations! If I run into any issues along the way, I’ll be sure to reach out. Thanks again! Best regards, Julia
participants (4)
-
Gerwin Klein
-
Indan Zupancic
-
Ivan Velickovic
-
Julia Royer