public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] How to convert imximage.cfg so it can be used in mkimage?
Date: Tue, 19 Nov 2019 13:12:20 +0100	[thread overview]
Message-ID: <9264700.gJZ0UWG2d7@ada> (raw)
In-Reply-To: <BYAPR05MB5703EE1A13C4EF2EB49D5D2FDF720@BYAPR05MB5703.namprd05.prod.outlook.com>

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

  reply	other threads:[~2019-11-19 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 23:22 [U-Boot] How to convert imximage.cfg so it can be used in mkimage? Winston Gao
2019-11-19 12:12 ` Alexander Dahl [this message]
2019-11-19 12:30   ` Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9264700.gJZ0UWG2d7@ada \
    --to=ada@thorsis.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox