aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2017-07-13 19:47:55 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2017-07-14 16:27:11 +0100
commit615350369877d24b20123540a46b522bfd05a8ca (patch)
tree876ce3afff22bfc75daf1de43a937ff909be1063
parentc15ae17385b520566c38238fb746163dafc6597b (diff)
platforms-rebase-latest.sh added
Like platforms-rebase-lsk-4.4.sh, platforms-rebase-latest.sh is not supposed to be run directly. Instead you use it as a crib sheet of commands to copy/paste to your terminal. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-xplatforms-rebase-latest.sh125
1 files changed, 125 insertions, 0 deletions
diff --git a/platforms-rebase-latest.sh b/platforms-rebase-latest.sh
new file mode 100755
index 0000000..d4abae5
--- /dev/null
+++ b/platforms-rebase-latest.sh
@@ -0,0 +1,125 @@
+#!/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
+
+# ----------------------------------------------------------------------
+# This file is an example for rebasing 'latest' kernel from v4.11-rc5 to v4.11
+# ----------------------------------------------------------------------
+
+export OLD_UPSTREAM=v4.12-rc1
+export NEW_UPSTREAM=v4.12
+export SERIES=latest
+
+# ----------------------------------------------------------------------
+# Create a 'base' branch which we will base all of our topics on.
+# Generally, this is for things that end up being changed and used by
+# a lot of topics, e.g. configs and device-trees, or for anthing else
+# that ends up being too much of a pain to merge with from seperate
+# topics.
+# ----------------------------------------------------------------------
+
+# First remember the old base topic...
+export OLD_BASE_TOPIC=`git show-ref -s armlt/${SERIES}-armlt-base`
+# Construct new base topic (just the configs in this case)...
+git checkout -f ${NEW_UPSTREAM}
+git checkout -B ${SERIES}-armlt-base
+# RMH - --allow_unrelated-histories doesn't work on my version of git
+#git pull --no-ff --no-edit --allow-unrelated-histories git://git.linaro.org/kernel/configs.git config-core-tracking
+#git pull --no-ff --no-edit --allow-unrelated-histories git://git.linaro.org/kernel/configs.git config-boards-tracking
+git pull --no-ff --no-edit git://git.linaro.org/kernel/configs.git config-core-tracking
+git pull --no-ff --no-edit git://git.linaro.org/kernel/configs.git config-boards-tracking
+
+# ----------------------------------------------------------------------
+# Rebase all of our topics onto the new base topic.
+# ----------------------------------------------------------------------
+
+export NEW_BASE_TOPIC=${SERIES}-armlt-base
+git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-configs
+git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-misc
+git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-fvp
+git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-juno
+git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-hdlcd
+#git rebase --onto ${NEW_BASE_TOPIC} ${OLD_BASE_TOPIC} ${SERIES}-armlt-mali
+
+# ----------------------------------------------------------------------
+# Construct integrated kernel branch with all our topics merged in
+# Note, where there are merge conflicts they need resolving before
+# applying the merge with 'git commit -a'. If you have git rerere setup
+# it will remember the conflict resolutions and fix them next time. (You
+# still need to commit the resolutions rerere does though)
+# ----------------------------------------------------------------------
+
+git checkout -f ${NEW_UPSTREAM}
+git checkout -B ${SERIES}-armlt
+git merge --no-ff --no-edit ${SERIES}-armlt-base
+git merge --no-ff --no-edit ${SERIES}-armlt-configs
+git merge --no-ff --no-edit ${SERIES}-armlt-misc
+git merge --no-ff --no-edit ${SERIES}-armlt-juno
+git merge --no-ff --no-edit ${SERIES}-armlt-hdlcd
+git commit -a
+git merge --no-ff --no-edit ${SERIES}-armlt-fvp
+git commit -a
+#git merge --no-ff --no-edit ${SERIES}-armlt-mali
+
+# ----------------------------------------------------------------------
+# Now test the kernel!
+# ----------------------------------------------------------------------
+
+test test test
+
+# ----------------------------------------------------------------------
+# Update ARM LT testing repo 'armlt'
+# ----------------------------------------------------------------------
+
+# Push everything...
+git push -f armlt latest-armlt:testing-latest-armlt
+git push -f armlt
+# Might be nice to keep a 'master' branch up-to-date with upstream we use
+git branch -f master ${NEW_UPSTREAM}
+git push -f armlt master
+# Push Linus's tag out as well...
+git push armlt refs/tags/${NEW_UPSTREAM}
+# Or can push all tags instead in case we skipped some -rc versions...
+git for-each-ref --format="%(refname)" "refs/tags/${NEW_UPSTREAM}*" |\
+ (while read tag; do git push armlt $tag; done)
+
+# ----------------------------------------------------------------------
+# Update ARM LT release repo if required
+# ----------------------------------------------------------------------
+
+# Create a tag. (This is an automated set of commands which may go wrong
+# and will require editing each time for tag names and description)
+git checkout latest-armlt
+export LINUX_TAG=`git describe --abbrev=0 --tags` # Doesn't work if we already have tags!!!
+NEW_TAG=latest-armlt-`date +%Y%m%d`
+GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a ${NEW_TAG} -m \
+"Juno/vexpress/FVP kernel based on latest version of Linux (${LINUX_TAG})
+
+Changes in this version:
+- Update to latest version of Linux.
+
+Issues:
+- Mali driver omitted because it doesn't compile with latest Android
+ sync APIs
+"
+# To delete the tag if we mess up...
+# git tag -d ${NEW_TAG}
+
+# Push to 'release' repo
+git push -f release HEAD:latest-armlt
+git push release ${NEW_TAG}