[U-Boot] How to convert imximage.cfg so it can be used in mkimage?
Alexander Dahl
ada at thorsis.com
Tue Nov 19 12:12:20 UTC 2019
Hei hei,
Am Sonntag, 17. November 2019, 23:22:30 CET schrieb Winston Gao:
> I am trying to create a bootstrap image for iMX6 and the command mkimage
> fails like below:
mkimage as you call it for a legacy image takes a binary file and puts a
special 64 byte header in front of it. This way U-Boot can load it at runtime
or you can load it from U-Boot commandline.
> $ mkimage -n imximage.cfg -T imximage -e 0x17000000 -d overlay_img
> bootstrap_img.bin Error: imximage.cfg[1] - Invalid command(/*)
What's the content of that 'overlay_img' file?
Besides: I would not name the resulting file .bin but .uimg to see it's a U-
Boot image "container" file.
> Further investigation shows that the error is caused by that there is c-type
> comments (/*...*/) in imximage.cfg file. When I remove all the c-type
> comments in the file, it works fine.
Well, -n sets a name in the image header. I guess you have those '/*...*/' in
your file 'overlay_img'?
> u-boot document does say that imximage.cfg accept comment line starting with
> '#' in the file. However, that file, which is coming together with u-boot
> source has c-type comments. I am thinking the file is involved in some
> u-boot compiling. How to convert that file to remove all the c-type
> comments automatically so it can be used in mkimage command?
Recent U-Boot source tree has over 30 files named 'imximage.cfg', which one do
you refer to?
Kind regards
Alex
More information about the U-Boot
mailing list