diff mbox series

[next,v2,2/3] board/raspberrypi: allow non-matching globs for DTBs

Message ID 20240831190126.366600-3-fiona.klute@gmx.de
State New
Headers show
Series U-Boot on RPi boards | expand

Commit Message

Fiona Klute Aug. 31, 2024, 7:01 p.m. UTC
From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

When installing DTBs from the rpi-firmware package
(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y), there's no DTB directly in
the images directory because 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, or to provide U-Boot with a
DTB (via the firmware bootloader) independent of whatever kernel DTB
is in use.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
Changes v1 -> v2:
* Check for existance of paths returned by the DTB glob expressions
  instead of changing shell glob behavior

 board/raspberrypi/post-image.sh | 2 ++
 1 file changed, 2 insertions(+)

--
2.45.2
diff mbox series

Patch

diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
index e4611d05dd..a3a2d8d620 100755
--- a/board/raspberrypi/post-image.sh
+++ b/board/raspberrypi/post-image.sh
@@ -13,6 +13,8 @@  if [ ! -e "${GENIMAGE_CFG}" ]; then
 	FILES=()

 	for i in "${BINARIES_DIR}"/*.dtb "${BINARIES_DIR}"/rpi-firmware/*; do
+		# ignore literal globs that didn't match anything
+		[ -e "${i}" ] || continue
 		FILES+=( "${i#${BINARIES_DIR}/}" )
 	done