mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <>
To: Michael Riesch <>
Cc: Barebox List <>
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: <> (raw)
In-Reply-To: <>

On Tue, Jun 29, 2021 at 5:32 AM Michael Riesch
<> 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:

global of.overlay.filepattern="${global.of.overlay.filepattern}

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

  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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \
    --subject='Re: [RFC PATCH 2/2] arm: rockchip-rk3568-evb: apply dt overlay for evb7' \

* 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