Skip to content

Instantly share code, notes, and snippets.

@danrue
Created December 2, 2020 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danrue/30fb7ee75bcd6c2050935e5e25e88083 to your computer and use it in GitHub Desktop.
Save danrue/30fb7ee75bcd6c2050935e5e25e88083 to your computer and use it in GitHub Desktop.
Demonstration of using TuxBuild with Android's Gerrit

TuxBuilding a Gerrit Change From Android Review

A common android kernel gerrit change can be built directly using --git-repo 'https://android.googlesource.com/kernel/common' and the --git-sha of the patch.

To retrieve the full sha of a gerrit change, click the "copy full SHA to clipboard" button next to the patch.

For example, given the following gerrit review https://android-review.googlesource.com/c/kernel/common/+/1511435

Build a specific gerrit change with gcc-9/arm64/tinyconfig:

tuxbuild build --git-repo 'https://android.googlesource.com/kernel/common' --git-sha e25063f91324310b46dc3cbc127831ae62d8a4b2 --target-arch arm64 --kconfig tinyconfig --toolchain gcc-9

Building Linux Kernel https://android.googlesource.com/kernel/common at e25063f91324310b46dc3cbc127831ae62d8a4b2
⏳ Queued:  arm64 (tinyconfig) with gcc-9 @ https://builds.tuxbuild.com/1l4rzrwQ1i7zliqRUMoQ6ZE0lWJ/
⚗️  Building: e25063f91324 ("ANDROID: vmlinux.lds.h: merge compound literal sections") arm64 (tinyconfig) with gcc-9 @ https://builds.tuxbuild.com/1l4rzrwQ1i7zliqRUMoQ6ZE0lWJ/
👾 Pass (3 warnings): e25063f91324 ("ANDROID: vmlinux.lds.h: merge compound literal sections") arm64 (tinyconfig) with gcc-9 @ https://builds.tuxbuild.com/1l4rzrwQ1i7zliqRUMoQ6ZE0lWJ/

Build Using --git-ref

It's also possible to use the --git-ref of the change, by providing the gerrit change ID and patch number.

tuxbuild build --git-repo 'https://android.googlesource.com/kernel/common' --git-ref 'refs/changes/35/1511435/5' --target-arch arm64 --kconfig tinyconfig --toolchain gcc-9

Building Linux Kernel https://android.googlesource.com/kernel/common at refs/changes/35/1511435/5
⏳ Queued:  arm64 (tinyconfig) with gcc-9 @ https://builds.drue.dev.tuxbuild.com/1l4s1HjBNXuWqnVPnoDRWlBlXe5/
⚗️  Building: e25063f91324 ("ANDROID: vmlinux.lds.h: merge compound literal sections") arm64 (tinyconfig) with gcc-9 @ https://builds.drue.dev.tuxbuild.com/1l4s1HjBNXuWqnVPnoDRWlBlXe5/
👾 Pass (3 warnings): e25063f91324 ("ANDROID: vmlinux.lds.h: merge compound literal sections") arm64 (tinyconfig) with gcc-9 @ https://builds.drue.dev.tuxbuild.com/1l4s1HjBNXuWqnVPnoDRWlBlXe5/
@danrue
Copy link
Author

danrue commented Dec 2, 2020

gerrit-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment