All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] /chosen node not overwritten by bootm
Date: Mon, 06 Oct 2008 08:49:19 -0400	[thread overview]
Message-ID: <48EA094F.2000708@ge.com> (raw)
In-Reply-To: <48DCDFDF.70106@ge.com>

Jerry Van Baren wrote:
> Stefan Roese wrote:
>> Hi Jerry,
>>
>> Again I (and Wolfgang) stumbled about the problem, that the /chosen node is 
>> not overwritten by the bootm command when it already exists. This is really 
>> annoying, since we either:
>>
>> a) Have to remove the chosen node from the dts files (which is not so easy
>>    if we try to stay in sync with the kernel.org version)
>>
>> or
>>
>> b) Have to manually use the U-Boot "fdt" commands to overwrite the chosen node
>>
>> I can't remember why this current behavior is implemented this way. Jerry, 
>> can't we just overwrite this node even if it already exists? What would we 
>> loose by doing this?
>>
>> Thanks.
>>
>> Best regards,
>> Stefan
> 
> Hi Stefan,
> 
> The behavior was to mimic the behavior of the non-LIBFDT original 
> implementation (and because we thought it was a good idea at the time). 
>   We originally assumed that the .dts file writer had more/better 
> knowledge of the system than we did (which was true at the time).  This 
> was aggravated by the conundrum that the original FDT support didn't do 
> a good job of generating the /chosen properties (some were, some 
> weren't), so the .dts writers /had to/ pre-init some /chosen values. 
> The /aliases node also helped - configuration choices that use to be 
> implicit in the .dts /chosen node are now in /aliases (major improvement!).
> 
> I thought we turned on the "force" flag so that the /chosen properties 
> would be overwritten, apparently I'm mistaken.
> 
> I'm fine with overwriting the /chosen node and properties.  Generate a 
> patch and I'll be happy to ack it.
> 
> (Note to self: maybe it is time to retire the "force" flag - it always 
> made me uncomfortable and is confusing.  Is there anything left that we 
> *don't* want to force?)
> 
> Best regards,
> gvb

Hi Stefan, Wolfgang, Kumar,

I was messing with Kumar's bootm split-up changeset and it reminded me 
of a major reason that I did not do a "force" on creating the /chosen 
node: it was so that a FDT blob user could use "fdt chosen" to create 
the /chosen node, post-modify it (which is what Kumar needs to do as I 
understand it), and then run bootm.  In this situation, bootm *won't* 
touch /chosen and thus won't undo the extra modifications that the user 
(boot script) did.

Question for Kumar: Am I understanding your problem correctly?  Would 
keeping the /chosen node generation unchanged (no "force") work for you 
short term?

Long term I believe we want to eliminate the "force" parameter entirely 
(disclaimer: I need to look at the impact) and want to break bootm up 
into subcommand a'la Kumar's changeset.

Note to Stefan: I don't know how your boot script is set up, but if you 
prefix it with "fdt rm /chosen", I think it will do what you want it to 
do - remove legacy .dts generated /chosen nodes so it doesn't prevent 
bootm/libfdt from generating the /chosen node.  If the "/chosen" node 
doesn't exist, it will print an error (I believe) but otherwise be OK.

Best regards,
gvb

      reply	other threads:[~2008-10-06 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-26 12:56 [U-Boot] /chosen node not overwritten by bootm Stefan Roese
2008-09-26 13:13 ` Jerry Van Baren
2008-10-06 12:49   ` Jerry Van Baren [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=48EA094F.2000708@ge.com \
    --to=gerald.vanbaren@ge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.