Build vbox kernel modules against 3.1.0-rc5 (vanilla)

I’d like to use VirtualBox with 3.1.0-rc5 but I’m having trouble compiling the vbox modules:

# rpm -qa | grep kernel
kernel-source-vanilla-3.1.rc5-1.1.noarch
kernel-vanilla-3.1.rc5-1.1.x86_64

kernel-desktop-2.6.37.6-0.5.1.x86_64
kernel-default-devel-2.6.37.6-0.7.1.x86_64
kernel-default-base-2.6.37.6-0.5.1.x86_64
kernel-desktop-devel-2.6.37.6-0.5.1.x86_64
kernel-devel-2.6.37.6-0.5.1.noarch
kernel-syms-2.6.37.6-0.5.1.x86_64
kernel-desktop-base-2.6.37.6-0.5.1.x86_64
kernel-source-2.6.37.6-0.5.1.noarch
kernel-default-2.6.37.6-0.5.1.x86_64
kernel-devel-2.6.37.6-0.7.1.noarch

VB is: VirtualBox-4.0-4.0.12_72916_openSUSE111-1.x86_64

I set /usr/src/linux to the 3.0.1 source:

# ls -ld /usr/src/linux
lrwxrwxrwx 1 root root 34 Sep  9 11:26 /usr/src/linux -> /usr/src/linux-3.1.0-rc5-1-vanilla

(I also did a make scripts oldconfig and prepare on the new kernel source.)

Attempting to compile results in:

# KERN_DIR=/usr/src/linux /etc/init.d/vboxdrv setup
...
Recompiling VirtualBox kernel modules                                                                                          done
Starting VirtualBox kernel modules                                                                                             failed
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)

dmesg shows:


 7568.615420] vboxdrv: no symbol version for module_layout

I also notice /var/log/vbox-install-log.txt has:

  WARNING: Symbol version dump /usr/src/linux-3.1.0-rc5-1-vanilla/Module.symvers
           is missing; modules will have no dependencies and modversions.

I thought I might be able to copy Module.symvers from /lib/modules/3.1.0-rc5-1-vanilla but it does not exist?

Any suggestions would be appreciated.

Thank you,
Lews Therin

While I’m not sure what the deal with the above was, I ended up just getting 3.0.1-rc5 from github and compiling that, against which the VirtualBox modules built with no issues.

I’d still like to know what the deal was with the Suse packages, but at least I have VirtualBox running again.

While I’m not sure what the deal with the above was, I ended up just getting 3.0.1-rc5 from github and compiling that, against which the VirtualBox modules built with no issues.

I’d still like to know what the deal was with the Suse packages, but at least I have VirtualBox running again.

So I looked at github, but could not determine where the entire kernel source files where located. Can you post a link for kernel 3.1-rc5 by chance? DId you see my message thread here on VM’s?

What VM do you recommend for openSUSE?

Towards the end of the thread is a link to install please_try_again’s vboxdrv update script you might want to install. It basically detects when the kernel has been updated and reloads the kernel modules for VirtualBox.

Thank You,

Hi James,

Thanks for the tip on the vbox update script, I’ll check it out!

Due to the recent issue with kernel.org server being compromised, Linus temporarily moved the kernel source to github and it is available at: https://github.com/torvalds/linux

If you have any other tips one why I was unable to build with the Suse packages, that would be great. It’s really just and educational exercise now, I’d just like to know how I may have been able to resolve it so as to understand better, that’s all.

Cheers,
Relative Prime

Hi James,

Thanks for the tip on the vbox update script, I’ll check it out!

Due to the recent issue with kernel.org server being compromised, Linus temporarily moved the kernel source to github and it is available at: GitHub - torvalds/linux: Linux kernel source tree

If you have any other tips one why I was unable to build with the Suse packages, that would be great. It’s really just and educational exercise now, I’d just like to know how I may have been able to resolve it so as to understand better, that’s all.

Cheers,
Relative Prime

So I had found the link to github, but I simply don’t understand its structure. Where are the entire kernel source files? As for VirtualBox I am using kernel 3.0.4 and I was able to reinstall/build the vbox drivers with no problem, but I have not tried version kernel 3.1.-rc5 yet to see if it might not work with vbox.

Thank You,

Hi
You can git clone or just hit the download button?


git clone https://github.com/torvalds/linux.git
cd linux
git checkout remotes/origin/HEAD


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 0:34, 3 users, load average: 0.03, 0.41, 0.59
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

First off malcolmlewis, I appreciate your help very much. But often I wonder if perhaps I have simply come from another time where people were intelligent, but you did not expect that they knew all of the details for a complicated action. But, if you provided detailed instructions, a normal person could follow them with success. I was not born knowing how to compile kernel and I have never before used git to download one. Your instructions were right on to download the complete source files, thought I had no idea just what I had. So, here is what I did to compile the latest kernel 3.1-rc6, according to the text displayed.

YaST (enter Root User Password) / Software / Software Management, searched on git and when found, installed it.

I then open up a terminal session and as a standard user ran the commands:

git clone https://github.com/torvalds/linux.git 
cd linux 
git checkout remotes/origin/HEAD

This seemed to download the full source code, uncompressed from the github web site. It took some time to complete and much longer than downloading a compressed file. It created a folder called linux in my home area ~/linux. The HEAD command indicated I had downloaded the source to kernel 3.1-rc6. In order to compile this kernel using sakc, without modifications, I needed to compress this folder so I open another terminal session and ran the following commands:

mv linux linux-3.1-rc6
tar cjfv linux-3.1-rc6.tar.bz2 linux-3.1-rc6/
cp linux-3.1-rc6.tar.bz2 ~/Downloads
sakc

The latest kernel then did compile as normal. I guess it would be nice to know the modified command required later that would exist after kernel.org comes back online. As always thanks for your help malcolmlewis.

Thank You,

Hi
With git downloads you normaly remove all the .git files as well;


cd linux
rm -rf .git
find . -name .git* -exec rm {} \;

You should probably name it as well with the git date since it’s a moving target;


mv linux linux-3.1-rc6.git20110912

The reason to use the date is the git reference may wind up less, hence using the date.

If you copy it first though, then in the original git download you can just update every day and it will pull the newer bits only.

So its not clear why the git files need to be removed. Would they keep the next update from working, using the same folder name of linux, if they where not removed? Can we use the same original Linux folder to run git again and thus save downloading time? Now I given the archive the kernel/Head name of linux-3.1-rc6. But, otherwise it would have been just called linux. When the kernel is compiled, where does this name come from? The name of the archive or is the name linux-3.1-rc6 in the source code and thus the final kernel name would be called linux-3.1-rc6 even though the original folder was called linux? How would one know that rc6 was released or still a work in progress, like you would have seen at kernel.org? Lots of questions I know.

For the record, I am now running the new kernel 3.1-rc6 without any detected problems so far. I reloaded the latest released nVIDIA proprietary video driver 280.13 without error. I am using please_try_again’s script that re-installs the vboxdrv files anytime they are discovered as missing on a restart. AND, to see if it is working, I am running a virtual session using VirtualBox and PCLinuxOS 2011 in Firefox 6.02 just see if all is working OK. So far so good. I see no problems with VirtualBox and kernel 3.1-rc6 to report.

Thank You,

Hi
Just a housekeeping thing, if you keep your original ‘linux’ directory
then in there you can run;


git pull https://github.com/torvalds/linux.git

From https://github.com/torvalds/linux
* branch            HEAD       -> FETCH_HEAD
Already up-to-date.

Then create a new tarball as required…

Have a look at the output from;


git show-ref
git show


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 4:02, 5 users, load average: 0.25, 0.22, 0.22
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

When you clone a git repository, you get all the information needed to
regenerate any kernel back to when Linus wrote git and put the kernel sources
into it. That is why the download was bigger than a normal compressed bz2 file.
You got kernel 3.1-rc5, -rc4, …, 3.0, 3.0-rc7, … If someone complains that
one of my drivers does not work in kernel 2.6.35, I can get the source with a
simple “git checkout v2.6.35” command. If there is a regression, and something
works in 2.6.38, but breaks in later kernels, it is easy to set up a bisection.
You merely specify the first bad kernel and the last good one. Git then picks
one in the middle and creates the sources for it. You build it, boot, and test
if it is broken. After you report good/bad, git bisects the correct half of the
source range, and you repeat until you locate the bad change. By deleting the
…git directory, you removed all that flexibility.

Here is a very crude script file that could fetch and create the kernel tarbal as well as create or update the source files. Here is what I have so far.

#!/bin/bash

#: Title       : GitKernelSource
#: Date Created: Mon Sep 12 20:09:41 CDT 2011
#: Last Edit   : Mon Sep 12 20:09:41 CDT 2011
#: Author      : James D. McDaniel
#: Version     : 1.00

#
# Git kernel Source files and or update them in ~/
#
cd ~/
if  ! -d "~/linux" ]] ; then
  git clone https://github.com/torvalds/linux.git
fi
cd ~/linux
git pull https://github.com/torvalds/linux.git

#
# Get Kernel Version Name for Tarball
#
kernel=$(git checkout remotes/origin/HEAD 2>&1)
size=${#kernel}
let counter=size
temp=""
while  $temp != " " ]] ; do
  temp=${kernel:$counter:1}
  version="$temp$version"
  let counter=counter-1
done
len=${#version}
version=${version:1:len-1}
version="linux-$version"

#
# Create Kernel Tarball & copy to ~/Downloads
#
cd ~/
mv linux $version
tar cjfv $version.tar.bz2 $version/
cp $version.tar.bz2 ~/Downloads
mv $version linux

exit 0

# End Of Script


Its getting late here on Monday and the Wife is complaining its time for bed. If you see anything wrong let me know and thank you in advance.

Thank You,

Some cool discussion here - thanks everyone for contributing. Nice job on the script James.

Malcomelewis: Might you have any insight into why I ran into the original trouble in the first post, trying to build the vbox modules against Suse’s kernel-vanilla-3.1.rc5-1.1.x86_64 sources? Of course, they build fine against kernel sources from git, and I’m good running 3.1.0-rc5 that way - but I was just curious as to what I may have been missing with the Suse sources? (I just like to figure out these little issues and be better armed for when the crop up again down the road.)

LewsTherin

So, I put together a little better script I have called gitksf for Git Kernel Source File to Tarball Creator. Obviously getting the entire kernel source tree can be used to create all sort of kernel versions. In this case, this script will do the following for you:

  1. Install git if it is not installed
  2. Download the entire kernel source tree from github, where it resides today (will change in the future)
  3. If, the source tree is present, update the tree today
  4. Create a kernel source file tarball as you could download from kernel.org when it was up and running.
  5. Copy the tarball to your ~/Downloads folder for use by any kernel compile script, such as sakc.

The following values can/could/should/perhaps be edited by the user before using the script:

downloads=~/Downloads
kernel_source=~/linux
giturl=https://github.com/torvalds/linux.git

To create the script, copy and paste the text in the following code field below into your favorite text editor and save it as the bash script file into your /home area bin folder as the file gitksf (/home/username/bin/gitksf

#!/bin/bash

#: Title       : gitksf
#: Date Created: Mon Sep 12 20:09:41 CDT 2011
#: Last Edit   : Tue Sep 13 17:53:41 CDT 2011
#: Author      : James D. McDaniel
#: Version     : 1.00
#: Description : Git Kernel Source File to Tarball Creator
#: Options     : None

TITLE="gitksf - Git Kernel Source File to Tarball Creator - Version 1.00" 

downloads=~/Downloads
kernel_source=~/linux
giturl=https://github.com/torvalds/linux.git

#
# Written for the openSUSE forums on Tuesday September 13, 2011 (Progammer's Day)
#

#
# Copy and Paste the text of this script into a text editor and save 
# it as the file gitksf in the folder ~/bin (/home/username/bin).
# This script must be marked executable to be used.  Please run 
# the following Terminal command: chmod +x ~/bin/gitksf
#

#
# This is the standard GPL Statement, leave at the top of the script.
# Just use the command show_gpl after this function for it to be shown.
#

function show_gpl {
echo ""
echo "github is a bash script file written to be used with openSUSE."
echo "Copyright (C) 2011 by James D. McDaniel, jmcdaniel3@austin.rr.com"
echo ""
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo ""
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
echo "GNU General Public License for more details."
echo ""
echo "You should have received a copy of the GNU General Public License"
echo "along with this program; if not, write to the Free Software"
echo "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
echo ""
}

#
# Determine if the package git is installed ****************************
#

suselinux="zypper in"

which git > /dev/null
Exit_Code=$?

if  $(( Exit_Code )) -ge 1 ] ; then
  tput clear
  echo "The git Utility Package is not installed!"
  echo
  echo -n "Would you like to install the git package(y/N)? "
  read CHOICE
  if  $CHOICE == [Yy] ]] ; then
    sudo $install git
  else
    echo "The git Utility Package was not installed!"
    exit 1
  fi
fi

#
# Main Program starts here
#

clear
echo $TITLE
echo

#
# Git kernel Source files and or update them in ~/
#
cd ~/
if  ! -d "$kernel_source" ]] ; then
  echo "The Linux Source Folder linux does not exist.  Do you wish"
  echo -n "to download the entire kernel source at this time? (y/N): "
  read CHOICE
  if  $CHOICE == [Yy] ]] ; then
    git clone $giturl
  else
    echo
    echo "Kernel Source Tarball Creation was aborted!"
    echo
    exit 1
  fi
else
  cd $kernel_source
  echo "Kernel Source File Check Update in Progress ..."
  echo
  git pull $giturl
fi

#
# Get Kernel Version Name for Tarball
#
kernel=$(git checkout remotes/origin/HEAD 2>&1)
size=${#kernel}
let counter=size
temp=""
while  $temp != " " ]] ; do
  temp=${kernel:$counter:1}
  version="$temp$version"
  let counter=counter-1
done
len=${#version}
version=${version:1:len-1}
version="linux-$version"

#
# Create Kernel Tarball & copy to ~/Downloads
#
if  ! -e "$downloads/$version.tar.bz2" ] ; then

#
# Request Permssion to proceed with Tarball Creation
#
  echo
  echo "Kernel/Head reports current kernel version is at: $version"
  echo -n "Proceed with kernel tarball creation now? (y/N): "
  read CHOICE
  if  $CHOICE == [Yy] ]] ; then
    cd ~/    
    mv linux $version
    echo
    echo "Your kernel tarball is being created.  Please wait ..."
    tar cjfv $version.tar.bz2 $version/ > /dev/null
    cp $version.tar.bz2 $downloads
    mv $version linux
    echo
    echo "The kernel file $version.tar.bz2 was copied to $downloads as requested."
  else
    echo
    echo "Kernel Tarball Creation was aborted by user!"
  fi
else
  echo
  echo "The kernel file $downloads/$version.tar.bz2 already exists."
  echo "Kernel file Tarball creation was aborted.  Please run again at a later date."
fi
show_gpl
exit 0

# End Of Script


The script file gitksf must be marked executable in order to use it. Open up a terminal session and run the following command:

chmod +x ~/bin/gitksf

To use the script, open up a terminal session and run the following command:

gitksf

I would like to thank Malcomelewis and lwfinger for your help in understanding how to use git from the github website. I hope that you might find this script useful and I accept any comments or suggestions you might have concerning the bash script gitksf.

Thank You,

When you clone a git repository, you get all the information needed to
regenerate any kernel back to when Linus wrote git and put the kernel sources
into it. That is why the download was bigger than a normal compressed bz2 file.
You got kernel 3.1-rc5, -rc4, …, 3.0, 3.0-rc7, … If someone complains that
one of my drivers does not work in kernel 2.6.35, I can get the source with a
simple “git checkout v2.6.35” command. If there is a regression, and something
works in 2.6.38, but breaks in later kernels, it is easy to set up a bisection.
You merely specify the first bad kernel and the last good one. Git then picks
one in the middle and creates the sources for it. You build it, boot, and test
if it is broken. After you report good/bad, git bisects the correct half of the
source range, and you repeat until you locate the bad change. By deleting the
…git directory, you removed all that flexibility.

So Larry when the kernel/Head is at 3.1-rc6 as it is now, how would you building kernel 3.0.4 from it? Is that an easy question to answer? The command git show-ref seems to indicates I can go back to version refs/tags/v2.6.11 somehow. But in fact how is that done?

Thank You,

Hey there,

For some reason the git tree from github.com does not seem to contain the 3.0.4 sources. You can however use the Suse Kernel git repo, which I verified does in fact have the 3.0.1 - 3.0.4 sources:

openSUSE:Kernel git - openSUSE

git clone git://kernel.opensuse.org/kernel.git suse-kernel-git
cd suse-kernel-git/
git show-ref
git checkout v3.0.4

Also, if you would like for your script, I believe git will let you build a tarball of a given version directly, see the section creating tarballs at Following Linux kernel development with git While you method certainly works just too, I thought you might find this useful.

Pete

Hey there,

For some reason the git tree from github.com does not seem to contain the 3.0.4 sources. You can however use the Suse Kernel git repo, which I verified does in fact have the 3.0.1 - 3.0.4 sources:

openSUSE:Kernel git - openSUSE

git clone git://kernel.opensuse.org/kernel.git suse-kernel-git
cd suse-kernel-git/
git show-ref
git checkout v3.0.4

Also, if you would like for your script, I believe git will let you build a tarball of a given version directly, see the section creating tarballs at Following Linux kernel development with git While you method certainly works just too, I thought you might find this useful.

Pete

I see lots of possibilities here and I am mulling over the best way to proceed. I had actually found the link you gave me, though I have yet to digest all the information that it contains. Thanks so much for your comments.

Thank You,

Hi
Whilst the initial download of the git clone is big, ongoing updates
are quick to build the next version with a git pull.

Maybe you need to look at adding the option in your script to select
a specific branch to build?

You could also look at adding a daily cron task to auto update and even
rebuild your kernel, so many ways.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 1:22, 4 users, load average: 0.46, 0.19, 0.16
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Indeed so many things one might do with the kernel source files. Here is a different way to look at it by requesting the kernel version you want to use.

  1. Install git if it is not installed
  2. Download the entire kernel source tree from github, where it resides today (will change in the future)
  3. If, the source tree is present, update the tree today
  4. Enter the kernel version you want to create as a tarball
  5. Create the kernel source file tarball as you could download from kernel.org when it was up and running.
  6. Copy the tarball to your ~/Downloads folder for use by any kernel compile script, such as sakc.

The following values can/could/should/perhaps be edited by the user before using the script:

downloads=~/Downloads
kernel_source=~/linux
giturl=https://github.com/torvalds/linux.git

To create the script, copy and paste the text in the following code field below into your favorite text editor and save it as the bash script file into your /home area bin folder as the file sgtb (/home/username/bin/sgtb

#!/bin/bash

#: Title       : sgtb
#: Date Created: Wed Sep 14 17:23:27 CDT 2011
#: Last Edit   : Thu Sep 15 20:15:00 CDT 2011
#: Author      : James D. McDaniel
#: Version     : 1.00
#: Description :  kernel source tarball creator
#: Options     :  none

TITLE="SGTB - SuSE Git Kernel Tarball Creator - Version 1.00"

declare -a sum
declare -a ker

downloads=~/Downloads
kernel_source=~/linux
giturl=https://github.com/torvalds/linux.git

#
# Written for the openSUSE forums on Thursday September 15, 2011
#

#
# Copy and Paste the text of this script into a text editor and save 
# it as the file sgtb in the folder ~/bin (/home/username/bin).
# This script must be marked executable to be used.  Please run 
# the following Terminal command: chmod +x ~/bin/sgtb
#

#
# This is the standard GPL Statement, leave at the top of the script.
# Just use the command show_gpl after this function for it to be shown.
#

function show_gpl {
echo ""
echo "sgtb is a bash script file written to be used with openSUSE."
echo "Copyright (C) 2011 by James D. McDaniel, jmcdaniel3@austin.rr.com"
echo ""
echo "This program is free software; you can redistribute it and/or modify"
echo "it under the terms of the GNU General Public License as published by"
echo "the Free Software Foundation; either version 2 of the License, or"
echo "(at your option) any later version."
echo ""
echo "This program is distributed in the hope that it will be useful,"
echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
echo "GNU General Public License for more details."
echo ""
echo "You should have received a copy of the GNU General Public License"
echo "along with this program; if not, write to the Free Software"
echo "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
echo ""
}

function kernel_version {
pattern="refs/tags/"
size=$(git show-ref 2>&1 | grep -c $pattern)
inc=1
while  $inc -le $size ] ; do
  temp=$(git show-ref 2>&1 | grep $pattern | sed -n $(( inc ))p)
  sum$inc]=${temp:0:40}
  len=${#temp}
  ker$inc]=${temp:52:len-52}
  let inc=inc+1
done 
}

function kernel_find {
inc=1
while  $inc -le $size ] ; do
  if  ${ker$inc]} == "$1" ] ; then
    return $inc
  fi
  let inc=inc+1
done
return 0
}

#
# Determine if the package git is installed ****************************
#

suselinux="zypper in"

which git > /dev/null
Exit_Code=$?

if  $(( Exit_Code )) -ge 1 ] ; then
  tput clear
  echo "The git Utility Package is not installed!"
  echo
  echo -n "Would you like to install the git package(y/N)? "
  read CHOICE
  if  $CHOICE == [Yy] ]] ; then
    sudo $install git
  else
    echo "The git Utility Package was not installed!"
    exit 1
  fi
fi

#
# Main Program starts here - Create and / or update kernel source files
#

clear
echo $TITLE
echo
cd ~/
if  ! -d "$kernel_source" ]] ; then
  echo "The Linux Source Folder linux does not exist.  Do you wish"
  echo -n "to download the entire kernel source at this time? (y/N): "
  read CHOICE
  if  $CHOICE == [Yy] ]] ; then
    git clone $giturl
  else
    echo
    echo "Kernel Source Tarball Creation was aborted!"
    echo
    show_gpl
    exit 1
  fi
else
  cd $kernel_source
  echo "Kernel Source File Check Update in Progress ..."
  echo
  git pull $giturl
  echo
  echo -n "Kernel Source Update Complete ... Please Press <enter> To Continue!"
  read CHOICE
fi

#
# Request Kernel Version to be converted into a Tarball
#

cd $kernel_source
kernel_version
cont=true
while $cont ; do
    clear
    echo $TITLE
    echo
    echo "Please Enter The Kernel Version that you wish to use."
    echo
    echo "Kernel Version Ranges are ${ker[1]} to ${ker$size]}:"
    echo
    echo -n "Please enter the kernel version to create (q=Quit): "
    read CHOICE
    if  $CHOICE == [Qq] ]] ; then
      show_gpl
      exit 0
    else
      kernel_find "$CHOICE"
      Exit_Code="$?"
      if  $Exit_Code -gt 0 ] ; then
    echo
    echo "You Have Requested a Kernel Version linux-${ker$Exit_Code]} Tarball."
    echo
    echo -n "Is that the Correct Kernel Version that You want to use? (y/N): "
    read CHOICE
    if  $CHOICE == [Yy] ]] ; then
      echo
      echo "Please wait while your Kernel Tarball is created!"
      cont=false
      git archive "${sum$Exit_Code]}" | bzip2 >  "$downloads/linux-${ker$Exit_Code]}.tar.bz2"
      if  ! -e "$downloads/linux-${ker$Exit_Code]}.tar.bz2" ] ; then
        echo
        echo "Your Linux Kernel Tarball was NOT created for some reason!"
        echo
        echo "folder/name: $downloads/linux-${ker$Exit_Code]}.tar.bz2" 
        show_gpl
        exit 1
      else
        echo
        echo "The Linux Kernel Tarball was created successfully!" 
        echo
        echo "folder/name: $downloads/linux-${ker$Exit_Code]}.tar.bz2" 
      fi
    fi
      else
    echo
    echo -n "No Match was found...Please Press <enter> To Try Again"
    read CHOICE
      fi
    fi
done

show_gpl

exit 0

# End Of Script

The script file gitksf must be marked executable in order to use it. Open up a terminal session and run the following command:

chmod +x ~/bin/sgtb

To use the script, open up a terminal session and run the following command:

sgtb

Just as before, I would love to hear any comments on the use of this script that you might have.

Thank You,

Hi James,

I don’t know if you are interested in using kdialog to get input from the user, but if so you could easily present them with a picklist of all the available versions with something like:

versionList=$(git show-ref | awk {'print $2'} | cut -d "/" -f 3 | grep -v origin | paste -sd " ") 
buildVersion=$(kdialog --combobox "Select Version:" $versionList)

Similarly, you could display the GPL with kdialog, etc. While I kind of like keeping it just text based, kdialog does provide a nice mechanism to do this with. It’s a mixed bag for sure. (I guess you could get really fancy and let the user choose which method with a --gui option, but that might be a bit overkill.) I think the majority of users of this might like the gui though.

Oh - similarly you could use Kdialog to have them pick if they want to download the sources from github, or from the Suse Kernel git repo - now that might be pretty handy actually. (I didn’t even know until I went looking that Suse had their own git repo!)

But this is all just icing, your script is looking great.

Pete