From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fiona Klute <fiona.klute@gmx.de>
Cc: "José Mendes" <jp.baltazar.mendes@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] board/raspberrypi: Enable nullglob for DTBs
Date: Fri, 30 Aug 2024 23:50:40 +0200 [thread overview]
Message-ID: <ZtI-sDH8r7jZVqrA@landeda> (raw)
In-Reply-To: <20240618194001.1907396-3-fiona.klute@gmx.de>
Fiona, All,
On 2024-06-18 21:40 +0200, Fiona Klute via buildroot spake thusly:
> With "nullglob" the post image script does not fail if there's no DTB
> directly in BINARIES_DIR. This is required when using DTBs from the
> rpi-firmware package (BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y),
> because in that case the kernel build doesn't provide one.
>
> Using pre-compiled DTBs is discouraged, but useful for using mainline
> kernels until suitable DTS can be merged.
>
> Signed-off-by: Fiona Klute <fiona.klute+wiwa@gmx.de>
> ---
> board/raspberrypi/post-image.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
> index e4611d05dd..b7ccf5d0b3 100755
> --- a/board/raspberrypi/post-image.sh
> +++ b/board/raspberrypi/post-image.sh
> @@ -1,6 +1,7 @@
> #!/bin/bash
>
> set -e
> +shopt -s nullglob
I'm not too fond of this. Indeed, when reading the glob itself, it is
not obvious what happens when there's no file, as the usual behaviour is
to expand with a single word where the glob character is not replaced.
Instead, I'd use the following:
for i in "${BINARIES_DIR}"/*.dtb "${BINARIES_DIR}"/rpi-firmware/*; do
[ -e "${i}" ] || continue
FILES+=( "${i#${BINARIES_DIR}/}" )
done
Regards,
Yann E. MORIN.
> BOARD_DIR="$(dirname $0)"
> BOARD_NAME="$(basename ${BOARD_DIR})"
> --
> 2.45.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-08-30 21:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 19:39 [Buildroot] [PATCH 0/2] Improvements for U-Boot on RPi boards Fiona Klute via buildroot
2024-06-18 19:40 ` [Buildroot] [PATCH 1/2] board/raspberrypi: Support boot.scr for U-Boot Fiona Klute via buildroot
2024-08-30 21:47 ` Yann E. MORIN
2024-06-18 19:40 ` [Buildroot] [PATCH 2/2] board/raspberrypi: Enable nullglob for DTBs Fiona Klute via buildroot
2024-08-30 21:50 ` Yann E. MORIN [this message]
2024-08-30 21:45 ` [Buildroot] [PATCH 0/2] Improvements for U-Boot on RPi boards Yann E. MORIN
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=ZtI-sDH8r7jZVqrA@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fiona.klute@gmx.de \
--cc=jp.baltazar.mendes@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.