Skip to contentSkip to conversation

board/zynq: fix shellcheck issues

PATCH In review Neal Frager via buildroot 2 participants 3 messages Jun 6, 2023 – Jun 14, 2023 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/zynq: fix shellcheck issues

This patch cleans up board/zynq shellcheck issues.

---
 .checkpackageignore      | 2 --
 board/zynq/post-build.sh | 4 ++--
 board/zynq/post-image.sh | 8 ++++----
 3 files changed, 6 insertions(+), 8 deletions(-)
.checkpackageignore +0 -2
index 10e70f0787..90a1481e54 100644
@@ -101,8 +101,6 @@ board/udoo/common/post-build.sh Shellcheck
 board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch Upstream
 board/versal/post-build.sh Shellcheck
 board/versal/post-image.sh Shellcheck TrailingSpace
-board/zynq/post-build.sh Shellcheck
-board/zynq/post-image.sh Shellcheck
 board/zynqmp/kria/kv260/kv260.sh Shellcheck
 board/zynqmp/kria/patches/uboot/v1-0001-makefile-add-multi_dtb_fit-dep.patch ApplyOrder Upstream
 board/zynqmp/post-build.sh Shellcheck
board/zynq/post-build.sh +2 -2
index 9fd8bbf2c8..7cec673e4b 100755
@@ -3,6 +3,6 @@
 # genimage will need to find the extlinux.conf
 # in the binaries directory
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$BINARIES_DIR"/extlinux.conf
board/zynq/post-image.sh +4 -4
index ac74286cf6..d4553beccf 100755
@@ -6,10 +6,10 @@
 
 FIRST_DT=$(sed -n \
            's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \
-           ${BR2_CONFIG})
+           "${BR2_CONFIG}")
 
-[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/system.dtb
+[ -z "${FIRST_DT}" ] || ln -fs "${FIRST_DT}".dtb "${BINARIES_DIR}"/system.dtb
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-support/scripts/genimage.sh -c $BOARD_DIR/genimage.cfg
+support/scripts/genimage.sh -c "$BOARD_DIR"/genimage.cfg
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Neal" == Neal Frager <[email protected]> writes:

This patch cleans up board/zynq shellcheck issues.

---
 .checkpackageignore      | 2 --
 board/zynq/post-build.sh | 4 ++--
 board/zynq/post-image.sh | 8 ++++----
 3 files changed, 6 insertions(+), 8 deletions(-)
.checkpackageignore +0 -2
index 10e70f0787..90a1481e54 100644
@@ -101,8 +101,6 @@ board/udoo/common/post-build.sh Shellcheck
 board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch Upstream
 board/versal/post-build.sh Shellcheck
 board/versal/post-image.sh Shellcheck TrailingSpace
-board/zynq/post-build.sh Shellcheck
-board/zynq/post-image.sh Shellcheck
 board/zynqmp/kria/kv260/kv260.sh Shellcheck
 board/zynqmp/kria/patches/uboot/v1-0001-makefile-add-multi_dtb_fit-dep.patch ApplyOrder Upstream
 board/zynqmp/post-build.sh Shellcheck
board/zynq/post-build.sh +0 -0
index 9fd8bbf2c8..7cec673e4b 100755

board/zynq/post-build.sh line 8

Quoted 8 lines
board/zynq/post-build.sh +2 -2
@@ -3,6 +3,6 @@
 # genimage will need to find the extlinux.conf
 # in the binaries directory
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$BINARIES_DIR"/extlinux.conf

This is IMHO not how we should be writing these lines, but instead use quotes around the entire word and use ${} around the variables, E.G.

install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${BINARIES_DIR}/extlinux.conf"

Committed with that fixed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
Quoted 41 lines
Quoted 29 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

"Peter" == Peter Korsgaard <[email protected]> writes:

"Neal" == Neal Frager <[email protected]> writes:

This patch cleans up board/zynq shellcheck issues.

---

.checkpackageignore      | 2 --
board/zynq/post-build.sh | 4 ++--
board/zynq/post-image.sh | 8 ++++----
3 files changed, 6 insertions(+), 8 deletions(-)
.checkpackageignore +0 -0
index 10e70f0787..90a1481e54 100644
@@ -101,8 +101,6 @@ board/udoo/common/post-build.sh Shellcheck

board/udoo/mx6qdl/patches/linux/0000-udoo-disable-usbh1.patch Upstream board/versal/post-build.sh Shellcheck board/versal/post-image.sh Shellcheck TrailingSpace

.checkpackageignore +0 -2
-board/zynq/post-build.sh Shellcheck
-board/zynq/post-image.sh Shellcheck

board/zynqmp/kria/kv260/kv260.sh Shellcheck board/zynqmp/kria/patches/uboot/v1-0001-makefile-add-multi_dtb_fit-dep.patch ApplyOrder Upstream board/zynqmp/post-build.sh Shellcheck

board/zynq/post-build.sh +0 -0
index 9fd8bbf2c8..7cec673e4b 100755

board/zynq/post-build.sh line 8

Quoted 8 lines
board/zynq/post-build.sh +2 -2
@@ -3,6 +3,6 @@
 # genimage will need to find the extlinux.conf
 # in the binaries directory
 
-BOARD_DIR="$(dirname $0)"
+BOARD_DIR="$(dirname "$0")"
 
-install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$BINARIES_DIR"/extlinux.conf

This is IMHO not how we should be writing these lines, but instead use quotes around the entire word and use ${} around the variables, E.G.

Quoted 3 lines

install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${BINARIES_DIR}/extlinux.conf"

Committed with that fixed, thanks.

Committed to 2023.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot