How to update the uboot image to the sd card

hello

I ’ new in RISC-V,so I want to ask a question:how to update the uboot image to the sd card

This site

has info on how to build an image from scratch and has a lot of useful info about how things work. There is also a section near the end that talks about updating the uboot image on the sdcard. Basically, you just need to build u-boot, possibly with unmatched patches, and then use dd to copy two binaries to two partitions on the sdcard. These instructions were last updated about 8 months ago, there might be newer versions of some stuff available.

There is also useful info in the HiFive Unmatched Software Reference Manual that you can find on the sifive site. Visit
https://www.sifive.com/boards/hifive-unmatched
and scroll to the bottom to find the link to the software reference manual.

Thanks!
If it is a new sd card,is this method OK ?

Firstly, On a new SD card you can burn the official system image unmatched.wic.xz or your own built image ;

And then, Many partitions created on the sd card will be found out.
spl partition is in /dev/mmcblk0p1;
u-boot partition is in /dev/mmcblk0p2;

So, if you want to update the u-boot partition, just write that with “dd” command after you built a u-boot.itb

cd build/tmp-glibc/work/unmatched-oe-linux/u-boot/1_2022.04-r0/build
dd if=u-boot.itb of=/dev/mmcblk0p2 oflag=direct

# OR Update u-boot spl partition:
# cd spl
# dd if=u-boot-spl.bin of=/dev/mmcblk0p1 oflag=direct

Thank you!!!,It is useful for me!The file “unmatched.wic.xz” include spl、u-boot and OS?flash unmatched.wic.xz to the SD card, and can the boot to OS?

都有。
你动手试试就清楚了。

非常感谢~帮了大忙啦! :heart_hands: