It is currently Wed Jun 19, 2013 9:56 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Sat Sep 12, 2009 12:16 pm 

There has been criticism on the kernel build for not supporting virtualbox & nvidia OTS
- for a long time... but this time has finally come to an end!

All you need to get a kernel package
- ready to compile nvidia or virtualbox kernel modules (others not tested)
- without the burden of a full kernel source tree
is this build script and a initial kernel .config file.

The build starts by unpacking the kernel source and exits with a kernel package in $CWD
- no actual install is done in the rootfs.

If you don't give it a kernel.config the script exits after unpacking & patching.

When you're finished configuring, just re-run build-kernel.sh -
it will resume the building just after patching.

You may need to modify this script for e.g. ATI graphic cards by copying needed files from
the source tree to the installed kernel until the kernel module can be build

And don't forget later to add those files with a comment to this build script and
re-run build-kernel.sh to make the final test build.

I've build linux-2.6.30.6 with a slightly modified (1) config from the latest zenwalk kernel:
config.kernel-2.6.30.5-mod
All files can be found here

(1)
added eeproms, removed 10Gb eth, allow for full-size-data-structures (not embedded ones) and tuned for M686.


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Sun Sep 13, 2009 12:37 am 

Fixed two bugs in build-kernel.sh introduced with 'last minute fixes',
- path fixes
- depmod instead of modprobe in postintall
small improvements and a build based on the latest zenwalk kernel config-2.6.30.5

All files found here


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Wed Sep 16, 2009 3:16 pm 

I've changed (again) the way the script is called...

One stage approach with $CWD/config-<kernelversion><localversion>
unpack, patching, make'ing, packaging all in one go.

Two stage approach
unpack, patching, if there is a $CWD/config-<kernelversion> it is copied over .config
and one of "menuconfig | xmenuconfig | gconfig" is called; when leaving, you will be
ask to proceed - in which case the current .config is copied to $CWD/config-<kernelversion><localversion>
and the build completes.

Next time you start build-kernel.sh one of "menuconfig | xmenuconfig | gconfig" is called and you will be ask again
- unless you copy .config to $CWD/config-<kernelversion><localversion> manually first.

The entire build is done in user land without need to be root and no install is done to the rootfs '/'!


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Sat Sep 19, 2009 1:18 am 

Added support for in-package-building of nvidia.ko
- boot into your desktop with a new kernel ;)

Added support for VirtualBox with kernel 2.6.31
- living on the edge... ;)

The firmware installed by default with kernels >2.6.26 is now packaged on it's own;
e.g. kernel-2.6.31.1-k8-62.1.txz and kernel-firmware-2.6.31.1-k8-62.1.txz

kernel-firmware-* contains firmware for devices configured in your build.

If you *know* for certain you won't need other firmware (to boot at least),
you can remove other kernel-firmware-* packages *before* installing this one.
.


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Sat Sep 19, 2009 3:31 pm 

Fixed naming to kernel-firmware-2.6.31.1-noarch-62.1.txz


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Tue Sep 22, 2009 10:15 am 
Regular Zenwalker
Regular Zenwalker

Joined: Mon Jul 14, 2008 8:16 am
Posts: 30
Excuse my ignorance.

I understand the aim of what you've done - correct me if I'm wrong.

VBox and Nvidia need to build kernel module during installation and to do it under Zenwalk you need full kernel source. You fixed this issue.

How to use it?
Someone will download kernel sources from links you gave with config for kernel and build_kernel script, build it according to your instructions and later tell nvidia installer where new kernel is?

Sorry for dumb questions, i'm all new to it.


 Profile Send private message  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Tue Sep 22, 2009 12:13 pm 

Quote:
How to use it?
Hm, let me say it in other words than already said

The idea was to modify a currently used kernel as easy as possible - eg, if you need a module not in the official kernel build,
you take the config-<version> and start building.

If you have nvidia already installed, the nvidia.ko can also be build and included in the package (NVIDIA=<path-to-xtracted-driver>)

My kernel build is all done in user space and, just as with any other package builds, you need to read/edit the build script prior calling it:
./build-kernel.sh
version=2.6.31 <-- the kernel source version
Lver=".x3" <-- the local version identifies your build
# following are purely informal and only used to name the package.
Karch=x86
build=62.1

Kver=<version><Lver> <-- the complete kernel version
The kernel source (linux-<version>.tar.bz2) is downloaded if not present.

If you have already a config-<Kver> file, the build completes with kernel-<Kver>-<Karch>-<build>.txz resp.
kernel-firmware-<Kver>-<noarch>-<build>.txz

If you have a config-<version> with your build script, it gets copied to the source dir and one of the kernel
configure scripts (menuconfig, xconfig, gconfig) gets called.

You still need some knowledge about package building... luckily, you don't need to be root - so no harm can be done!


  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Tue Sep 22, 2009 12:21 pm 
Regular Zenwalker
Regular Zenwalker

Joined: Mon Jul 14, 2008 8:16 am
Posts: 30
Thank you for taking time to explain


 Profile Send private message  
 
 Post subject: Re: A kernel build script - supports virtualbox & nvidia OTS
PostPosted: Wed Sep 23, 2009 6:33 pm 

Updated build-kernel.sh
- added files needed for aufs building


  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: