In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 5:
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
                                                         ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 6:
libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
             ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems.
             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
libs() { ldd "$*" 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 9:
	local target dest dir
        ^-------------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 22:
		[ -f "$file" -a ! -f "$dest" ] && {
                             ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 31:
	local src files
        ^-------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 34:
	[ -x "$src" ] && files="$src $(libs $src)"
                                            ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	[ -x "$src" ] && files="$src $(libs "$src")"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 35:
	install_file $files
                     ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
	install_file "$files"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 39:
	local arg="$1"; shift
        ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 46:
	local default="$1"; shift
        ^-----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 47:
	local answer="$default"
        ^----------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 51:
			0) echo -n "$* (y/N): ";
                                ^-- SC3037 (warning): In POSIX sh, echo flags are undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 52:
			*) echo -n "$* (Y/n): ";
                                ^-- SC3037 (warning): In POSIX sh, echo flags are undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 54:
		read answer
                ^--^ SC2162 (info): read without -r will mangle backslashes.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 69:
	local v="$1"
        ^-----^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 70:
	v="${v//\\/\\\\}"
           ^-----------^ SC3060 (warning): In POSIX sh, string replacement is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 71:
	v="${v//\"/\\\"}"
           ^-----------^ SC3060 (warning): In POSIX sh, string replacement is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 80:
	local from="$1"
        ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 81:
	local cmd="$2"
        ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 84:
		local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')"
                ^---------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                      ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 92:
	cat "$from" 2>/dev/null | $cmd
            ^-----^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 104:
	local cmdline uuid disk uevent line
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 105:
	local MAJOR MINOR DEVNAME DEVTYPE
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 107:
	if read cmdline < /proc/cmdline; then
           ^--^ SC2162 (info): read without -r will mangle backslashes.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 123:
				for disk in $(find /dev -type b); do
                                            ^------------------^ SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 124:
					set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
                                               ^-- SC2046 (warning): Quote this to prevent word splitting.
                                                       ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
					set -- $(dd if="$disk" bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 137:
			while read line; do
                              ^--^ SC2162 (info): read without -r will mangle backslashes.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 138:
				export -n "$line"
                                       ^-- SC3045 (warning): In POSIX sh, export -n is undefined.
                                          ^-----^ SC2163 (warning): This does not export 'line'. Remove $/${} for that, or use ${var?} to quiet.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 140:
			export BOOTDEV_MAJOR=$MAJOR
                                             ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			export BOOTDEV_MAJOR="$MAJOR"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 141:
			export BOOTDEV_MINOR=$MINOR
                                             ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			export BOOTDEV_MINOR="$MINOR"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 150:
	local var="$1" offset="$2"
        ^-------------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 151:
	local uevent line MAJOR MINOR DEVNAME DEVTYPE
        ^-- SC3043 (warning): In POSIX sh, 'local' is undefined.
                                              ^-----^ SC2034 (warning): DEVTYPE appears unused. Verify use (or export if used externally).


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 154:
		while read line; do
                      ^--^ SC2162 (info): read without -r will mangle backslashes.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 155:
			export -n "$line"
                               ^-- SC3045 (warning): In POSIX sh, export -n is undefined.
                                  ^-----^ SC2163 (warning): This does not export 'line'. Remove $/${} for that, or use ${var?} to quiet.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 157:
		if [ $BOOTDEV_MAJOR = $MAJOR -a $(($BOOTDEV_MINOR + $offset)) = $MINOR -a -b "/dev/$DEVNAME" ]; then
                     ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                      ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                             ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
                                                   ^------------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
                                                                    ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables.
                                                                                ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                       ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

Did you mean: 
		if [ "$BOOTDEV_MAJOR" = "$MAJOR" -a $(($BOOTDEV_MINOR + $offset)) = "$MINOR" -a -b "/dev/$DEVNAME" ]; then


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 168:
		echo "${1:0:2}${1:8:2}${1:6:2}${1:4:2}${1:2:2}"
                      ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
                              ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
                                      ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
                                              ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.
                                                      ^------^ SC3057 (warning): In POSIX sh, string indexing is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 175:
	local disk="$1"
        ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 176:
	local filename="$2"
        ^------------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 178:
	if [ -b "$disk" -o -f "$disk" ]; then
                        ^-- SC2166 (warning): Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 181:
		local magic=$(dd if="$disk" bs=2 count=1 skip=255 2>/dev/null)
                ^---------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                      ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                            ^-- SC2046 (warning): Quote this to prevent word splitting.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 182:
		if [ "$magic" != $'\x55\xAA' ]; then
                                 ^---------^ SC3003 (warning): In POSIX sh, $'..' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 189:
		local part
                ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 191:
			set -- $(hexdump -v -n 12 -s "$((0x1B2 + $part * 16))" -e '3/4 "0x%08X "' "$disk")
                               ^-- SC2046 (warning): Quote this to prevent word splitting.
                                                                 ^---^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 193:
			local type="$(( $(hex_le32_to_cpu $1) % 256))"
                        ^--------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                                                          ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			local type="$(( $(hex_le32_to_cpu "$1") % 256))"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 194:
			local lba="$(( $(hex_le32_to_cpu $2) ))"
                        ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                                                         ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			local lba="$(( $(hex_le32_to_cpu "$2") ))"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 195:
			local num="$(( $(hex_le32_to_cpu $3) ))"
                        ^-------^ SC3043 (warning): In POSIX sh, 'local' is undefined.
                                                         ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
			local num="$(( $(hex_le32_to_cpu "$3") ))"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 215:
	. /etc/diag.sh
          ^----------^ SC1091 (info): Not following: /etc/diag.sh was not specified as input (see shellcheck -x).


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 226:
		get_image "$1" "$2" | mtd $MTD_ARGS $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}"
                                          ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                    ^--------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		get_image "$1" "$2" | mtd "$MTD_ARGS" "$MTD_CONFIG_ARGS" -j "$CONF_TAR" write - "${PART_NAME:-image}"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 228:
		get_image "$1" "$2" | mtd $MTD_ARGS write - "${PART_NAME:-image}"
                                          ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
		get_image "$1" "$2" | mtd "$MTD_ARGS" write - "${PART_NAME:-image}"


In /logs/firmware/unblob_extracted/firmware_extract/1568982-13971496.squashfs_v4_le_extract/lib/upgrade/common.sh line 230:
	[ $? -ne 0 ] && exit 1
          ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- DEVTYPE appears unused. Verify us...
  https://www.shellcheck.net/wiki/SC2044 -- For loops over find output are fr...
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...