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:30:16 +0100 [thread overview]
Message-ID: <5018172.GtVMANpRLO@ada> (raw)
In-Reply-To: <9264700.gJZ0UWG2d7@ada>
Hello,
Am Dienstag, 19. November 2019, 13:12:20 CET schrieb Alexander Dahl:
> > 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'?
At least I thought from the documentation, then I saw this when building
'riotboard_defconfig' from U-Boot 2016.11:
arm-v7a-linux-gnueabihf-gcc -E -Wp,-MD,board/boundary/
nitrogen6x/.nitrogen6s1g.cfg.cfgtmp.d -nostdinc -isystem /opt/
OSELAS.Toolchain-2016.06.1/arm-v7a-linux-g
nueabihf/gcc-5.4.0-glibc-2.23-binutils-2.26-kernel-4.6-sanitized/lib/gcc/arm-
v7a-linux-gnueabihf/5.4.0/include -Iinclude -I/home/adahl/Work/bsp/tt-
generic/platf
orm-v7a/build-target/u-boot-2016.11/include -I/home/adahl/Work/bsp/tt-
generic/platform-v7a/build-target/u-boot-2016.11/arch/arm/include -include /
home/adahl/Wor
k/bsp/tt-generic/platform-v7a/build-target/u-boot-2016.11/include/linux/
kconfig.h -D__KERNEL__ -D__UBOOT__ -D__ARM__ -marm -mno-thumb-interwork -
mabi=aapcs-linux
-mword-relocations -fno-pic -mno-unaligned-access -ffunction-sections -fdata-
sections -fno-common -ffixed-r9 -msoft-float -pipe -march=armv7-a -
D__LINUX_ARM_ARCH__=7 -x c -o board/boundary/nitrogen6x/
nitrogen6s1g.cfg.cfgtmp /home/adahl/Work/bsp/tt-generic/platform-v7a/build-
target/u-boot-2016.11/board/boundary/nitrogen6x/nitrogen6s1g.cfg
./tools/mkimage -n board/boundary/nitrogen6x/nitrogen6s1g.cfg.cfgtmp -T
imximage -e 0x17800000 -d u-boot.bin u-boot.imx
Image Type: Freescale IMX Boot Image
Image Ver: 2 (i.MX53/6/7 compatible)
Mode: DCD
Data Size: 442368 Bytes = 432.00 kB = 0.42 MB
Load Address: 177ff420
Entry Point: 17800000
Looks like -n behaves differently when called with '-T imximage'? However it
is quite clear from the first call how to get the appropriate file without C
comments: use the C preprocessor on the input file, this not only removes
those comments, but also resolves includes.
To just create that imximage though, you only have to configure U-Boot
correctly and it will drop out of the usual call to make without calling
mkimage manually.
A
prev parent reply other threads:[~2019-11-19 12:30 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
2019-11-19 12:30 ` Alexander Dahl [this message]
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=5018172.GtVMANpRLO@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