Mkimage: No such file or directory

hi everyone,
Currently I try to setup VF2, but stuck at Creating fw_payload File. it state:

$ home/user/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
bash: home/user/u-boot/tools/mkimage: No such file or directory

when i check u-boot/tools directory:

Kconfig               gpimage.o            omap
Makefile              ifdtool.c            omapimage.c
aisimage.c            ifdtool.h            omapimage.h
aisimage.h            ifwitool.c           omapimage.o
aisimage.o            image-host.c         os_support.c
asn1_compiler.c       image-host.o         os_support.h
atmel_pmecc_params.c  image-sig-host.c     os_support.o
atmelimage.c          image-sig-host.o     patman
atmelimage.o          imagetool.c          pbl_crc32.c
binman                imagetool.h          pbl_crc32.h
bmp_logo              imagetool.o          pbl_crc32.o
bmp_logo.c            img2srec             pblimage.c
buildman              img2srec.c           pblimage.h
common                imx8image.c          pblimage.o
concurrencytest       imx8image.o          prelink-riscv
default_image.c       prelink-riscv.c
default_image.o       imx8mimage.c
docker                imx8mimage.o         proftool
dtoc            proftool.c
dumpimage             imximage.c           relocate-rela.c
dumpimage.c           imximage.o           rkcommon.c
dumpimage.h           jtagconsole          rkcommon.h
dumpimage.o         rkcommon.o     rkimage.c        kermit               rkimage.o
env                   kwbimage.c 
envcrc                kwbimage.h           rksd.c
envcrc.c              kwbimage.o           rksd.o
envcrc.o              kwboot.c             rkspi.c
fdt_host.h            lib                  rkspi.o
fdtgrep               libfdt     
fdtgrep.c             logos                scripts
fdtgrep.o             lpc32xximage.c       socfpgaimage.c
file2include.c        lpc32xximage.o       socfpgaimage.o
fit_check_sign        microcode-tool       spl_size_limit
fit_check_sign.c    spl_size_limit.c
fit_check_sign.o      mips-relocs.c        stm32image.c
fit_common.c          mkeficapsule.c       stm32image.o
fit_common.h          mkenvimage           sunxi-spl-image-builder.c
fit_common.o          mkenvimage.c         sunxi_egon.c
fit_image.c           mkenvimage.o         sunxi_egon.o
fit_image.o           mkexynosspl.c        ublimage.c
fit_info              mkimage              ublimage.h
fit_info.c            mkimage.c            ublimage.o
fit_info.o            mkimage.h            ubsha1.c
gdb                   mkimage.o            update_octeon_header.c
gen_eth_addr          mksunxiboot.c        vybridimage.c
gen_eth_addr.c        vybridimage.o
gen_ethaddr_crc         xway-swap-bytes.c
gen_ethaddr_crc.c     mtk_image.c          zynqimage.c
gen_ethaddr_crc.o     mtk_image.h          zynqimage.o       mtk_image.o
getline.c             mxsboot.c  
getline.h             mxsimage.c           zynqmpbif.c
gpheader.h            mxsimage.h           zynqmpbif.o
gpimage-common.c      mxsimage.o           zynqmpimage.c
gpimage-common.o      ncb.c                zynqmpimage.h
gpimage.c             netconsole           zynqmpimage.o

is there anything i miss? or anyone know how to fix this. thank in advance.

You are not giving it the “full/correct (as either would work) path to mkimage”.
You need to add a / on the beginning of that command to fix the problem. /home/user/u-boot/tools/mkimage instead of home/user/u-boot/tools/mkimage
It would also work by running $HOME/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
I have provided an example below of how $HOME works… hope this helps
echo $HOME

1 Like

thank, it’s help but

$ /home/user/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware visionfive2_fw_payload.img
FATAL ERROR: Couldn't open "visionfive2-uboot-fit-image.its": No such file or directory
/home/user/u-boot/tools/mkimage: Can't open visionfive2_fw_payload.img.tmp: No such file or directory

it’s anything else i miss?

I would advise starting this process from the beginning and make sure for any files it needs to look up find where it is first with
find /home/user/u-boot -type f -name “name of the file”

That command uses the " visionfive2-uboot-fit-image.its" as a definition file to define the fit image. It will potentially fail if the files defined inside it are not in the correct locations dependent on where you have run the process.

1 Like