1# TODO(chenhaosjtuacm): set it to the correct license, license file is needed 2LICENSE = "CLOSED" 3 4# Since repo is not working correctly in our case (b/165933540), we simulate 5# the behavior of device/google/trout/agl_services_build/repo_manifest.xml 6# in the unpacking task. 7 8ANDROID_REMOTE = "git://partner-android.googlesource.com" 9BORINGSSL_REMOTE = "git://boringssl.googlesource.com" 10GITHUB_REMOTE = "git://github.com" 11 12FETCH_CODE_PREFIX = "src" 13 14S = "${WORKDIR}/${FETCH_CODE_PREFIX}" 15 16# Pull the source from git server remote/name to path 17def trout_git_uri(d, remote, name, path, revision): 18 return '{}/{};protocol=https;nobranch=1;' \ 19 'destsuffix={}/{};rev={}'.format( 20 d.getVar(remote), name, 21 d.getVar('FETCH_CODE_PREFIX'), path, revision) 22 23# Non-Trout Android code revisions are matching those in Trout R QPR1 PDK 24# Except hardware/interfaces (TODO: chenhaosjtuacm, 166706927) 25# TODO (chenhaosjtuacm): generate SRC_URI from the manifest 26 27SRC_URI = "\ 28 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'device/google/trout', 'device/google/trout', 'rvc-qpr-dev')} \ 29 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/external/fmtlib', 'third_party/fmtlib', 'aa6fa3aa882afe47f7af990b0c6d747a01cd6104')} \ 30 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/external/grpc-grpc', 'third_party/grpc-grpc', '75bfcd05212333d0f4247865e3a61eaf6092d932')} \ 31 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/external/jsoncpp', 'third_party/jsoncpp', 'ceed690fefd71a34154781da01b3bb0294a486eb')} \ 32 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/external/protobuf', 'third_party/protobuf', '2305946dc587fb5766d207c7e3981375b2aaf5ce')} \ 33 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/hardware/interfaces', 'hardware/interfaces', '229e07f9b922522e1612b6dd930919cf58c8865f')} \ 34 ${@trout_git_uri(d, 'ANDROID_REMOTE', 'platform/system/core', 'third_party/android/system_core', 'b1ee3a99d1fc3d41606555e29da484df8a66ed71')} \ 35 ${@trout_git_uri(d, 'BORINGSSL_REMOTE', 'boringssl', 'third_party/boringssl', '0b710a305b42b67522003a314dea3e3868485665')} \ 36 ${@trout_git_uri(d, 'GITHUB_REMOTE', 'c-ares/c-ares', 'third_party/cares', '3be1924221e1326df520f8498d704a5c4c8d0cce')} \ 37 ${@trout_git_uri(d, 'GITHUB_REMOTE', 'gflags/gflags', 'third_party/gflags', '28f50e0fed19872e0fd50dd23ce2ee8cd759338e')} \ 38 ${@trout_git_uri(d, 'GITHUB_REMOTE', 'madler/zlib', 'third_party/zlib', 'cacf7f1d4e3d44d871b605da3b647f07d718623f')} \ 39" 40 41SRC_SYMLINKS = "\ 42 device/google/trout/agl_services_build/build.sh:build.sh \ 43 device/google/trout/agl_services_build/CMakeLists.txt:CMakeLists.txt \ 44 device/google/trout/agl_services_build/cmake:cmake \ 45 device/google/trout/agl_services_build/toolchain:toolchain \ 46 device/google/trout/hal/audiocontrol/2.0:audiocontrol \ 47 device/google/trout/hal/dumpstate/1.1:dumpstate_server \ 48 device/google/trout/hal/vehicle/2.0:vehicle_hal_server \ 49 device/google/trout/hal/common/agl/watchdog:watchdog_test_server \ 50 hardware/interfaces/automotive/vehicle/2.0/default:third_party/default_native_vehicle_hal \ 51" 52 53def force_create_symlink(src, dst): 54 src = os.path.relpath(src, os.path.dirname(dst)) 55 tmplink = '{}.templink'.format(dst) 56 os.symlink(src, tmplink) 57 os.rename(tmplink, dst) 58 59python do_unpack_append() { 60 os.chdir(d.getVar('S')) 61 linkfile_rules = d.getVar('SRC_SYMLINKS').split() 62 for src, dst in map(lambda x: x.split(':'), linkfile_rules): 63 force_create_symlink(src, dst) 64} 65