Standardize parition build props.

This adds a set of standard build properties that are shared
between the system, vendor, odm, product, product_services and
bootimage partitions. The following properties are added:
    ro.X.build.date
    ro.X.build.date.utc
    ro.X.build.fingerprint
    ro.X.build.id
    ro.X.build.tags
    ro.X.build.type
    ro.X.build.version.incremental
    ro.X.build.version.release
    ro.X.build.version.sdk
    ro.product.X.brand
    ro.product.X.device
    ro.product.X.manufacturer
    ro.product.X.model
    ro.product.X.name

vendor and odm already had all of these, but bootimage, product
and product_services only had a subset and system didn't have
any.

Bug: 78359442
Bug: 111491184
Test: m out/target/product/hikey64/system/build.prop and inspect
Change-Id: Ia346d61aec331ed1b9fea12e6a50f1b79147473d
diff --git a/tools/device_buildinfo.sh b/tools/buildinfo_common.sh
similarity index 64%
rename from tools/device_buildinfo.sh
rename to tools/buildinfo_common.sh
index 0782565..f7f798c 100755
--- a/tools/device_buildinfo.sh
+++ b/tools/buildinfo_common.sh
@@ -3,32 +3,27 @@
 partition="$1"
 
 if [ "$#" -ne 1 ]; then
-  echo "Usage: $0 <vendor|odm>" 1>&2
+  echo "Usage: $0 <partition>" 1>&2
   exit 1
 fi
 
-if [ "$partition" != "vendor" ] && [ "$partition" != "odm" ]; then
-  echo "Unknown partition name: $partition" 1>&2
-  exit 1
-fi
+echo "# begin common build properties"
+echo "# autogenerated by $0"
 
-echo "# begin build properties"
-echo "# autogenerated by device_buildinfo.sh"
-
+echo "ro.${partition}.build.date=`$DATE`"
+echo "ro.${partition}.build.date.utc=`$DATE +%s`"
+echo "ro.${partition}.build.fingerprint=$BUILD_FINGERPRINT"
 echo "ro.${partition}.build.id=$BUILD_ID"
-echo "ro.${partition}.build.version.incremental=$BUILD_NUMBER"
-echo "ro.${partition}.build.version.sdk=$PLATFORM_SDK_VERSION"
-echo "ro.${partition}.build.version.release=$PLATFORM_VERSION"
-echo "ro.${partition}.build.type=$TARGET_BUILD_TYPE"
 echo "ro.${partition}.build.tags=$BUILD_VERSION_TAGS"
+echo "ro.${partition}.build.type=$TARGET_BUILD_TYPE"
+echo "ro.${partition}.build.version.incremental=$BUILD_NUMBER"
+echo "ro.${partition}.build.version.release=$PLATFORM_VERSION"
+echo "ro.${partition}.build.version.sdk=$PLATFORM_SDK_VERSION"
 
-echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
-echo "ro.board.platform=$TARGET_BOARD_PLATFORM"
-
+echo "ro.product.${partition}.brand=$PRODUCT_BRAND"
+echo "ro.product.${partition}.device=$TARGET_DEVICE"
 echo "ro.product.${partition}.manufacturer=$PRODUCT_MANUFACTURER"
 echo "ro.product.${partition}.model=$PRODUCT_MODEL"
-echo "ro.product.${partition}.brand=$PRODUCT_BRAND"
 echo "ro.product.${partition}.name=$PRODUCT_NAME"
-echo "ro.product.${partition}.device=$TARGET_DEVICE"
 
-echo "# end build properties"
+echo "# end common build properties"