* [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR
@ 2026-03-09 7:51 Neal Frager via buildroot
2026-03-09 7:51 ` [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support Neal Frager via buildroot
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Neal Frager via buildroot @ 2026-03-09 7:51 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, yann.morin, brandon.maier,
fiona.klute, ju.o, Neal Frager, thomas.petazzoni, romain.naour,
michal.simek, romain.naour
Remove incorrect $BINARIES_DIR reference from the symbolic link creation to
make a relative path and not an absolute path.
Signed-off-by: Neal Frager <neal.frager@amd.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
V1->V2:
- Improved commit message
---
board/versal2/post-image.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
index 17746271e1..af50909fb1 100755
--- a/board/versal2/post-image.sh
+++ b/board/versal2/post-image.sh
@@ -3,7 +3,7 @@
# By default U-Boot loads DTB from a file named "system.dtb", and
# with versal2, the Linux DTB is the same as the U-Boot DTB, so
# let's use a symlink since the DTB is the same.
-ln -fs "${BINARIES_DIR}/u-boot.dtb" "${BINARIES_DIR}/system.dtb"
+ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
BOARD_DIR="$(dirname "$0")"
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support
2026-03-09 7:51 [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Neal Frager via buildroot
@ 2026-03-09 7:51 ` Neal Frager via buildroot
2026-03-13 22:27 ` Romain Naour via buildroot
2026-03-13 22:00 ` [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Romain Naour via buildroot
2026-03-20 15:54 ` Thomas Perale via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Neal Frager via buildroot @ 2026-03-09 7:51 UTC (permalink / raw)
To: buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, yann.morin, brandon.maier,
fiona.klute, ju.o, Neal Frager, thomas.petazzoni, romain.naour,
michal.simek, romain.naour
Users will ultimately need the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR config to
import custom dts files for custom versal2 hardware. Improve the post-image.sh
to support either the default device tree which comes from u-boot or a
custom device tree for custom hardware.
To keep the example post-image script as simple as possible, it assumes that
the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
filename that u-boot will use for booting. Users are free to implement their
own post-image scripts for use cases with multiple DTBs.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- new to patch series
---
board/versal2/post-image.sh | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
index af50909fb1..dbef33db28 100755
--- a/board/versal2/post-image.sh
+++ b/board/versal2/post-image.sh
@@ -1,9 +1,17 @@
#!/bin/sh
-# By default U-Boot loads DTB from a file named "system.dtb", and
-# with versal2, the Linux DTB is the same as the U-Boot DTB, so
-# let's use a symlink since the DTB is the same.
-ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
+# By default U-Boot loads DTB from a file named "system.dtb".
+# With versal2, there is no default dts in the Linux kernel tree
+# because the default is the same as the u-boot.dtb. This means
+# it is necessary to cover two cases, a custom dts or the default.
+# The BR2_LINUX_KERNEL_DTS_SUPPORT will only be set for custom dts
+# files, so it can be used for checking which case is configured.
+if grep -Eq "^BR2_LINUX_KERNEL_DTS_SUPPORT=y$" "${BR2_CONFIG}"; then
+ LINUX_DTBS="$(make --no-print-directory VARS=LINUX_DTBS printvars)"
+ ln -fs "$(basename ${LINUX_DTBS%% *})" "${BINARIES_DIR}/system.dtb"
+else
+ ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
+fi
BOARD_DIR="$(dirname "$0")"
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR
2026-03-09 7:51 [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Neal Frager via buildroot
2026-03-09 7:51 ` [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support Neal Frager via buildroot
@ 2026-03-13 22:00 ` Romain Naour via buildroot
2026-03-20 15:54 ` Thomas Perale via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Romain Naour via buildroot @ 2026-03-13 22:00 UTC (permalink / raw)
To: Neal Frager, buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, yann.morin, brandon.maier,
ju.o, thomas.petazzoni, romain.naour, michal.simek, fiona.klute
Hello Neal, All,
Le 09/03/2026 à 08:51, Neal Frager a écrit :
> Remove incorrect $BINARIES_DIR reference from the symbolic link creation to
> make a relative path and not an absolute path.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Applied to master, thanks.
Best regards,
Romain
> ---
> V1->V2:
> - Improved commit message
> ---
> board/versal2/post-image.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
> index 17746271e1..af50909fb1 100755
> --- a/board/versal2/post-image.sh
> +++ b/board/versal2/post-image.sh
> @@ -3,7 +3,7 @@
> # By default U-Boot loads DTB from a file named "system.dtb", and
> # with versal2, the Linux DTB is the same as the U-Boot DTB, so
> # let's use a symlink since the DTB is the same.
> -ln -fs "${BINARIES_DIR}/u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
>
> BOARD_DIR="$(dirname "$0")"
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support
2026-03-09 7:51 ` [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support Neal Frager via buildroot
@ 2026-03-13 22:27 ` Romain Naour via buildroot
2026-03-15 15:26 ` Frager, Neal via buildroot
0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour via buildroot @ 2026-03-13 22:27 UTC (permalink / raw)
To: Neal Frager, buildroot
Cc: ibai.erkiaga-elorza, luca.ceresoli, yann.morin, brandon.maier,
ju.o, thomas.petazzoni, romain.naour, michal.simek, fiona.klute
Hello Neal, All,
Le 09/03/2026 à 08:51, Neal Frager a écrit :
> Users will ultimately need the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR config to
> import custom dts files for custom versal2 hardware. Improve the post-image.sh
> to support either the default device tree which comes from u-boot or a
> custom device tree for custom hardware.
>
> To keep the example post-image script as simple as possible, it assumes that
> the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
> filename that u-boot will use for booting. Users are free to implement their
> own post-image scripts for use cases with multiple DTBs.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
> - new to patch series
> ---
> board/versal2/post-image.sh | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
> index af50909fb1..dbef33db28 100755
> --- a/board/versal2/post-image.sh
> +++ b/board/versal2/post-image.sh
> @@ -1,9 +1,17 @@
> #!/bin/sh
>
> -# By default U-Boot loads DTB from a file named "system.dtb", and
> -# with versal2, the Linux DTB is the same as the U-Boot DTB, so
> -# let's use a symlink since the DTB is the same.
> -ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +# By default U-Boot loads DTB from a file named "system.dtb".
> +# With versal2, there is no default dts in the Linux kernel tree
> +# because the default is the same as the u-boot.dtb. This means
> +# it is necessary to cover two cases, a custom dts or the default.
> +# The BR2_LINUX_KERNEL_DTS_SUPPORT will only be set for custom dts
> +# files, so it can be used for checking which case is configured.
> +if grep -Eq "^BR2_LINUX_KERNEL_DTS_SUPPORT=y$" "${BR2_CONFIG}"; then
> + LINUX_DTBS="$(make --no-print-directory VARS=LINUX_DTBS printvars)"
> + ln -fs "$(basename ${LINUX_DTBS%% *})" "${BINARIES_DIR}/system.dtb"
This trigger a shellsheck warning, can you double check?
I'm not sure about this change, LINUX_DTBS may also contain a dtbo.
What happen if a devicetree overlay is built?
Best regards,
Romain
> +else
> + ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +fi
>
> BOARD_DIR="$(dirname "$0")"
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support
2026-03-13 22:27 ` Romain Naour via buildroot
@ 2026-03-15 15:26 ` Frager, Neal via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Frager, Neal via buildroot @ 2026-03-15 15:26 UTC (permalink / raw)
To: Romain Naour, buildroot@buildroot.org
Cc: Erkiaga Elorza, Ibai, luca.ceresoli@bootlin.com,
yann.morin@orange.com, brandon.maier@collins.com, ju.o@free.fr,
thomas.petazzoni@bootlin.com, romain.naour@gmail.com,
Simek, Michal, fiona.klute@gmx.de
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Romain,
> Users will ultimately need the BR2_LINUX_KERNEL_CUSTOM_DTS_DIR config to
> import custom dts files for custom versal2 hardware. Improve the post-image.sh
> to support either the default device tree which comes from u-boot or a
> custom device tree for custom hardware.
>
> To keep the example post-image script as simple as possible, it assumes that
> the first DTB in the LINUX_DTBS list is the one for creating the system.dtb
> filename that u-boot will use for booting. Users are free to implement their
> own post-image scripts for use cases with multiple DTBs.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
> V1->V2:
> - new to patch series
> ---
> board/versal2/post-image.sh | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
> index af50909fb1..dbef33db28 100755
> --- a/board/versal2/post-image.sh
> +++ b/board/versal2/post-image.sh
> @@ -1,9 +1,17 @@
> #!/bin/sh
>
> -# By default U-Boot loads DTB from a file named "system.dtb", and
> -# with versal2, the Linux DTB is the same as the U-Boot DTB, so
> -# let's use a symlink since the DTB is the same.
> -ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +# By default U-Boot loads DTB from a file named "system.dtb".
> +# With versal2, there is no default dts in the Linux kernel tree
> +# because the default is the same as the u-boot.dtb. This means
> +# it is necessary to cover two cases, a custom dts or the default.
> +# The BR2_LINUX_KERNEL_DTS_SUPPORT will only be set for custom dts
> +# files, so it can be used for checking which case is configured.
> +if grep -Eq "^BR2_LINUX_KERNEL_DTS_SUPPORT=y$" "${BR2_CONFIG}"; then
> + LINUX_DTBS="$(make --no-print-directory VARS=LINUX_DTBS printvars)"
> + ln -fs "$(basename ${LINUX_DTBS%% *})" "${BINARIES_DIR}/system.dtb"
> This trigger a shellsheck warning, can you double check?
I fixed the shellcheck issue and will submit a new version. Thanks for
catching that!
> I'm not sure about this change, LINUX_DTBS may also contain a dtbo.
> What happen if a devicetree overlay is built?
Yes, I thought about the dtbo issue with LINUX_DTBS, but I am not sure how to
handle it. I can imagine users may want to apply the overlay immediately and
build a system.dtb that includes their dtb with the dtbo included. I can also
see the use case of wanting to put the dtbo in the target file system, such
that it can be loaded and unloaded at run-time.
Since I do not want to assume how the user may want to load additional dtbs
or overlays, I thought it was best to keep the solution as simple as possible.
In other words, the solution will assume that the first dtb in LINUX_DTBS will
be used for the system.dtb for booting. It is then up to the user how they
wish to load additional dtbs or overlays after boot.
Best regards,
Neal Frager
AMD
> +else
> + ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +fi
>
> BOARD_DIR="$(dirname "$0")"
>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR
2026-03-09 7:51 [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Neal Frager via buildroot
2026-03-09 7:51 ` [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support Neal Frager via buildroot
2026-03-13 22:00 ` [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Romain Naour via buildroot
@ 2026-03-20 15:54 ` Thomas Perale via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Perale via buildroot @ 2026-03-20 15:54 UTC (permalink / raw)
To: Neal Frager; +Cc: Thomas Perale, buildroot
In reply of:
> Remove incorrect $BINARIES_DIR reference from the symbolic link creation to
> make a relative path and not an absolute path.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Applied to 2026.02.x. Thanks
> ---
> V1->V2:
> - Improved commit message
> ---
> board/versal2/post-image.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/versal2/post-image.sh b/board/versal2/post-image.sh
> index 17746271e1..af50909fb1 100755
> --- a/board/versal2/post-image.sh
> +++ b/board/versal2/post-image.sh
> @@ -3,7 +3,7 @@
> # By default U-Boot loads DTB from a file named "system.dtb", and
> # with versal2, the Linux DTB is the same as the U-Boot DTB, so
> # let's use a symlink since the DTB is the same.
> -ln -fs "${BINARIES_DIR}/u-boot.dtb" "${BINARIES_DIR}/system.dtb"
> +ln -fs "u-boot.dtb" "${BINARIES_DIR}/system.dtb"
>
> BOARD_DIR="$(dirname "$0")"
>
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-20 15:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 7:51 [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Neal Frager via buildroot
2026-03-09 7:51 ` [Buildroot] [PATCH v2 2/2] board/versal2/post-image.sh: add custom hardware support Neal Frager via buildroot
2026-03-13 22:27 ` Romain Naour via buildroot
2026-03-15 15:26 ` Frager, Neal via buildroot
2026-03-13 22:00 ` [Buildroot] [PATCH v2 1/2] board/versal2/post-image.sh: remove incorrect $BINARIES_DIR Romain Naour via buildroot
2026-03-20 15:54 ` Thomas Perale via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox