generate-all: pass extra commands to lunch/choosecombo in envsetup.sh

Requires the corresponding patch in build/make repo.
This commit is contained in:
Dmitry Muhomor 2023-08-29 16:19:31 +03:00 committed by Daniel Micay
parent c8f93555c0
commit 0691a32fa6
30 changed files with 68 additions and 3 deletions

View file

@ -22,7 +22,7 @@ import {
PropResults,
resolveOverrides,
resolveSepolicyDirs,
updatePresigned,
updatePresigned, writeEnvsetupCommands,
} from '../frontend/generate'
import { writeReadme } from '../frontend/readme'
import { DeviceImages, prepareDeviceImages, WRAPPED_SOURCE_FLAGS, wrapSystemSrc } from '../frontend/source'
@ -161,8 +161,10 @@ const doDevice = (
),
)
// 12. Readme
await writeReadme(config, dirs, propResults)
await Promise.all([
writeEnvsetupCommands(config, dirs),
writeReadme(config, dirs, propResults),
])
})
export default class GenerateFull extends Command {

View file

@ -378,3 +378,24 @@ export async function generateBuildFiles(
await writeBuildFiles(build, dirs, config)
}
export async function writeEnvsetupCommands(config: DeviceConfig, dirs: VendorDirectories) {
let vars = new Map<string, string | undefined>()
let product = config.device.name
vars.set(`BUILD_ID_${product}`, config.device.build_id)
vars.set(`PLATFORM_SECURITY_PATCH_${product}`, config.device.platform_security_patch_level_override)
let cmds: string[] = []
for (let [k, v] of vars.entries()) {
if (v === undefined) {
cmds.push(`unset ${k}`)
} else {
cmds.push(`export ${k}="${v}"`)
}
}
cmds.push('')
await fs.writeFile(path.join(dirs.out, 'cmds-for-envsetup.sh'), cmds.join('\n'))
}

View file

@ -0,0 +1,2 @@
export BUILD_ID_barbet="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_barbet

View file

@ -0,0 +1,2 @@
export BUILD_ID_bluejay="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_bluejay

View file

@ -0,0 +1,2 @@
export BUILD_ID_bramble="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_bramble

View file

@ -0,0 +1,2 @@
export BUILD_ID_cheetah="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_cheetah

View file

@ -0,0 +1,2 @@
export BUILD_ID_coral="TP1A.221005.002.B2"
export PLATFORM_SECURITY_PATCH_coral="2022-11-01"

View file

@ -0,0 +1,2 @@
export BUILD_ID_felix="TQ3C.230805.001.A3"
unset PLATFORM_SECURITY_PATCH_felix

View file

@ -0,0 +1,2 @@
export BUILD_ID_flame="TP1A.221005.002.B2"
export PLATFORM_SECURITY_PATCH_flame="2022-11-01"

View file

@ -0,0 +1,2 @@
export BUILD_ID_lynx="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_lynx

View file

@ -0,0 +1,2 @@
export BUILD_ID_oriole="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_oriole

View file

@ -0,0 +1,2 @@
export BUILD_ID_panther="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_panther

View file

@ -0,0 +1,2 @@
export BUILD_ID_raven="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_raven

View file

@ -0,0 +1,2 @@
export BUILD_ID_redfin="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_redfin

View file

@ -0,0 +1,2 @@
export BUILD_ID_sunfish="TQ3A.230805.001"
unset PLATFORM_SECURITY_PATCH_sunfish

View file

@ -0,0 +1,2 @@
export BUILD_ID_tangorpro="TQ3A.230805.001.B1"
unset PLATFORM_SECURITY_PATCH_tangorpro

View file

@ -3,6 +3,7 @@ Android.mk: 779d2670714ba5ecf1a0e38a98156d8e58e32f72ebb0d07ef8320fb615cd9ed5
AndroidProducts.mk: 59cb06566408d0c7a1133cd4b737e10d5414b52842470185a4b57c0ba9f586a1
README.md: 6c4acd48602c29dba5ee0bddfb9758a03887cb3af309591f460b112ebf410bf0
barbet.mk: 4debc2aac0695fcc61b24d7a59bb782f988c2f423abed3923a8404c348a6d66f
cmds-for-envsetup.sh: cbbdd3cb000c01e2c5a644499813ea5d20252a410c0ed84d2623456d9c2d0c61
firmware: dir
firmware/abl.img: a2cc572fae598a46cda3570abe5d0cd96a04136898178f1a6f24da6464098cbf
firmware/android-info.txt: 9906711197677c2f56c3d03e678a4aa49b47b259050ab57f2cac2403cebe4a83

View file

@ -3,6 +3,7 @@ Android.mk: 010beddd12098d006028c2730774e91580820cf5b5774ed7a65a7f77310cbdb8
AndroidProducts.mk: 1d545f5d988fb40c1145ba9b09ca051acba78b35fb6ec00aadd023d32017712e
README.md: 982cac6e61cdbf5cd9c3dc0fdc543d18a7c70cc153e5a79ec5c7031ab6687f07
bluejay.mk: 241a086d951d59fe94be585877628ec50672a756495c7c22bd913cda475dd648
cmds-for-envsetup.sh: fa9aa6d8df1cad04a7fa3ef1b1ba56abe59130595fcd28b205811f7f88cc8dbe
firmware: dir
firmware/abl.img: 9c34466d964e4e1ec137dc981adbb1ce29b28aa0ae5bea9755e1640dede2208b
firmware/android-info.txt: 1b8db3c532c93661dd4b11a3c8b5e8493a07cc1aac471f0fbe3cdc819904906b

View file

@ -3,6 +3,7 @@ Android.mk: 6f19c305a871f3ff14e10719c0a4a29bd23ab56d225a210bcdcd7b3f8f248b59
AndroidProducts.mk: b0ac9ed34f646f349d985f637a7e8d1b0412f3be70f78e9c3a4fd2669b81f4a6
README.md: aea083d1852ec210deb59ac5f452b684ada27bba228ff7343ae8e432791a96a3
bramble.mk: b221bae19ee074a4ec7974e73df922a46a9163b49df1744aaf4ce411c71f3367
cmds-for-envsetup.sh: 60755bc7077d979897fc1aa65067b9184a859e4c688bb9d2ccf56c18e28916be
firmware: dir
firmware/abl.img: 3234a84bd1b1482a77ee7b198233e5a632f9d67cd5fdab1a960913940b2081de
firmware/android-info.txt: 7482ca19510cec39689f4b0f53144952af99f27eb37b0b6d7e53dee41b46b484

View file

@ -3,6 +3,7 @@ Android.mk: 4edc52299860ad9f3820326c7607b1af8abb3cade351fa78b786470b0b1a677c
AndroidProducts.mk: 2f880ed557f05b832ff1171f1025f108a2e511301ec9c1454a7964e5d24f19e3
README.md: b90194d0c8cb88f06c70ddd46cfa92a28b11ee252f7d70808e7f07142b17bdc8
cheetah.mk: 097908dbf1e9f1eed34205c635e6a0bc9773616b6d3fe6208ec6cf7cc8a0acef
cmds-for-envsetup.sh: 0ce2ae7cd97a233cd6203dd6ef8c3f9755f6cc20b95b1f8fe72bb9a172cc8b23
firmware: dir
firmware/abl.img: e559e3b3429ba16db5097c9a8166b971488a117c37310299f6bbf3559b76ffae
firmware/android-info.txt: 3efb2ac73a1b4177b1135d5ab51a55d9b9a676ba5b483b634db6b9b239d597be

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: 9533a617bde7a0b0114450052e3677879190cd9aa73b749b104460feb00800e1
AndroidProducts.mk: 03c63a841211bdd30c72e3345268868abab82bcd43889eb9432e9c02c481c7ed
README.md: 3d4c85604af0ae3c450924bd6b9f6ea2fad2f4e3e3c6babb86dd02368cc1e6e0
cmds-for-envsetup.sh: 5c2aaac62188bb477ed2987e6be331c6cff2fa0150db0dce0749d7d1e1c1387e
coral.mk: 5eb194e38a77691764e5c744316a4fca22c044a994b1a28472a1df75d9bca85c
firmware: dir
firmware/abl.img: f918d2a475cfd7bfde5d1e7c0b8d10bed956a5053681e1d77d2bb40ccccdaeef

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: c9cdc782549bf3a0a80f971455c89b3ca6e01055f8fbc27cc396c2a5301126f3
AndroidProducts.mk: 23118a80d381ffddd87f65c4f1f78de4250158c17732aed3e56ab349d000d24c
README.md: 5f137516511cf5fc7e11bf6d790bed1c93f14dad1f406a54fd4cecbe75989750
cmds-for-envsetup.sh: e7625675ebcd58cf7276771aab5b9f0ea9886f539f25918d7a1a698e987bf137
felix.mk: 851fb997c143a4aa6cf90ef6e6187ee44ceedae746ee2d1569727a76b80e1ae9
firmware: dir
firmware/abl.img: 26ac21b0eebf2703f909bba7dce36c00443c9908ebef392ad0cfc31f2efc2ab9

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: 54a9cac649f12cc6edf25045f3723f37fc4dec1287bd2ee3ef3f345c2940e353
AndroidProducts.mk: c93edf705c19a8b0219bae44fdfa1ce38be604dd1434e5411d64d484e684a565
README.md: fabb25d570b9ab6be98d69d3049ae9b1d538864dcab9faf633204b9986ea8271
cmds-for-envsetup.sh: 5fa6584fbe5a3a46400f752959f723716e89f329cf561fda2a45a87242dd7a0e
firmware: dir
firmware/abl.img: f918d2a475cfd7bfde5d1e7c0b8d10bed956a5053681e1d77d2bb40ccccdaeef
firmware/android-info.txt: 5ccaf05cd6216f15fa68c45d6bb4d75023d07d9198de10baaf08be4745827c09

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: c381306a5c885087ded2d443838d87e1a5ea94e31433051fd22e4e6c086575bf
AndroidProducts.mk: 72487fc93b7fede79ebd3dfa0ad13d75545e105fb228f65a7a1f9a586e8b96e8
README.md: 07a2e4324c4483c2a9a4e64002e466ac1bb8dda6dd4aec21ed244c683bdb0635
cmds-for-envsetup.sh: d3af0ef2f1a52f6242d8068964a3222073ebd5905618f8011dff11acea6c5bb4
firmware: dir
firmware/abl.img: 00c4f8999a1e3937517f9b0794128e779894dd3fac1660e7a8eb8939a91af851
firmware/android-info.txt: 41d093715435e4f4fa4ec299600859017edd4c885c4189792820a2514f22d0e1

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: aa0206eb7d5b1734e41fcaabf50eaa650bdee99e0da236843c776e1d197b63d6
AndroidProducts.mk: d3ac835ecbfb0e3df502022ff03370620c31f59ec92149c2e2aec4505d7e6938
README.md: d8a30e8b8c088363b87cd60e900c5e951dff586fabdae4244ae98004f20c38b7
cmds-for-envsetup.sh: aa8b7ca268f93daac3e6d6c225316f87ffd59a8fd569af0b547f9657bf27f571
firmware: dir
firmware/abl.img: ab8aa5674befa046ec21b61fb95685584f3737074d2ab2de67fc8f8dd6c1e9ec
firmware/android-info.txt: dff091d1c5e3b00b6e9128fa52702aa8366353977a22efd9fd4a7f11280bf022

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: d6a7ff082eb9b90b9bcca86ea7bbaba90537f965e389028c88c704c5c5bd088b
AndroidProducts.mk: 2bc49f391af4e887d7d8ddf2d9adb0c54915978788cd95c4a421a8d08ba9f56b
README.md: 595872b48e014f226bb37ee2dc8e2caa786f8371df818e068aa1812724bec674
cmds-for-envsetup.sh: 6ad7f5991878bbac3c0c45d17f29654eb6cf95d8c6a92b64c7549a64bacfa593
firmware: dir
firmware/abl.img: e559e3b3429ba16db5097c9a8166b971488a117c37310299f6bbf3559b76ffae
firmware/android-info.txt: 46c2cb03abd2114768eb2a3156af302000034aabcfc20667469aafee6609b8f4

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: 92d789cededa32266a52c57881468d0f5efd163b87c267f97213eedb83ff94b2
AndroidProducts.mk: 8cb16b0a8cdd7ff8f001a63ffdb6ee5fe168c17963004f766cb80390068cd649
README.md: ad79d5f6cf61cb3020bb84e30b61675ce6f1bdcdaebd52ef6e97fec19901df15
cmds-for-envsetup.sh: 85eee909dbd50b6314669fbf498d67e115d0976b6c4aad7eafce960571938625
firmware: dir
firmware/abl.img: ab8aa5674befa046ec21b61fb95685584f3737074d2ab2de67fc8f8dd6c1e9ec
firmware/android-info.txt: e62ae859fc444a9552f0fa603205a7d3a82de17782cca0447a49786f7e440970

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: f75271d1eba45eb471e9b3dffa0f7408651e6200e01dc042bed822421d590c29
AndroidProducts.mk: fb1b98422dbed3055ca8adf4274b8925e047979f54a34a5832148e8274d7b7e0
README.md: 3c35cb6ff3f9002cdedf1c62fff48a21bcc2bde96be22bcfeba3ddd1ed69514b
cmds-for-envsetup.sh: 79735fb78466de0004db6f027f4a0e22bb48a7740c081ea7a148af0837a2beec
firmware: dir
firmware/abl.img: 11db6b54f8f996fbc89ce14ad52f7bfcdcedb4cf2625c3d582ff0d8ff1064315
firmware/android-info.txt: 8d57fc6ba9acc2b58702a03a07b0ba1f97a52a7fcdeccc9ede1bf5b240551b6f

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: 42ff0b2e9160ca0ecf9b0da87b5a06057a81b260d6655f8d3a48795943e6f977
AndroidProducts.mk: 8ac03df01b4526feca7f6554918285e974ffe4c1fe4bb05f8ba50fb24896486c
README.md: 0f5e54eb8966916d3ac212672e7595401aaa74fb929cf8ad03b1d5bcc3345242
cmds-for-envsetup.sh: fdbecbcd958cc89cbdbe68f14159891c83b66a39364cdcfee8cd116e8cd0c42d
firmware: dir
firmware/abl.img: 89d21cffd2f6884cc5a72125968e5605faaf878876dfc8db01c937a3a3cbac3e
firmware/android-info.txt: 8e2a98ceb6067ed6fd42f83b7174b36a4f8effd430af488f12a0c19760e18877

View file

@ -2,6 +2,7 @@ Android.bp: c9ffd08891ecb53ae8e9094354e795dd69f8739b43792c4ad4b3bc7c768affcf
Android.mk: d81ba865d988c58adfc72c3ba3f62113a95438fd81dba91bfcdd82e111d4abcf
AndroidProducts.mk: 959a37c84ca5d813590059bd64ac6203b8ec8d06c576eee2aadf7a4f16049474
README.md: 18956bd57461b0635927439681702c11ad0b3030fc5798b20636db0000ebdf49
cmds-for-envsetup.sh: f073f3bde518cca39c41f638011de428c50863a4b806a8d0df4e805fd3367cc6
firmware: dir
firmware/abl.img: b4dd5d57a763df3688aabd7b304a290d1422fd0f21d90da79782998547846038
firmware/android-info.txt: d6f6767a9fbe9c79a2c955224861018bd76b94a1d99b34efa3965c4bb92f5411