From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Roland Stigge <stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
Cc: devicetree-discuss
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: uImage with integrated dtb file
Date: Mon, 26 Mar 2012 09:06:02 -0600 [thread overview]
Message-ID: <4F7085DA.6030402@wwwdotorg.org> (raw)
In-Reply-To: <4F6E5D5B.8050306-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
On 03/24/2012 05:48 PM, Roland Stigge wrote:
> Hi,
>
> since I will need to maintain some machines with DT enabled kernels but
> containing a U-Boot without DT support, I sometimes need to integrate a
> dtb file into uImage.
>
> I'm sure others have got the same issue. But searching for a while I
> only got older/meanwhile neglected approaches like:
>
> git://kernel.ubuntu.com/jk/dt/linux-2.6.git - branch: dtbimage
>
> I'm currently using a simple hack like attached below.
...
> --- a/arch/arm/boot/Makefile
...
> quiet_cmd_uimage = UIMAGE $@
> - cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
> + cmd_uimage = cat $< arch/arm/boot/*.dtb > $<.tmp ; \
That won't work well when multiple .dtb files are built. That's
certainly common for Tegra, and probably most subarchs.
The concatenation should be optional; people not using
CONFIG_APPENDED_DTB (hopefully the majority) wouldn't want this for example.
Please be aware of:
https://lkml.org/lkml/2012/3/16/450
Kbuild: centralize MKIMAGE and cmd_uimage definitions
I believe previous discussion around this topic has resolved into people
not wanting to make CONFIG_APPENDED_DTB to easy to use, so that people
who don't need to use it won't be tempted to just use it instead of
explicit FDT support in bootloaders. For example, see:
https://lkml.org/lkml/2011/8/2/200
Build a uImage with dtb already appended
... which Grant has specifically stated he didn't want applied upstream
for the reason I mention above.
> + $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
> -C none -a $(LOADADDR) -e $(STARTADDR) \
> - -n 'Linux-$(KERNELRELEASE)' -d $< $@
> + -n 'Linux-$(KERNELRELEASE)' -d $<.tmp $@ ; \
> + rm -f $<.tmp
next parent reply other threads:[~2012-03-26 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F6E5D5B.8050306@antcom.de>
[not found] ` <4F6E5D5B.8050306-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
2012-03-26 15:06 ` Stephen Warren [this message]
2012-03-26 16:48 ` uImage with integrated dtb file Roland Stigge
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=4F7085DA.6030402@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).