问题描述
我想在Centos 8中使用命令mkimage。
我尝试使用命令dnf install uboot-tools作为root uboot-tools安装,但这不可用。
请问有人可以指导我如何在系统上安装uboot-tools吗?
解决方法
我建议从头开始构建u-boot工具,这不会花很长时间:
wget https://github.com/u-boot/u-boot/archive/v2020.07.tar.gz
tar zxf v2020.07.tar.gz
make -C u-boot-2020.07 mrproper qemu-x86_64_defconfig tools
mkimage
将在此处提供:u-boot-2020.07/tools/mkimage
。
ls -gG u-boot-2020.07/tools/mkimage
-rwxrwxr-x 1 240152 Sep 22 08:13 u-boot-2020.07/tools/mkimage
u-boot-2020.07/tools/mkimage
Error: Missing output filename
Usage: u-boot-2020.07/tools/mkimage -l image
-l ==> list image header information
u-boot-2020.07/tools/mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
u-boot-2020.07/tools/mkimage [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b <dtb> [-b <dtb>]] [-i <ramdisk.cpio.gz>] fit-image
<dtb> file is used with -f auto,it may occur multiple times.
-D => set all options for device tree compiler
-f => input filename for FIT source
-i => input filename for ramdisk file
Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)
u-boot-2020.07/tools/mkimage -V ==> print version information and exit
Use '-T list' to see a list of available image types
您现在可以将其移至/usr/local/bin
:
sudo cp u-boot-2020.07/tools/mkimage /usr/local/bin