From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: frank-w@public-files.de, barebox@lists.infradead.org
Subject: Re: Board code with 2 dts
Date: Tue, 22 Mar 2022 18:34:45 +0100 [thread overview]
Message-ID: <2620f87b-ec79-7184-cd8a-d29c39938001@pengutronix.de> (raw)
In-Reply-To: <6FA3446D-797C-4DA1-A2FA-BAC5B213A65A@public-files.de>
Hello Frank,
On 22.03.22 18:23, Frank Wunderlich wrote:
> Hi,
>
> I get information that new hardware revision of bpi-r2 pro has some differences to the version i upstreamed. Is it possible to add a new dts and use same board code?
>
> How can i choose between the 2 dts on build (kconfig option)?
In any case, don't add a new Kconfig option. The existing one suffices.
> Afaik the name of dtb is hardcoded in lowlevel.c [1]
>
> Differences are iodomains (not defined in barebox,but linux) and gmac-config (gmacs swapped and different settings).
>
> Currently i have not yet the new board for testing,but then i want to send patches for linux and barebox.
>
> [1] https://git.pengutronix.de/cgit/barebox/tree/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c#n24
Is it possible to detect which board is being used?
If so, best practice is to have barebox the same image for both
and detect board type at runtime.
Here's an example doing it in lowlevel.c:
arch/arm/boards/stm32mp15xx-dkx/lowlevel.c
If you need more barebox infrastructure than what's available in the bootloader
to detect board type, you could e.g. rewrite gmac-config in barebox board code
after detection.
If there is no way to dynamically detect which board variant barebox is running
on, just duplicate the entry point in the same file and change just the device
tree. Then extend images/Makefile.rockchip to reference the new entry point
and barebox build will generate an image for each board. See for example:
arch/arm/boards/kontron-samx6i/lowlevel.c
Cheers,
Ahmad
> regards Frank
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2022-03-22 17:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 17:23 Frank Wunderlich
2022-03-22 17:34 ` Ahmad Fatoum [this message]
2022-03-23 7:47 ` Aw: " Frank Wunderlich
2022-03-23 8:03 ` Ahmad Fatoum
2022-04-08 11:03 ` change r2pro dts to public hw version (was "Board code with 2 dts" ) Frank Wunderlich
2022-04-08 17:00 ` Oleksij Rempel
2022-04-08 17:19 ` Frank Wunderlich
2022-04-09 8:04 ` Oleksij Rempel
2022-04-09 8:35 ` Aw: " Frank Wunderlich
2022-04-09 16:01 ` Oleksij Rempel
2022-04-09 17:08 ` Trent Piepho
2022-04-10 7:41 ` Oleksij Rempel
2022-04-10 8:28 ` Frank Wunderlich
2022-04-10 9:28 ` Trent Piepho
2022-04-10 15:00 ` Oleksij Rempel
2022-04-10 20:36 ` Trent Piepho
2022-04-11 9:00 ` Aw: " Frank Wunderlich
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=2620f87b-ec79-7184-cd8a-d29c39938001@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=frank-w@public-files.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox