mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@wolfvision.net>
To: Trent Piepho <trent.piepho@igorinstitute.com>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [RFC PATCH 2/2] arm: rockchip-rk3568-evb: apply dt overlay for evb7
Date: Wed, 30 Jun 2021 11:18:55 +0200	[thread overview]
Message-ID: <777bb53c-2e00-8455-ccc5-450d1748c096@wolfvision.net> (raw)
In-Reply-To: <CAMHeXxOxXLKQWnhQ2Z++Gou=+XVm1jL+U1kGGWm7zzZByEV6UQ@mail.gmail.com>

Hello Trent,

Thanks for your comments, much appreciated!

On 6/29/21 11:58 PM, Trent Piepho wrote:
> On Tue, Jun 29, 2021 at 5:32 AM Michael Riesch
> <michael.riesch@wolfvision.net> wrote:
>> @@ -63,6 +64,9 @@ static int rk3568_evb_detect_version(void)
>>                 evb_hw_id = 6;
>>         } else {
>>                 evb_hw_id = 7;
>> +               setenv("global.of.overlay.dir", "boot");
> 
> Hardcoding the location of boot files in the rootfs into board code
> doesn't seem right to me.
> 
> Seems like either creating a nv/global.of.overlay.dir file in the
> default env for the board or creating an init script that sets that
> variable would be the way to set this.

Right, this approach seems to be more flexible.

>> +               setenv("global.of.overlay.filepattern",
>> +                      "rk3568-evb7-overlay.dtb*");
> 
> What if one had a board magicvar, something like:
> 
> globalvar_add_simple("board.variant", "rk3568-evb7");  // Or just evb7
> if rk3568 is already somewhere else
> BAREBOX_MAGICVAR(global.board.variant, "The board variant");
> 
> Then an init script could easily construct the overlay:
> 
> env/init/board-overlay:
> global of.overlay.filepattern="${global.of.overlay.filepattern}
> ${global.board.variant}-overlay.dtbo"
> 
> Since every overlay file is added to the same variable, some care
> needs to be taken to ensure different initscripts work together.  Thus
> the append in the above script.

Thanks for the hint, I think I'll go along this direction.

Regards, Michael

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


      reply	other threads:[~2021-06-30  9:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 12:31 [RFC PATCH 0/2] Proof of concept device tree overlays Michael Riesch
2021-06-29 12:31 ` [RFC PATCH 1/2] arm: rockchip-rk3568-evb: add hardware id detection Michael Riesch
2021-06-30 10:17   ` Ahmad Fatoum
2021-07-01  7:19     ` Michael Riesch
2021-07-03 20:49     ` Sascha Hauer
2021-06-29 12:31 ` [RFC PATCH 2/2] arm: rockchip-rk3568-evb: apply dt overlay for evb7 Michael Riesch
2021-06-29 21:58   ` Trent Piepho
2021-06-30  9:18     ` Michael Riesch [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=777bb53c-2e00-8455-ccc5-450d1748c096@wolfvision.net \
    --to=michael.riesch@wolfvision.net \
    --cc=barebox@lists.infradead.org \
    --cc=trent.piepho@igorinstitute.com \
    /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