Skip to content

Instantly share code, notes, and snippets.

@artagnon
Last active December 25, 2015 11:58
Show Gist options
  • Save artagnon/6972510 to your computer and use it in GitHub Desktop.
Save artagnon/6972510 to your computer and use it in GitHub Desktop.
My custom build script for linux.git.
# usage: git-make ;for x86 linux.git build or make -j 8
# or: git-make prove ;for git.git tests
# or: git-make um ;for um linux.git build
# or: git-make um32 ;for um32 linux.git build
# or: git-make arm ;for arm64 linux.git build
function git-make () {
unset ARCH
unset SUBARCH
unset CROSS_COMPILE
test "true" = "$(g rp --is-inside-work-tree 2>/dev/null)" || exit 1
case "$1" in
"prove")
make -j 8 test
;;
"um")
make mrproper
make defconfig ARCH=um
make -j 8 ARCH=um
;;
"um32")
make mrproper
make defconfig ARCH=um SUBARCH=i386
make -j 8 ARCH=um SUBARCH=i386
;;
"arm")
make mrproper
make defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
make -j 8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
;;
*)
if test -f Kconfig; then
make mrproper
make defconfig ARCH=x86
make -j 8 ARCH=x86
else
make -j 8
fi
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment