diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-29 02:43:54 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-29 02:43:54 +0000 |
commit | a08108ff3815ff657893e34bb95b734369955c16 (patch) | |
tree | bf52e50cc74ac6b3a35f95cda9b658a5da900cfc /build_tools | |
parent | b3641067b55756f83fe1ad5eb5398c590368ad6e (diff) |
A script to build zaptel vs. a kernel version from a git tree.
This should help test building vs. kernels in Linus's tree (as of
2.6.11).
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3572 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/test_kernel_git | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/build_tools/test_kernel_git b/build_tools/test_kernel_git new file mode 100755 index 0000000..7e11a81 --- /dev/null +++ b/build_tools/test_kernel_git @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +GIT_URL=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git + +usage() { + echo "$0: -k kernel_dir setup" + echo "$0: -k kernel_dir test <kernel_version>" + echo "$0: -k kernel_dir test-cur <kernel_version>" +} + +while getopts 'hk:' arg; do + case "$arg" in + k) kernel_dir="$OPTARG";; + h) usage; exit 0;; + *) usage; exit 1;; + esac +done + +shift $(( $OPTIND - 1 )) + +command="$1" + +case "$command" in + setup) + # Note: this creates the directory linux-2.6 under + # $kernel_dir . You should run + # "-k $kernel_dir/linux-2.6 test SOMEVERSION" + cd $kernel_dir + git clone $GIT_URL + ;; + test-cur) + ver="$2" + make KSRC="$kernel_dir" KVERS=$ver + ;; + test) + ver="$2" + tag="v$ver" + curdir="$PWD" + cd "$kernel_dir" + git-checkout $tag . + make prepare + cd "$curdir" + make KSRC="$kernel_dir" KVERS=$ver + ;; + *) + echo "$0: no such command $command. Aborting." + usage + exit 1 + ;; +esac |