LineageOS Merger Scripts
Variables
${TOP}/vendor/lineage/vars/ - This directory stores all variables for repositories that have upstreams that are regularly merged.
Standard Variables:
commmon - Stores the following data:
os_branch- Previous/current LineageOS versiondevice_branch- Previous/current branch name{prev_,}common_aosp_tag- Previous/current tracked AOSP tagcommon_aosp_build_id- Previous/current build ID stringtopic- The name of the topic to be used when pushing merges of newer tags to Gerrit for review before merging
Special Variables:
$platformName - e.g. qcom - These files store tags specific to relevant non-AOSP repositories where upstream repos are reguarly merged, such as CAF/CLO repositories.
- e.g.
qcom- Stores names of relevant SoC platforms mapped to the tag we currently track for that platform's repositories
devices - This file stores the matrix of devices we currently merge upstream repositories monthly for
pixels - This file stores the matrix of Pixel devices we currently merge upstream AOSP repositories monthly for, which coorelates directly to the current list of Google supported Pixel devices
kernel_repos - This file stores a matrix of kernel-paths relevant to AOSP devices we currently merge upstream AOSP repositories monthly for
See ../pixel/README.md for more
Scripts and usage
See ../pixel/README.md for scripts to update Pixels
Workflows
To merge a new AOSP tag platform-wide:
-
Wait for AOSP tags to show in https://android.googlesource.com/platform/manifest/
-
Wait for Pixel kernel tags to show in a post in https://groups.google.com/g/android-building
-
Edit
${TOP}/.repo/manifests/default.xmlwith the new main tag -
Edit
${TOP}/.repo/manifests/snippets/lineage.xmland replace any existing repo with non-pinned custom tag set with the new kernel tag from latest gen Pixel - e.g.android-13.0.0_r0.55 -
Edit
${TOP}/.repo/manifests/snippets/pixel.xmland replace all entries with the relevant Pixel kernel tags. commit the above changes -
Upload
LineageOS/androidchange generated to Gerrit -
Execute
repo syncon the working tree -
Edit
${TOP/vendor/lineage/vars/commonmoving the currently tracked tag fromcommon_aosp_tagtoprev_common_aosp_tag, then updatingcommon_aosp_tagto reflect the newly tracked tag, and then do the same forprev_common_aosp_build_idandcommon_aosp_build_id- lastly, update thetopicvariable to reflect the current month -
Run
aosp-merger/aosp-merger.sh, this will take some time, and reads all the variables you set up above while merging the new tags to all relevant tracked repos. This will likely create conflicts on some forked repository, and will ask you to resolve them. It will then issue a final check to ask you if you'd like to upload the merge to gerrit, then after approval uploads the merge to Gerrit for review. -
Once testing of the merge is completed, a global committer or higher can run
aosp-merger/aosp-merger.sh submit-platformto push the merge of the new tag to the HEAD of all relevant forked repositories -
Directly after
submit-platformis run, a Project Director must merge theLineageOS/androidchange on Gerrit uploaded as part of step 6 above
To merge a new AOSP tag to all currently Google supported Pixel devices and their relevant dependency repositories:
-
Wait for factory images to show up in https://developers.google.com/android/images
-
To discern build ID, the relevant
$deviceNamevariable:e.g.
pixel/update-any-var.sh build_id TQ2A.230305.008.C1 sunfish bramble redfin barbet cheetah -
Git commit the
vendor/lineage/varsvariable updates and upload to Gerrit -
Run
aosp-merger/aosp-merger.sh devicesto merge newly entered AOSP tags to all supported device's device-tree and dependencies, and upload the merges to Gerrit -
Run
aosp-merger/aosp-merger.sh kernelsto merge newly entered AOSP kernel tags to all supported device's kernel-tree and dependencies, and upload the merges to Gerrit -
Download pixel factory images, extract files and firmware - e.g.
source ${TOP}/vendor/lineage/vars/devices && for device in devices; do pixel/device.sh $device done -
cdto each relevant device'svendor/$oem/$deviceNamerepository, as well asvendor/firmwareandgit add/git committhe updated filesTODO: Automate this in the future
-
Update the build description/fingerprint for all supported Pixels by running
pixel/build-desc-fingerprint.sh- after this you need to manuallycdto each of the supported Pixel trees and upload the build description/fingerprint commits to Gerrit for reviewTODO: Automate this in the future
-
When testing is done, to push the device-specific tag merges to relevant repository HEAD's, run
aosp-merger/aosp-merger.sh submit-devices- Please note this can only be done by Pixel device maintainers OR Global Committers and aboveNOTE: If you have your vendor repositories tracked somewhere you sync, you will also need to
cdto those andgit pushthem at this time by hand -
Following the above, submit the kernel tag updates as well:
aosp-merger/aosp-merger.sh submit-kernels- Please note this can only be done by Pixel device maintainers OR Global Committers and above
To merge a new CAF/CLO tag to all forked repositories:
-
Fetch the latest tags for supported SoCs and current version of QSSI from https://wiki.codelinaro.org/en/clo/la/release
-
Edit
vendor/lineage/vars/qcom,git commitand upload the change to Gerrit -
Run the merger script on whatever platforms you have updated the tags to create merges and upload them to Gerrit - e.g. To merge on all support platforms you'd run
for platform in qssi msm8953 sdm660 sdm845 msmnile kona lahaina waipio-vendor waipio-video; do aosp-merger/aosp-merger.sh clo $platform done -
When testing is done, a global committer or higher can run the merger script to push the merges to HEADs - e.g. To push afformentioned merges on all support platforms you'd run
for platform in qssi msm8953 sdm660 sdm845 msmnile kona lahaina waipio-vendor waipio-video; do aosp-merger/aosp-merger.sh submit-clo $platform done