blob: 82e8df6bf40eca613d8b9fd9421fdcec2f215acb [file] [log] [blame]
John Stultzf2a35d52021-12-16 05:48:59 +00001#!/bin/bash
2set -x
3
4SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5
6DATE=$(date +%Y%m%d)
7SHA1=$(git log --pretty="%h" HEAD~1..HEAD)
8VER=$DATE
9
10SRC_DIR=$SCRIPT_DIR/src/
John Stultzd6997a22022-01-06 00:20:44 +000011TARGET_DIR=out/vendor/linaro/
John Stultzf2a35d52021-12-16 05:48:59 +000012
13
Amit Pundir5c1a94a2024-03-15 12:01:25 +053014DEV_TARGETS="shared db845c hikey960 rb5 sm8x50"
John Stultzf2a35d52021-12-16 05:48:59 +000015
John Stultzd6997a22022-01-06 00:20:44 +000016for DEV in $DEV_TARGETS; do
17 DEV_TARGET_DIR=$TARGET_DIR/$DEV/$VER
18
19 #Create and copy the files into the out dir
20 mkdir -p $DEV_TARGET_DIR
21 cp -r $SRC_DIR/$DEV/* $DEV_TARGET_DIR/
22
23 # set the version file in the package
24 echo "TARGET_LINARO_VENDOR_VERSION := $VER" > $DEV_TARGET_DIR/version.mk
25done
26
Amit Pundir370abd32024-08-17 13:41:16 +053027# Delete unnecessary files copied from mesa_prebuilt/
28rm $TARGET_DIR/shared/$VER/mesa_prebuilt/{copy_bins.sh,README_UpdateMesaPrebuilts}
29
John Stultzd6997a22022-01-06 00:20:44 +000030# Copy the toplevel items
31cp $SRC_DIR/README $TARGET_DIR/
32cp $SRC_DIR/android-info.txt $TARGET_DIR/
John Stultzf2a35d52021-12-16 05:48:59 +000033
34#tar it up
35tar -C out -czf out/vendor.tgz vendor/
36
37# prepend the extraction script
38cp $SCRIPT_DIR/extract-linaro_devices.sh-source out/extract-linaro_devices-$VER.sh
39cat out/vendor.tgz >> out/extract-linaro_devices-$VER.sh
40
41# tar it again
42tar -C out -czf out/extract-linaro_devices-$VER.tgz extract-linaro_devices-$VER.sh
43
44# cleanup: remove the temp/intermediate files
45rm out/extract-linaro_devices-$VER.sh out/vendor.tgz
46rm -rf out/vendor
Amit Pundirc00e68f2024-07-26 17:04:52 +053047
48# Copy the proprietary files
49PROP_DEV_TARGETS="sm8x50"
50for PROP_DEV in $PROP_DEV_TARGETS; do
51 mkdir -p $TARGET_DIR/$PROP_DEV/$VER/proprietary/
52 cp -r $SRC_DIR/proprietary/$PROP_DEV/* $TARGET_DIR/$PROP_DEV/$VER/proprietary/
53done
54#tar it up
55tar -C out -czf out/vendor-prop.tgz vendor/
56# prepend the extraction script
57cp $SCRIPT_DIR/extract-linaro_devices.sh-source out/extract-linaro_devices-$VER-prop.sh
58cat out/vendor-prop.tgz >> out/extract-linaro_devices-$VER-prop.sh
59# tar it again
60tar -C out -czf out/extract-linaro_devices-$VER-prop.tgz extract-linaro_devices-$VER-prop.sh
61# cleanup: remove the temp/intermediate files
62rm out/extract-linaro_devices-$VER-prop.sh out/vendor-prop.tgz
63rm -rf out/vendor