VisionFive 2 firmware build error tmp file not found

Hello everyone,
So I’ve been following the official guide to build the latest firmware, opensbi, uboot you name it :grinning:
Now everything worked fine until the step where you create the actual fw_payload.img and I’m getting the following error message:

florian@Etzel:~/RISCV/Tools/uboot_its$ /home/florian/RISCV/uboot/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
sh: 1: dtc: not found
/home/florian/RISCV/uboot/u-boot/tools/mkimage: Can't open visionfive2_fw_payload.img.tmp: No such file or directory

Now I am a bit confused as to why it says “dtc not found” and then fails with not being able to open a .tmp file since it should create this file by itself. I suppose this is just the follow up to the first error message but that one is not really helpful at all I’m afraid :pensive:
Can anyone help me out here? Should I just run through the whole procedure once more and see if maybe something failed without me noticing?

Thanks in advance for any help!

1 Like

You need to install the following package “device-tree-compiler”. As you’ll see below it contains the dtc binary. Hope this helps.

device-tree-compiler: /usr/bin/dtc

3 Likes

That did the trick thank you very much!
Feeling a bit embarrassed I wasn’t aware I was missing a system package :dizzy_face: :woozy_face: