[U-Boot] How to convert imximage.cfg so it can be used in mkimage?

Winston Gao ygao88 at hotmail.com
Sun Nov 17 23:22:30 UTC 2019


Hi all,



I am trying to create a bootstrap image for iMX6 and the command mkimage fails like below:



$ mkimage -n imximage.cfg -T imximage -e 0x17000000 -d overlay_img bootstrap_img.bin
Error: imximage.cfg[1] - Invalid command(/*)



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.



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?



Thanks,

Yan



More information about the U-Boot mailing list