John Stultz | 681b625 | 2022-01-26 23:52:55 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # fetch, check & extract the current vendor package |
| 3 | set -e |
| 4 | |
| 5 | DIR_PARENT=$(cd $(dirname $0); pwd) |
| 6 | if [ -z "${ANDROID_BUILD_TOP}" ]; then |
| 7 | ANDROID_BUILD_TOP=$(cd ${DIR_PARENT}/../../../; pwd) |
| 8 | fi |
| 9 | |
| 10 | . "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh" |
| 11 | |
| 12 | PKG_FILE=extract-linaro_devices-${EXPECTED_LINARO_VENDOR_VERSION} |
| 13 | |
| 14 | pushd ${ANDROID_BUILD_TOP} |
| 15 | |
Amit Pundir | e23d672 | 2022-07-05 18:31:03 +0530 | [diff] [blame] | 16 | # remove the older vendor-package, if any, because upstream |
| 17 | # mesa prebuilts in linaro-vendor-package ain't declared |
| 18 | # within a contained namespace and we can run into build |
| 19 | # errors because of redefinition of mesa prebuilt modules |
| 20 | # from the previous vendor-package. |
| 21 | # FIXME move mesa prebuilts from Android.mk to Android.bp |
| 22 | rm -rf ${ANDROID_BUILD_TOP}/vendor/linaro/ |
| 23 | |
John Stultz | 681b625 | 2022-01-26 23:52:55 +0000 | [diff] [blame] | 24 | if [ ! -e "${PKG_FILE}.tgz" ]; then |
| 25 | curl -L ${VND_PKG_URL} -o ${PKG_FILE}.tgz |
| 26 | fi |
| 27 | |
| 28 | # generate expected sha512sum, check & cleanup |
| 29 | echo "${EXPECTED_LINARO_VENDOR_SHA} ${PKG_FILE}.tgz" > ${PKG_FILE}.tgz.sha |
| 30 | sha512sum -c ${PKG_FILE}.tgz.sha |
| 31 | rm ${PKG_FILE}.tgz.sha |
| 32 | |
| 33 | tar -xf ${PKG_FILE}.tgz |
| 34 | ./${PKG_FILE}.sh |
| 35 | popd |