summaryrefslogtreecommitdiff
path: root/meta-phosphor/scripts
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2022-01-21 18:37:06 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-01-31 17:27:52 +0300
commitfc32817b21e387372dc3d42761f3ff77f4d35b0d (patch)
treec0789c6011612166e7dd61d886374fd1701fa8bc /meta-phosphor/scripts
parentb0fe8fd9d01784629948897e280ff5e777175f80 (diff)
downloadopenbmc-fc32817b21e387372dc3d42761f3ff77f4d35b0d.tar.xz
run-repotest: do not allow dts files in meta layers
A patch came through recently that had a kernel dts file being patched in via a meta layer bbappend. Lets have repotest automatically flag these so we don't have to in reviews. The OpenBMC project carries a fork of the Linux kernel in openbmc/linux and that's where all dts files should go. This ensure the upstream process is moving forward with the changes. Tested: - Added a dts file and verified the script failed due to it Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ie82b4d104b73cc18e4c1e0fba772eb92c96ed3fa
Diffstat (limited to 'meta-phosphor/scripts')
-rwxr-xr-xmeta-phosphor/scripts/run-repotest32
1 files changed, 31 insertions, 1 deletions
diff --git a/meta-phosphor/scripts/run-repotest b/meta-phosphor/scripts/run-repotest
index d39cbb7014..359262cf9d 100755
--- a/meta-phosphor/scripts/run-repotest
+++ b/meta-phosphor/scripts/run-repotest
@@ -71,6 +71,37 @@ if [[ $files_count -ne 0 ]]; then
exit 1
fi
+# Now verify there are no kernel dts files being added in a patch
+# All dts files should be sent upstream and can be carried in the openbmc/linux
+# tree until they are accepted upstream
+dts_files_tmp=$(mktemp)
+allowed_dts_tmp=$(mktemp)
+trap 'rm $dts_files_tmp $allowed_dts_tmp' exit
+
+git ls-files -- \
+ '*.dts' \
+ ':!:poky/**' \
+ ':!:meta-security/**' \
+ ':!:meta-raspberrypi/**' \
+ ':!:meta-openembedded/**' \
+ | sort > "$dts_files_tmp"
+
+# There is a single dts currently in the tree that we will exempt for now
+echo "\
+meta-hpe/meta-dl360poc/recipes-kernel/linux/linux-obmc/gxp.dts
+" | sort > "$allowed_dts_tmp"
+
+files_diff=$(comm -23 "$dts_files_tmp" "$allowed_dts_tmp")
+
+files_count=$(echo -n "$files_diff" | grep -c '^' || true)
+if [[ $files_count -ne 0 ]]; then
+echo "Dts files found not in allow list"
+echo "$files_diff"
+echo "Dts files are not allowed on OpenBMC in these layers. Please upstream your changes and see \
+ https://github.com/openbmc/docs/blob/master/kernel-development.md"
+exit 1
+fi
+
lint_exempt="\
meta-amd/recipes-amd/amd-fpga/files/ethanolx/fpgardu.sh
meta-bytedance/meta-g220a/recipes-network/network/static-mac-addr/mac-check
@@ -224,4 +255,3 @@ for f in $non_bbfiles; do
done
echo "Repo test passed"
-