Compiling barebox without PBL and using dts from Linux dts upstream for Zynq SoC
Michał Kruszewski
mkru at protonmail.com
Thu Mar 26 03:35:32 PDT 2026
> A zynq_defconfig build will report at the end the generated images:
>
> images built:
> barebox-avnet-zedboard.img
> barebox-dt-2nd.img
> Is images/barebox-avnet-zedboard.img the image you used?
All I did was:
make zynq_defconfig
make
I used neither images/barebox-avnet-zedboard.img nor images/barebox-dt-2nd.img.
I used barebox file.
Why?
Because I use Vivado bootbin progam to generate the boot.bin file.
bootbin requires that the second stage bootloader is provided in the ELF format.
When I use u-boot.elf everything works correctly.
> This is the line that does it for the Zynq Zedboard:
> barebox_arm_entry(0, SZ_512M, __dtb_z_zynq_zed_start);
> This function takes care to extract barebox and invoke it
> with these arguments.
So the compiled device tree is placed into the final image, isn't it?
> barebox generates bootloader images for boards, so you must have
> either used an image for an existing board or some intermediate build
> artifact, hence my question above.
What is an "intermediate build artifact"?
How to use it instead a board image?
> I am asking to clarify what you did. Your original email didn't
> elaborate what you did, only what you thought was the problem.
All I did was:
make zynq_defconfig
make
I used the generated barebox elf file for Vivado bootbin.
I replaced u-boot.elf with barebox.
I did not expect the Linux to start.
However, I did expect the barebox to start.
> Yes, of course. Just add a new ENTRY_FUNCTION(_WITHSTACK) that does
> only the parts you are interested in and reference it in
> images/Makefile.zynq.
Is there any tutorial/documentation on that?
I thought that maybe there is a simple CONFIG for that.
Regards,
Michał Kruszewski
More information about the barebox
mailing list