mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <trent.piepho@igorinstitute.com>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [RFC PATCH 2/2] arm: rockchip-rk3568-evb: apply dt overlay for evb7
Date: Tue, 29 Jun 2021 14:58:26 -0700	[thread overview]
Message-ID: <CAMHeXxOxXLKQWnhQ2Z++Gou=+XVm1jL+U1kGGWm7zzZByEV6UQ@mail.gmail.com> (raw)
In-Reply-To: <20210629123104.13818-3-michael.riesch@wolfvision.net>

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.

> +               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.

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


  reply	other threads:[~2021-06-29 22:00 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 [this message]
2021-06-30  9:18     ` Michael Riesch

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='CAMHeXxOxXLKQWnhQ2Z++Gou=+XVm1jL+U1kGGWm7zzZByEV6UQ@mail.gmail.com' \
    --to=trent.piepho@igorinstitute.com \
    --cc=barebox@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --subject='Re: [RFC PATCH 2/2] arm: rockchip-rk3568-evb: apply dt overlay for evb7' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox