From 796a0e1c70d2fe60b836776d007ffbd1cc2858b4 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 13 Aug 2018 23:02:22 +0100 Subject: [PATCH] linux: move rebase procedure to submodule neutral section --- README.adoc | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/README.adoc b/README.adoc index 32e0867..8634416 100644 --- a/README.adoc +++ b/README.adoc @@ -3097,30 +3097,6 @@ This backwards compatibility is just awesome, it makes getting and running the l This also makes this repo the perfect setup to develop the Linux kernel. -When we had a local patchset on top of mainline, this is how we updated it: - -.... -# Last point before out patches. -last_mainline_revision=v4.15 -next_mainline_revision=v4.16 -cd linux - -# Create a branch before the rebase in case things go wrong. -git checkout -b "lkmc-${last_mainline_revision}" -git remote set-url origin git@github.com:cirosantilli/linux.git -git push -git checkout master - -git remote add up git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git -git fetch up -git rebase --onto "$next_mainline_revision" "$last_mainline_revision" - -# And update the README to show off. -git commit -m "linux: update to ${next_mainline_revision}" -.... - -But we have since moved to running just mainline, which makes the update simpler. - In case something breaks while updating the Linux kernel, you can try to bisect it to understand the root cause: <>. ==== Downgrade the Linux kernel @@ -9538,6 +9514,32 @@ rm -rf "$(./getvar -a arm build_dir)/host-qemu-custom.bisect" An example of Linux kernel commit bisection on gem5 boots can be found at: link:linux-bisect-boot-gem5[]. +==== Update a forked submodule + +This is a template update procedure for submodules for which we have some patches on on top of mainline. + +This example is based on the Linux kernel, for which we used to have patches, but have since moved to mainline: + +.... +# Last point before out patches. +last_mainline_revision=v4.15 +next_mainline_revision=v4.16 +cd linux + +# Create a branch before the rebase in case things go wrong. +git checkout -b "lkmc-${last_mainline_revision}" +git remote set-url origin git@github.com:cirosantilli/linux.git +git push +git checkout master + +git remote add up git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git +git fetch up +git rebase --onto "$next_mainline_revision" "$last_mainline_revision" + +# And update the README to show off. +git commit -m "linux: update to ${next_mainline_revision}" +.... + ==== Sanity checks Basic C and C++ hello worlds: