From fa327b5bbc6d9c502aa3ce2df8eadcca9e73dc9c Mon Sep 17 00:00:00 2001 From: Jacob Pease Date: Tue, 22 Aug 2023 13:59:36 -0500 Subject: [PATCH] Added ability to specify device tree to flash-sd. It also will generate the device tree files inside the specified buildroot directory --- linux/sdcard/flash-sd.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux/sdcard/flash-sd.sh b/linux/sdcard/flash-sd.sh index c1dd360da..522af17d1 100755 --- a/linux/sdcard/flash-sd.sh +++ b/linux/sdcard/flash-sd.sh @@ -30,6 +30,7 @@ help() { echo "Usage: $0 [OPTIONS] " echo " -z wipes card with zeros" echo " -b get images from given buildroot" + echo " -d specify device tree to use" exit 0; } @@ -38,7 +39,7 @@ help() { # parameters list. ARGS=() while [ $OPTIND -le "$#" ] ; do - if getopts "hzb:" arg ; then + if getopts "hzb:d:" arg ; then case "${arg}" in h) help ;; @@ -46,6 +47,8 @@ while [ $OPTIND -le "$#" ] ; do ;; b) BUILDROOT=${OPTARG} ;; + d) DEVICE_TREE=$IMAGES/${OPTARG} + ;; esac else ARGS+=("${!OPTIND}") @@ -83,7 +86,8 @@ fi # Ensure device tree binaries exist if [ ! -e $DEVICE_TREE ] ; then - echo -e '$ERRORTEXT Missing device tree files' + echo -e "$NAME $ERRORTEXT Missing device tree files" + echo -e "$NAME generating all device tree files into buildroot" make -C ../ generate BUILDROOT=$BUILDROOT fi