Running a Yocto image on Unmatched

Hi everyone, I recently got an Unmatched board and I was wondering if anyone is familiar with loading Yocto images to the board with an SD card. I have been building the images and then using the raspberry pi imager to convert the SD card to a bootable state. But when I plug the SD card into the board, there is no output in terminal. Does anyone have tips or and suggestions?

It isn’t clear exactly what you are doing. Did the image shipped with the board work?

The SD Cards have to be formatted a particular way to work, and have to have the right boot loader images on them, with the right set of SiFive u-boot and linux kernel patches. The SiFive freedom-u-sdk project will build images that work.

If you want to try to build your own images outside of freedom-u-sdk then I would suggest using this as a reference

I’ll give your suggestions a try. If it doesn’t work, I’ll get back and provide the specifics. Thank you very much.

So to elaborate, I have an Unmatched board that came with a default Linux image on the SD card(that works fine). But for the task I have, I need to use a Yocto image instead of the default to boot the board. To get started on this task I followed directions shown on this website GitHub - riscv/meta-riscv: OpenEmbedded/Yocto layer for RISC-V Architecture. I followed the steps in the link. I was able to execute the following commands successfully on my Linux laptop. But then, when I flashed the SD card with the Yocto image(
$ MACHINE=freedom-u540 wic create freedom-u540-opensbi -e core-image-minimal
$ bmaptool create ./ > image.bmap
$ sudo bmaptool copy --bmap image.bmap ./ /dev/sdX) , it did not format, and the sdcard was unbootable.

I also tried using the Raspberry Pi imager(to make a bootable image) on the Yocto images that I built locally. It did seem to format better. But, the boot partition was not created and it still did not work with the Unmatched board.

So, my question is: are there specific directions on how to build and load a new Yocto image on a new SD card?

Thank you for all your help

A new SD card or have you overwritten the one that came with it? (which would be foolish as SD cards are cheap)

I have a new 64 gig card, the sandisk extreme v30.

A freedom-u540 image will only run on a HiFive Unleashed. it will not run on a HiFive Unmatched. You need to use the SiFive meta-sifive layer to get an image that will run on an Unmatched. See the freedom-u-sdk docs I pointed at.

The image that ships with the board is an OpenEmbedded/Yocto image.

You can copy the original image that ships with the board and replace the root file system on the third partition with a different one and it should still boot. But if you replace the bootloaders in partition 1 or 2 with freedom-u540 ones it won’t boot.

Hi again Jim, thanks so much for the help you have already given me. I followed your advice and cloned the SD card that came with the board to a new one. Upon making sure that the cloned SD card worked, I made a new image from the link you sent. I used the command

MACHINE=unmatched bitbake core-image-minimal

After this image was built, I found the file named core-image-minimal-unmatched.wic.xz. I used the command xzcat core-image-minimal-unmatched.wic.xz | sudo dd of=/dev/mmcblk0p4 bs=512K iflag=fullblock oflag=direct conv=fsync status=progress (Also I would like to add that I did find the root partition on that specified partition.) After the image was on the card, I plugged it into the board. The board booted, but then stopped and said Kernel panic - not syncing:VFS: Unable to mount root fs on unknown-block(179, 4.) (check attached image)

I am not sure what I am doing wrong at this point, do you have any suggestions? Again, thanks so much you have already been such a huge help!

I’m not an expert on booting linux. But wic images from freedom-u-sdk normally contain a full disk image not a rootfs. Are you sure that you still have a rootfs in the fourth partition? Maybe you accidentally wrote an entire disk image into one partition?

You might try building freedom-u-sdk the documented way, just to verify that you can build and boot an open embedded system from scratch. Then try changing the build process to do what you want, verifying each step along the way.

I’ll give that a try and get back to you when I am finished. Thank you so much for your help.

Sorry to get back so late. I got it all working. Thanks so much for the help! I really have appreciated it all.