From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "Michał Kruszewski" <mkru@protonmail.com>,
"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: Re: Compiling barebox without PBL and using dts from Linux dts upstream for Zynq SoC
Date: Thu, 26 Mar 2026 09:19:28 +0100 [thread overview]
Message-ID: <be11f271-1d48-4db4-b06e-f3862264105f@pengutronix.de> (raw)
In-Reply-To: <mO0lDEdknvuZ-6R4RSHJePbDBcwiBmMAZB_d_sZMBEWJKoRltrWPiQqPxiF3Pukxv8_JAhFxG7-RFL5VUbOnDpwOEJ2_HkmE7lfSVEFA5bs=@protonmail.com>
Hello Michał,
Cc += Alexander, who worked on other MYIR boards in the past.
On 3/26/26 08:29, Michał Kruszewski wrote:
> Hello,
>
> I try to boot Linux using barebox on the MYiR Z-turn board (Xilinx Zynq SoC).
> I have generated the default configuration using `make zynq_defconfig`.
> After compiling and trying to boot nothing works.
Do you use upstream or a fork? There seems to be no Z-turn board support
upstream. barebox can generate multiple images in a build, which image did
you use?
> I am not surprised at all.
> I started digging, and here are a few things that are not clear to me.
>
> Issue number one.
> Barebox consists of 2 bootloaders, the Pre-BootLoader (PBL) and Second-Stage BootLoader (SSBL).
The Pre-Bootloader is not necessarily the first stage, we prefer the terms
PBL and barebox proper.
> However, in my case I use the First Stage BootLoader (FSBL) compiled by Vitis.
> The FSBL does all the required hardware initialization.
> In such a case, the PBL is superfluous.
Every barebox image on ARM has a prebootloader prepended that:
- decompresses barebox proper
- loads it and configures the MMU
- executes it while passing a device tree
The PBL may have extra functions as well like setting up DRAM, but at the very
least it's required to load barebox.
In general, PBLs have extra logic to detect if they are loaded second-stage
(e.g. from barebox itself for development) and in that case skip redoing
one-time initialization.
> I would like to disable it.
The PBL in your case is linked into the final barebox image and they are
meant to be used together.
> However, I can't disable PBL_IMAGE in menuconfig, it is forced to Y.
> It is selected by PBL_MULTI_IMAGES [=y] && HAVE_PBL_MULTI_IMAGES [=y].
> Moreover, I can't disable HAVE_PBL_MULTI_IMAGES, it is forced to Y by selecting ARM.
> Disabling ARM of course makes no sense.
> Is it even possible to configure barebox as a SSBL-only for the Zynq SoC?
> How to achieve this?
I am looking at start_avnet_zedboard() and at the start of
avnet_zedboard_ps7_init(), it skips the low level init if started
second stage, which is what you seem to be after?
> The second issues is that the MYiR Z-turn board is not supported directly by barebox.
> However, there is a valid dts description in the dts directory (Linux upstream device tree directory).
> How can I tell barebox to use a dts from the Linux dts upstream directory?
> I looked for some config in menuconfig but without success.
For quick testing, you can replace in arch/arm/dts/zynq-zed.dts
#include <arm/xilinx/zynq-zed.dts>
with your own board. Check that the stdout-path is correct.
Once you got that working, proper board support entails adding a new
DT in arch/arm/dts/, creating a new directory in arch/arm/boards/
and adding the new image to images/Makefile.zynq as well as the
Kconfig/Kbuild additions. For details, see:
https://www.barebox.org/doc/latest/devel/porting.html#porting-to-a-new-board
> The third issue is that I can't compile dts in the dts directory.
> The make help message says:
>> src/<ARCH>/<DTS>.dtb Build a single device tree binary
> However, when I try I get:
> [user@host] make src/arm/xilinx/zynq-zturn-v5.dtb
> DTC src/arm/xilinx/zynq-zturn-v5.dtb
> /bin/sh: 1: -Wp,-MD,src/arm/xilinx/.zynq-zturn-v5.dtb.d.pre.tmp: not found
> make: *** [Makefile:148: src/arm/xilinx/zynq-zturn-v5.dtb] Error 127
> Of course the ARCH and CROSS_COMPILE are exported.
dts/ are just the device trees as they are in Linux. You can only build
device tree in arch/${ARCH/dts/.
You can read more about barebox device tree handling at:
https://www.barebox.org/doc/latest/devicetree/index.html
Hope this helps.
Cheers,
Ahmad
>
> Regards,
> Michał Kruszewski
>
>
>
>
--
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 |
next prev parent reply other threads:[~2026-03-26 8:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 7:29 Michał Kruszewski
2026-03-26 8:19 ` Ahmad Fatoum [this message]
2026-03-26 9:06 ` Michał Kruszewski
2026-03-26 9:28 ` Ahmad Fatoum
2026-03-26 10:35 ` Michał Kruszewski
2026-03-26 14:07 ` Ahmad Fatoum
2026-03-27 10:37 ` Michał Kruszewski
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=be11f271-1d48-4db4-b06e-f3862264105f@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=eagle.alexander923@gmail.com \
--cc=mkru@protonmail.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