meta-ampere: shellcheck: fix up source locations
Many scripts in meta-ampere had `shellcheck source=/dev/null`, which
isn't as useful as putting the real sourced script. Fix up all of
these in the meta-layer to point to the right script, which as a
side-effect allow a few global-disables to be removed.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icb43dc76a19edbdada8b4caa6ced57ff07f42d27
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
index e04af8d..861b105 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-# shellcheck source=/dev/null
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh
source /usr/sbin/gpio-defs.sh
# Configure to boot from MAIN SPI-HOST
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_power_util.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
index d9ca2ed..a738e7f 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# shellcheck source=/dev/null
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh
source /usr/sbin/gpio-defs.sh
# Usage of this utility
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
index c8721fe..cf6e90d 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# shellcheck source=/dev/null
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh
source /usr/sbin/gpio-defs.sh
function gpio_number() {
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
index ff8c7c9..f5bc966 100644
--- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
+++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-# shellcheck source=/dev/null
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
source /usr/sbin/gpio-defs.sh
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh
source /usr/sbin/gpio-lib.sh
function usage() {
@@ -40,4 +41,4 @@
echo "Invalid parameter1=$1"
usage;
exit 0;
-fi
\ No newline at end of file
+fi
diff --git a/meta-ampere/meta-jade/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh b/meta-ampere/meta-jade/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
index f285898..a464adc 100755
--- a/meta-ampere/meta-jade/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
+++ b/meta-ampere/meta-jade/recipes-phosphor/console/obmc-console/ampere_uartmux_ctrl.sh
@@ -19,7 +19,7 @@
# <UARTx_MODE> of 1 sets CPU To HDR_CONN
# <UARTx_MODE> of 2 sets BMC to CPU (eg dropbear ssh server on port 2200)
-# shellcheck source=/dev/null
+# shellcheck source=meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
if [ $# -lt 2 ]; then
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/host/ampere-sysfw-hang-handler/ampere_sysfw_hang_handler.sh b/meta-ampere/meta-mitchell/recipes-ampere/host/ampere-sysfw-hang-handler/ampere_sysfw_hang_handler.sh
index c3f77fd..9c36df2 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/host/ampere-sysfw-hang-handler/ampere_sysfw_hang_handler.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/host/ampere-sysfw-hang-handler/ampere_sysfw_hang_handler.sh
@@ -1,8 +1,6 @@
#!/bin/bash
-# shellcheck disable=SC2046
-# shellcheck source=/dev/null
-
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
# Do event trigger
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_bmc_heartbeat.sh b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_bmc_heartbeat.sh
index 5ecea31..b9bba7b 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_bmc_heartbeat.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_bmc_heartbeat.sh
@@ -1,8 +1,6 @@
#!/bin/bash
-# shellcheck disable=SC2154
-# shellcheck source=/dev/null
-
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
value=0
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
index 33dc7ea..9d6ca0e 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh
@@ -1,9 +1,8 @@
#!/bin/bash
-# shellcheck disable=SC2154
-# shellcheck source=/dev/null
-
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/mtmitchell_platform_gpios_init.sh
source /usr/sbin/platform_gpios_init.sh
#pre platform init function. implemented in platform_gpios_init.sh
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
index 3e503c4..5fbbbcc 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
@@ -1,8 +1,5 @@
#!/bin/bash
-# shellcheck disable=SC2154
-# shellcheck source=/dev/null
-
# Configure GPIO as output and set its value
AST2600_GPIO_BASE=(
816
@@ -69,4 +66,4 @@
gpioPin=$(("$offset" + ${AST2600_GPIO_BASE[$gpioid]}))
gpio_configure_input "$gpioPin"
fi
-}
\ No newline at end of file
+}
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/mtmitchell_platform_gpios_init.sh b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/mtmitchell_platform_gpios_init.sh
index 76d3a74..65acfc5 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/mtmitchell_platform_gpios_init.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/mtmitchell_platform_gpios_init.sh
@@ -1,8 +1,6 @@
#!/bin/bash
-# shellcheck disable=SC2154
-# shellcheck source=/dev/null
-
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
function bind_rtc_driver() {
diff --git a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ampere_power_util.sh b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
index 6f799f0..fb5be7f 100644
--- a/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
+++ b/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ampere_power_util.sh
@@ -1,8 +1,6 @@
#!/bin/bash
-# shellcheck disable=SC2046
-# shellcheck source=/dev/null
-
+# shellcheck source=meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-platform-init/gpio-lib.sh
source /usr/sbin/gpio-lib.sh
# Usage of this utility