From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: Graeme Smecher <gsmecher@threespeedlogic.com>
Cc: Neal Frager <neal.frager@amd.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] board/zynqmp/post-image.sh: Don't insist on a xilinx/ prefix for .dts files.
Date: Thu, 2 Feb 2023 09:21:20 +0100 [thread overview]
Message-ID: <20230202092120.319d6b00@booty> (raw)
In-Reply-To: <a8bf6373-ac4c-1872-3943-8fa9c6594ca5@threespeedlogic.com>
Hi Graeme,
On Wed, 1 Feb 2023 14:16:47 -0800
Graeme Smecher <gsmecher@threespeedlogic.com> wrote:
> Hi Luca,
>
> On 2023-02-01 13:52, Luca Ceresoli wrote:
> > Hi Graeme,
> >
> > On Wed, 1 Feb 2023 11:59:56 -0800
> > Graeme Smecher <gsmecher@threespeedlogic.com> wrote:
> >
> >> If using BR2_LINUX_KERNEL_CUSTOM_DTS_PATH to copy .dts files from
> >> buildroot into the linux tree, these .dts files are copied to
> >> arch/arm64/boot. Unfortunately, the post-image.sh script expects to find
> >> them in arch/arm64/boot/xilinx.
> >>
> >> This patch does not require the xilinx/ prefix to be present when
> >> symlinking the device-tree to system.dtb where u-boot expects to find
> >> it.
> >>
> >> Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com>
> >> ---
> >> board/zynqmp/post-image.sh | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/board/zynqmp/post-image.sh b/board/zynqmp/post-image.sh
> >> index ed6dbe188c..c5de2db820 100755
> >> --- a/board/zynqmp/post-image.sh
> >> +++ b/board/zynqmp/post-image.sh
> >> @@ -5,7 +5,7 @@
> >> # devicetree listed in the config.
> >>
> >> FIRST_DT=$(sed -nr \
> >> - -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/([-_/[:alnum:]\\.]*).*"$|\1|p' \
> >> + -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="(xilinx/)?([-_/[:alnum:]\\.]*).*"$|\2|p' \
> >
> > I think the following simpler change would also work. Can you check
> > that please?
> >
> > - -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/([-_/[:alnum:]\\.]*).*"$|\1|p' \
> > + -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="([-_/[:alnum:]\\.]*).*"$|\2|p' \
>
> Assuming you intended \1, not \2 here - this suggestion breaks behaviour for a couple of defconfigs in the tree. If I run the ZCU106 defconfig through this regexp, I get:
>
> $ cat configs/zynqmp_zcu106_defconfig | sed -nr -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="([-_/[:alnum:]\\.]*).*"$|\1|p'
> xilinx/zynqmp-zcu106-revA
>
> ...this creates a dangling symlink in output/images (system.dtb -> xilinx/zynqmp-zcu106-revA.dtb).
Right.
> The right behaviour is to strip any prefixes that exist, without requiring any. Something like:
>
> - -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/([-_/[:alnum:]\\.]*).*"$|\1|p' \
> + -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="(.*/)?([-_/[:alnum:]\\.]*).*"$|\2|p' \
>
> This is less Xilinx-specific, although it seems a tad greedy.
Yes, better keeping the xilinx prefix as this is a xilinx-specific
script anyway.
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-02-02 8:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 19:59 [Buildroot] [PATCH 1/1] board/zynqmp/post-image.sh: Don't insist on a xilinx/ prefix for .dts files Graeme Smecher
2023-02-01 21:52 ` Luca Ceresoli via buildroot
2023-02-01 22:16 ` Graeme Smecher
2023-02-02 8:21 ` Luca Ceresoli via buildroot [this message]
2023-02-02 13:40 ` Frager, Neal via buildroot
2023-02-05 12:20 ` Thomas Petazzoni via buildroot
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=20230202092120.319d6b00@booty \
--to=buildroot@buildroot.org \
--cc=gsmecher@threespeedlogic.com \
--cc=luca.ceresoli@bootlin.com \
--cc=neal.frager@amd.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