Posts tagged package

Compile linux-* kernel packages

0

In Debian Like Systems it goes like this…

Installing need packages

1
apt-get install kernel-package libncurses5-dev fakInstalling need packageseroot wget bzip2 build-essential

Download and decompress the kernel from kernel.org

1
2
3
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.3.tar.bz2
bzip2 -d linux-2.6.22.3.tar.bz2
tar xvf linux-2.6.22.3.tar.bz2

Configure the source for compilation

1
2
3
4
cd /usr/src/linux-2.6.22-3
make clean && make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig

Load alternate file > .config > ESC > Save? Yes

Compiling

1
2
make-kpkg clean
fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers

Installing new linux-headers package

1
2
3
cd /usr/src
dpkg -i linux-headers-2.6.22.3-custom.deb
dpkg -i linux-image-2.6.22.3-custom.deb

Reconfiguring using new kernel (before boot or install linux-image)

1
export KERN_DIR=/usr/src/linux-headers-2.6.22.3/

Use the new kernel headers to configure you application, in my case Virtualbox

1
/etc/init.d/vboxdrv setup

Regards.

:-)

Modify CONTROL file in Debian Package

0

Suppose you have your-package.deb file and want to change files inside the package:

1
2
3
mkdir -p tmp/DEBIAN
dpkg-deb -x your-package.deb tmp/
dpkg-deb --control your-package.deb tmp/DEBIAN

Modify the file tmp/DEBIAN/control as you like it.

1
dpkg-deb -b tmp your-package-custom.deb

Finally,

1
dpkg -i your-package-custom.deb

Done!!!

Go to Top
?>