summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/linux_ec_commands_h_check.sh4
-rwxr-xr-xutil/make_linux_ec_commands_h.sh10
2 files changed, 4 insertions, 10 deletions
diff --git a/util/linux_ec_commands_h_check.sh b/util/linux_ec_commands_h_check.sh
index d24beb9b54..e10687e980 100755
--- a/util/linux_ec_commands_h_check.sh
+++ b/util/linux_ec_commands_h_check.sh
@@ -6,6 +6,8 @@
set -e
+: "${ZEPHYR_BASE:=$(realpath ../../../src/third_party/zephyr/main)}"
+
ec_commands_file_in="include/ec_commands.h"
ec_commands_file_out="build/kernel/include/linux/mfd/cros_ec_commands.h"
@@ -23,3 +25,5 @@ if [ "${ec_commands_file_out}" -ot "${ec_commands_file_in}" ]; then
echo 'Please run "make buildall" or "make build_cros_ec_commands"'.
exit 1
fi
+
+"${ZEPHYR_BASE}/scripts/checkpatch.pl" -f "${ec_commands_file_out}"
diff --git a/util/make_linux_ec_commands_h.sh b/util/make_linux_ec_commands_h.sh
index 66c4360230..dfb2c6919a 100755
--- a/util/make_linux_ec_commands_h.sh
+++ b/util/make_linux_ec_commands_h.sh
@@ -27,12 +27,6 @@ if [ $# -ne 2 ]; then
exit 1
fi
-if [ ! -d "${CROS_WORKON_SRCROOT}" ]; then
- printf "Not in Chrome OS chroot!\n\n"
- usage
- exit 0
-fi
-
out_dir="$(dirname "${out}")"
mkdir -p "${out_dir}"
tmp="$(mktemp -p "${out_dir}" cros_ec_XXX.h)"
@@ -75,8 +69,4 @@ sed -i "s/INT\([0-9]\{1,2\}\)_MIN/S\1_MIN/" "${tmp}"
unifdef -x2 -m -UCONFIG_HOSTCMD_ALIGNED -U__ACPI__ -D__KERNEL__ -U__cplusplus \
-UCHROMIUM_EC "${tmp}"
-# Check kernel checkpatch passes.
-# TODO(b/272119670) Calling the hook directly leaves us open to breakages.
-"${CROS_WORKON_SRCROOT}/src/repohooks/third_party/checkpatch.pl" -f "${tmp}"
-
cp "${tmp}" "${out}"