sm8x50-userdebug: Add a generic build target for Snapdragon 8 gen devboards

Supported only on Linux kernel v6.8 onwards, this is a
common configuration (64-bit only) target for Snapdragon 8
gen devboards.

Smoke tested on sm8550-hdk, sm8550-qrd and sm8650-qrd with
software rendering.

And since qcom,board-id and qcom,msm-id DT properties are no
longer accepted upstream, we used fdtoverlay to apply them
at build time. So make sure that the base DT is built with
`DTC_FLAGS=-@` build flag to allow overlays, otherwise
fdtoverlay command will run into "FDT_ERR_NOTFOUND" error at
the build time.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I2c6a0331173ef11a542b07ee3a270ece36d96786
diff --git a/shared/utils/set_hw.sh b/shared/utils/set_hw.sh
index 98f76c3..305a345 100644
--- a/shared/utils/set_hw.sh
+++ b/shared/utils/set_hw.sh
@@ -3,10 +3,32 @@
 #
 # grep the device name from /proc/device-tree/compatible
 
-HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep rb5`
-
-if [ -z "${HW}" ]; then
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep db845c`
+if [ -n "${HW}" ]; then
     setprop vendor.hw db845c
-else
+    exit 0
+fi
+
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep rb5`
+if [ -n "${HW}" ]; then
     setprop vendor.hw rb5
+    exit 0
+fi
+
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep sm8550-hdk`
+if [ -n "${HW}" ]; then
+    setprop vendor.hw sm8550hdk
+    exit 0
+fi
+
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep sm8550-qrd`
+if [ -n "${HW}" ]; then
+    setprop vendor.hw sm8550qrd
+    exit 0
+fi
+
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep sm8650-qrd`
+if [ -n "${HW}" ]; then
+    setprop vendor.hw sm8650qrd
+    exit 0
 fi