#!/bin/sh echo "You aren't supposed to run the script directly" echo "" echo "You should open it in the editor and copy/paste the commands into" echo "your terminal, making sure they complete as expected before moving" echo "on to the next command" echo "" echo "There are also points in the scripts where you're expected to" echo "do a build and test of everything to make sure you're on the" echo "right track" exit WORKSPACE=${WORKSPACE:-/linaro/platforms} cd ${WORKSPACE}/linux git remote add armlt ssh://git@git.linaro.org/landing-teams/working/arm/kernel-testing.git git remote add release ssh://git@git.linaro.org/landing-teams/working/arm/kernel-release.git ######################################################################## # # REBASING 4.4 # export SERIES=4.4 export rebase_topic_branches=${rebase_topic_branches:-no} # The base branch, 4.4-armlt-base is already based on upstream Linux v4.4 # # afd2ff9 2016-01-10 Linux 4.4 [Linus Torvalds] # # Then a series of merges and patches have been applied on top. We never need to # recreate the merges or commit to create this base branch. # # However, during an update of the LSK tree, sometimes we discover a patch that # we want to add to the 4.4-armlt-base branch. # # We usually find this out at the end, after updating and testing lsk-4.4-armlt. # The easiest thing to do here is to add the patch(es) you need to the top of # the tree and get it working. Once you know what you want, you add any new # patches to either 4.4-armlt-base OR to their relevant topic branch. # # Once we're happy that the patches are in their correct locations, we start # the integration again. # # If we updated 4.4-armlt-base, we like to rebase all of our topic # branches first. # # You can skip this if all you're doing this cycle is updating the LSK # upstream tree. # if [ "$rebase_topic_branches" == "yes" ]; then export NEW_BASE=4.4-armlt-base export OLD_BASE=armlt/testing-lsk-4.4-armlt git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-optee git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-fvp git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-hacks git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-tda998x git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-hdlcd git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-mali git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-juno-eas git rebase --onto ${NEW_BASE} ${OLD_BASE} 4.4-armlt-ipa fi ######################################################################## # # CREATE LSK 4.4 INTEGRATION BRANCH # # This is an integration of all out topic branches on top of our base branch # If you haven't updated the base branch and you haven't updated any topic # branches since the last time you did this, you can skip these steps. # # You can skip this if all you're doing this cycle is updating the LSK # upstream tree. # if [ "$recreate_integration_branch" == "yes" ]; then #export NO_EDIT=--no-edit git checkout -B 4.4-armlt v4.4 git merge --no-ff --no-edit 4.4-armlt-base git merge --no-ff --no-edit 4.4-armlt-optee git commit -a ${NO_EDIT} git pull --no-ff --no-edit git://git.linaro.org/kernel/linux-linaro-stable.git v4.4/topic/optee git merge --no-ff --no-edit 4.4-armlt-fvp git merge --no-ff --no-edit 4.4-armlt-hacks git commit -a ${NO_EDIT} git merge --no-ff --no-edit 4.4-armlt-scpi git merge --no-ff --no-edit 4.4-armlt-tda998x git merge --no-ff --no-edit 4.4-armlt-hdlcd git commit -a ${NO_EDIT} git merge --no-ff --no-edit 4.4-armlt-ipa git commit -a ${NO_EDIT} git merge --no-ff --no-edit 4.4-armlt-mali git commit -a ${NO_EDIT} git push -f armlt git push -f armlt 4.4-armlt:testing-4.4-armlt git branch --set-upstream 4.4-armlt armlt/testing-4.4-armlt fi ######################################################################## # # Update the upstream LSK 4.4 tree # # We have a branch called lsk-4.4-armlt that is our release branch. # It consists of the upstream LSK 4.4 branch from the LSK team with # our 4.4-armlt branch merged on top of it. # # if you don't have it, add the lsk remote git remote add lsk https://git.linaro.org/kernel/linux-linaro-stable.git if [ "$update_upstream_lsk" == "yes" ]; then # you normally want to update the upstream LSK tree at the start # of each month, but if you're re-running this integration several # times, you won't want to update the baseline every time unless # you know there's something new you want git remote update lsk git branch -f linux-linaro-lsk-v4.4-android lsk/linux-linaro-lsk-v4.4-android # lsk-v4.4-16.09-android fi git checkout -B lsk-4.4-armlt linux-linaro-lsk-v4.4-android # the LSK android topic can often lag behind the regular LSK branch # so we manually merge LSK back into -android to make sure we have # the latest of both # this may be risky and cause conflicts or other problems, so don't do # it unless there is a specific problem you want to solve # # git merge --no-edit lsk/linux-linaro-lsk-v4.4 # lsk-v4.4-16.09 # this crashes for us, so we revert it git revert --no-edit b2364ea00c5bd20e4f786f14fe411f62f1248ad4 # coresight: Add support for Juno platform git merge --no-edit 4.4-armlt git commit -a ${NO_EDIT} # We merge the EAS topics in after we update LSK on purpose # This is because they are only relevant to the LSK tree due to # EAS not being upstream in 4.4 # note: 4.4-armlt-juno-eas is still based on 4.4-armlt-base # note: lsk-4.4-armlt-eas-fixes is based on pure upstream Linux 4.4 but it only makes # send to merge this branch on top of LSK. Basing it on pure 4.4 makes it easier # to merge on top of a shifting LSK 4.4 tree git merge --no-ff --no-edit 4.4-armlt-juno-eas git merge --no-ff --no-edit lsk-4.4-armlt-eas-fixes # note: 4.4-armlt-scmi is based on top of lsk-4.4-armlt as it uses lots of patches # merged during the contruction of this branch export OLD_BASE=armlt/testing-lsk-4.4-armlt git rebase --onto lsk-4.4-armlt armlt/testing-lsk-4.4-armlt 4.4-armlt-scmi git checkout lsk-4.4-armlt git merge --no-ff --no-edit 4.4-armlt-scmi # test test test # Push to the test repo to share with others git push -f armlt lsk-4.4-armlt:testing-lsk-4.4-armlt git branch --set-upstream lsk-4.4-armlt armlt/testing-lsk-4.4-armlt # this will tag the repo for the release # see previous tags for the format of the commit message NEW_TAG=lsk-4.4-armlt-`date +%Y%m%d` COMMIT1=`git rev-parse --short lsk/linux-linaro-lsk-v4.4` COMMIT2=`git rev-parse --short lsk/linux-linaro-lsk-v4.4-android` GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a $NEW_TAG -m \ "Juno/vexpress Android kernel based on 4.4 version of Linaro Stable Kernel (LSK) Changes in this version: - Update to latest LSK code: linux-linaro-lsk-v4.4 at commit $COMMIT1 linux-linaro-lsk-v4.4-android at commit $COMMIT2 - EDIT THIS TO DESCRIBE ANY CHANGES eg. to the base branch or to the topic branches Issues: - Motherboard ethernet for Juno r1 and r2 are disabled in device-tree. " # List all of our tags for reference, this doesnt' make any changes git tag -l --sort=-refname 'lsk-4.4-armlt-????????' | (while read tag; do git tag -l -n99 $tag; echo; done) # Push to the release repo git push -f release lsk-4.4-armlt:lsk-4.4-armlt export LAST_TAG=`git describe --abbrev=0 --tags lsk-4.4-armlt` git push release ${LAST_TAG}