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.21
[2]: https://docs.u-boot.org/en/latest/usage/environment.html

Ivan

_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to