mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Pascal Vizeli <pascal.vizeli@syshack.ch>
To: "Baeuerle, Florian" <Florian.Baeuerle@allegion.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Modifying device-tree: /chosen
Date: Wed, 23 May 2018 14:55:27 +0200	[thread overview]
Message-ID: <CACvFaDd+Wfa0LYnYeCo+bLnMK2O8NBdpmj9cGtEJKFjUMxk9pw@mail.gmail.com> (raw)
In-Reply-To: <7b0617ad32db44235a2f7efbe19b31e802a9493b.camel@allegion.com>

Maybe we can also include the:
http://lists.infradead.org/pipermail/barebox/2015-March/022708.html

It would be nice to use feature like this to modify the device tree
before we boot the kernel.

Pascal

2018-05-23 12:59 GMT+02:00 Baeuerle, Florian <Florian.Baeuerle@allegion.com>:
> Hi,
>
> I haven't found a (good) way to modify the kernel device tree before booting
> when using the bootchooser in combination with blspec.  What seems to be done
> quite often is registering fixup functions (of_register_fixup) in board-specific
> code.
>
> I'd prefer not patch board-specific code, because my use case is rather specific
> (passing the device serial number, the bootloader version, and a few other
> things to the kernel). So the question is, if this use case is common enough to
> provide a more generic way.
>
> My proposal is providing a command like this:
>
> of_fixup_chosen [PROPERTY] [VALUE]
>
> I guess it would suffice to only store strings in /chosen.
>
> Example:
> of_fixup_chosen bootloader-version $global.version
> of_fixup_chosen reset-reason $global.system.reset
> of_fixup_chosen serial $serial_number
>
>
> I'm open for other suggestions, as this could also be implementend in a more
> generic (and also more complex) way by allowing to fix up random nodes and
> properties throughout the device tree.
>
>
> Best Regards
> Florian
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-05-23 12:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 10:59 Baeuerle, Florian
2018-05-23 12:55 ` Pascal Vizeli [this message]
2018-05-23 13:30 ` Sascha Hauer
     [not found]   ` <e77f7ef6c9ab77ca5fb2cdee4125efa6c9ae8fd2.camel@allegion.com>
     [not found]     ` <20180524082047.44njsmnrvpxyar27@pengutronix.de>
2018-05-24 14:12       ` Baeuerle, Florian

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=CACvFaDd+Wfa0LYnYeCo+bLnMK2O8NBdpmj9cGtEJKFjUMxk9pw@mail.gmail.com \
    --to=pascal.vizeli@syshack.ch \
    --cc=Florian.Baeuerle@allegion.com \
    --cc=barebox@lists.infradead.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