The Trusty repositories are available in the Android Open Source Project (AOSP).
Use these links to find the appropriate Trusty kernel branches in AOSP:
Installing Repo
To download Trusty, first download and install Repo.
After Repo has been successfully installed you can clone the Android Trusty repository.
mkdir trusty
cd trusty
repo init -u https://android.googlesource.com/trusty/manifest -b master
repo sync -j32
Build
Use the following to build the generic arm64 image for Trusty.
./trusty/vendor/google/aosp/scripts/build.py generic-arm64
Build results will be under build-root/build-generic-arm64/.
Look for lk.bin which is a TEE image with all apps compiled in:
ls build-root/build-generic-arm64/lk.bin
Install
You can assemble lk.bin into a firmware image and flash it to the device. Generating firmware images varies depending on the board being used. Contact your board manufacturer for instructions.