[U-Boot] mkimage: fix argument parsing on BSD systems
Michal Simek
monstr at monstr.eu
Tue May 3 14:21:37 CEST 2016
Hi Tom,
2016-05-03 1:32 GMT+02:00 Tom Rini <trini at konsulko.com>:
> On Sun, May 01, 2016 at 03:01:27AM +0200, Andreas Bießmann wrote:
>
> > The getopt(3) optstring '-' is a GNU extension which is not available on
> BSD
> > systems like OS X.
> >
> > Remove this dependency by implementing argument parsing in another way.
> This
> > will also change the lately introduced '-b' switch behaviour.
> >
> > Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
> > Reviewed-by: Simon Glass <sjg at chromium.org>
>
> Applied to u-boot/master, thanks!
>
>
This is breaking my mkimage for
CONFIG_SPL_LOAD_FIT=y
CONFIG_OF_LIST="zynq_zc702 zynq_zc706"
(for zynq you have to apply this [PATCH] ARM: zynq: Add support for
SPL_LOAD_FIT)
expecting value doesn't match type in this condition.
if (optind < argc && expecting == type)
params.imagefile = argv[optind];
Thanks,
Michal
./tools/mkimage -f auto -A arm -T firmware -C none -O u-boot -a 0x4000000
-e 0x4000000 -n "U-Boot 2016.05-rc3-00060-g5eb59224edcb-dirty for zynq
board" -E -b arch/arm/dts/zynq_zc702.dtb -b arch/arm/dts/zynq_zc706.dtb -d
u-boot-nodtb.bin u-boot.img
Error: Missing output filename
Usage: ./tools/mkimage -l image
-l ==> list image header information
./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)
./tools/mkimage [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b
<dtb> [-b <dtb>]] fit-image
<dtb> file is used with -f auto, it may occour multiple times.
-D => set all options for device tree compiler
-f => input filename for FIT source
Signing / verified boot options: [-k keydir] [-K dtb] [ -c <comment>] [-r]
-k => set directory containing private keys
-K => write public keys to this .dtb file
-c => add comment in signature node
-F => re-sign existing FIT image
-r => mark keys used as 'required' in dtb
./tools/mkimage -V ==> print version information and exit
Use -T to see a list of available image types
make: *** [u-boot.img] Error 1
Thanks,
Michal
---
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
More information about the U-Boot
mailing list