diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-11-02 07:45:53 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-11-02 07:45:53 +0100 |
commit | 6456bc07ff77aa5e8cd6641993936c1737aaad4d (patch) | |
tree | 62eb25ae08e2482c2af5121792d59821f4fb20b8 | |
parent | c51552ca8794c026b323bbe51528da2cfe213bb8 (diff) |
allow to bisect linux kernel
-rwxr-xr-x | embedded-test.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/embedded-test.sh b/embedded-test.sh index a1ade63..54f59a6 100755 --- a/embedded-test.sh +++ b/embedded-test.sh @@ -87,6 +87,7 @@ Explanation: --gcc-source=<dir> use directory with source for gcc --binutils-source=<dir> use directory with source for binutils --gdb-source=<dir> use directory with source for gdb + --kernel-source=<dir> use directory with source for Linux kernel --libc-version=<version> use version of C library --gcc-version=<version> use version of gcc --binutils-version=<version> use version of binutils @@ -149,6 +150,7 @@ while [[ $1 != -- && $1 = -* ]]; do case $1 { (--gcc-source=*) gccsource=${1#*=}; shift ;; (--binutils-source=*) binutilssource=${1#*=}; shift ;; (--gdb-source=*) gdbsource=${1#*=}; shift ;; + (--kernel-source=*) kernelsource=${1#*=}; shift ;; (--libc-version=*) libcversion=${1#*=}; shift ;; (--gcc-version=*) gccversion=${1#*=}; shift ;; (--binutils-version=*) binutilsversion=${1#*=}; shift ;; @@ -1459,6 +1461,28 @@ for lib in ${libc}; do clean=1 fi fi + # Linux kernel source used? + if [ ! -z $kernelsource ]; then + if [ ! -d $kernelsource ]; then + echo "Not a directory." + exit 1 + fi + if [ ! -f openadk/dl/linux-git.tar.xz ]; then + usrc=$(mktemp -d /tmp/XXXX) + echo "Creating Linux kernel source tarball openadk/dl/linux-git.tar.xz" + cp -a $kernelsource $usrc/linux-git + mkdir -p $topdir/openadk/dl 2>/dev/null + rm $topdir/openadk/dl/linux-git.tar.xz 2>/dev/null + (cd $usrc && tar cJf $topdir/openadk/dl/linux-git.tar.xz linux-git) + touch $topdir/openadk/dl/linux-git.tar.xz.nohash + # we need to clean system, when external source is used + if [ $noclean -eq 0 ]; then + clean=1 + fi + else + echo "Tarball already exist, skipping creation" + fi + fi # start with a clean dir if [ $cleandir -eq 1 ]; then echo "completely cleaning openadk build directory" |