From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marcel Hamer <marcel@solidxs.nl>
Cc: barebox@lists.infradead.org
Subject: Re: Kernel device tree gets modified with bootm command when CONFIG_OFDEVICE is enabled
Date: Fri, 6 Oct 2017 06:11:53 +0200 [thread overview]
Message-ID: <20171006041153.xgrjynzwido3mjfj@pengutronix.de> (raw)
In-Reply-To: <6f652c2e-d971-052d-8e96-3ae7ad984500@solidxs.nl>
Hi Marcel,
On Tue, Oct 03, 2017 at 11:36:49AM +0200, Marcel Hamer wrote:
> Hello,
>
> When passing a custom device tree to the kernel using the 'bootm' command I
> see the device tree gets 'fixed up' when the CONFIG_OFDEVICE option is
> enabled. Probably this should not be the case when the dtb is passed to the
> kernel?
>
> This happens on line common/bootm.c:395:
>
> oftree = of_get_fixed_tree(data->of_root_node);
>
> Should this not be changed to:
>
> oftree = of_flatten_db(data->of_root_node);
No. Getting the fixed up tree is exactly what we want here. There are
some cases in which it's absolutely mandatory to use the fixed tree
(memory banks, they are oftem empty in the Linux provided dts files)
and other in which is convenient (mtd, to make sure the kernel sees the
same partitions as the bootloader).
There might be some cases where we want to have more control over which
fixups run and which don't, but generally we want to have the fixed tree
here.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-10-06 4:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 9:36 Marcel Hamer
2017-10-06 4:11 ` Sascha Hauer [this message]
2017-10-06 7:45 ` Marcel Hamer
2017-10-06 9:55 ` Ian Abbott
2017-10-06 10:28 ` Marcel Hamer
2017-10-06 11:04 ` gianluca
2017-10-06 12:00 ` Marcel Hamer
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=20171006041153.xgrjynzwido3mjfj@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=marcel@solidxs.nl \
/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