John Stultz | f2a35d5 | 2021-12-16 05:48:59 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -x |
| 3 | |
| 4 | SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" |
| 5 | |
| 6 | DATE=$(date +%Y%m%d) |
| 7 | SHA1=$(git log --pretty="%h" HEAD~1..HEAD) |
| 8 | VER=$DATE |
| 9 | |
| 10 | SRC_DIR=$SCRIPT_DIR/src/ |
John Stultz | d6997a2 | 2022-01-06 00:20:44 +0000 | [diff] [blame] | 11 | TARGET_DIR=out/vendor/linaro/ |
John Stultz | f2a35d5 | 2021-12-16 05:48:59 +0000 | [diff] [blame] | 12 | |
| 13 | |
Amit Pundir | 5c1a94a | 2024-03-15 12:01:25 +0530 | [diff] [blame] | 14 | DEV_TARGETS="shared db845c hikey960 rb5 sm8x50" |
John Stultz | f2a35d5 | 2021-12-16 05:48:59 +0000 | [diff] [blame] | 15 | |
John Stultz | d6997a2 | 2022-01-06 00:20:44 +0000 | [diff] [blame] | 16 | for 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 |
| 25 | done |
| 26 | |
Amit Pundir | 370abd3 | 2024-08-17 13:41:16 +0530 | [diff] [blame] | 27 | # Delete unnecessary files copied from mesa_prebuilt/ |
| 28 | rm $TARGET_DIR/shared/$VER/mesa_prebuilt/{copy_bins.sh,README_UpdateMesaPrebuilts} |
| 29 | |
John Stultz | d6997a2 | 2022-01-06 00:20:44 +0000 | [diff] [blame] | 30 | # Copy the toplevel items |
| 31 | cp $SRC_DIR/README $TARGET_DIR/ |
| 32 | cp $SRC_DIR/android-info.txt $TARGET_DIR/ |
John Stultz | f2a35d5 | 2021-12-16 05:48:59 +0000 | [diff] [blame] | 33 | |
| 34 | #tar it up |
| 35 | tar -C out -czf out/vendor.tgz vendor/ |
| 36 | |
| 37 | # prepend the extraction script |
| 38 | cp $SCRIPT_DIR/extract-linaro_devices.sh-source out/extract-linaro_devices-$VER.sh |
| 39 | cat out/vendor.tgz >> out/extract-linaro_devices-$VER.sh |
| 40 | |
| 41 | # tar it again |
| 42 | tar -C out -czf out/extract-linaro_devices-$VER.tgz extract-linaro_devices-$VER.sh |
| 43 | |
| 44 | # cleanup: remove the temp/intermediate files |
| 45 | rm out/extract-linaro_devices-$VER.sh out/vendor.tgz |
| 46 | rm -rf out/vendor |
Amit Pundir | c00e68f | 2024-07-26 17:04:52 +0530 | [diff] [blame] | 47 | |
| 48 | # Copy the proprietary files |
| 49 | PROP_DEV_TARGETS="sm8x50" |
| 50 | for 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/ |
| 53 | done |
| 54 | #tar it up |
| 55 | tar -C out -czf out/vendor-prop.tgz vendor/ |
| 56 | # prepend the extraction script |
| 57 | cp $SCRIPT_DIR/extract-linaro_devices.sh-source out/extract-linaro_devices-$VER-prop.sh |
| 58 | cat out/vendor-prop.tgz >> out/extract-linaro_devices-$VER-prop.sh |
| 59 | # tar it again |
| 60 | tar -C out -czf out/extract-linaro_devices-$VER-prop.tgz extract-linaro_devices-$VER-prop.sh |
| 61 | # cleanup: remove the temp/intermediate files |
| 62 | rm out/extract-linaro_devices-$VER-prop.sh out/vendor-prop.tgz |
| 63 | rm -rf out/vendor |