Kernel

From CourvilleWiki

Jump to: navigation, search

Contents

debian kernel compilation and packaging procedure

config=ezra
config=nehemiah
rev=`date +%Y%m%d`
apt-get install alsa-source
apt-get install i2c-source
apt-get install lm-sensors-source
apt-get install lirc-modules-source
rm -rf /usr/src/modules/*
cd /usr/src
find -name '*.tar.gz' -maxdepth 1 -exec tar xzf {} \;
find -name '*.tar.bz2' -maxdepth 1 -exec tar xjf {} \;
cd linux
cp ../CONFIG.$config .config
make-kpkg clean
make-kpkg --arch-in-name --revision=$config.$rev --bzimage kernel_image modules_image
cp .config ../CONFIG.$config
cp .config ~www-data/debian/kernel-$config.txt

kernel used is latest 2.4 test release with the great IamTheOne patches http://blade5.bvu.edu/wiki/tiki-list_file_gallery.php?galleryId=2

debian kernel packages are availabe with kernel config file at http://www.courville.org/debian

compilation of additional modules

config=ezra
config=nehemiah
rev=`date +%Y%m%d`

cd ~/compil/ivtv/ivtv/driver
cvs -z3 update -dP
make clean && make
tar jcvf ~www-data/debian/$config/ivtv-modules-`uname -r`+$rev.tbz msp3400.o saa7115.o tveeprom.o ivtv.o saa7127.o ivtv-fb.o

cd ~/src/longhaul-1.2
make clean && make
tar jcvf ~www-data/debian/$config/longhaul-1.2-modules-`uname -r`+$rev.tbz longhaul.o governor.o

cd ~/compil
CVSSNAPDATE=`date --date '1 day ago' +%Y%m%d`
wget http://bytesex.org/snapshot/video4linux-$CVSSNAPDATE.tar.gz
rm -rf video4linux
tar zxvf video4linux-$CVSSNAPDATE.tar.gz
cd video4linux
make clean && make
tar jcvf ~www-data/debian/$config/v4l2-modules-`uname -r`+$rev.tbz v4l2-common.o v4l1-compat.o

additional binary modules

v4l2 and ivtv modules are available for download from http://www.courville.org/debian. Two tbz files are of interest: ivtv-modules-`uname -r`.tbz and v4l2-modules-`uname -r`.tbz. The two files must be untar in the appropriate location i.e.:

config=ezra
config=nehemiah
rev=`date +%Y%m%d`

cd /tmp
mkdir ivtv
cd ivtv
tar jxvf ivtv-modules-`uname -r`+$rev.tbz
install -m 0644 msp3400.o saa7115.o tveeprom.o ivtv.o saa7127.o ivtv-fb.o /lib/modules/`uname -r`/kernel/drivers/media/video

cd /tmp
mkdir longhaul
cd longhaul
tar jxvf longhaul-1.2-modules-`uname -r`+$rev.tbz
install -m 0644 longhaul.o governor.o /lib/modules/`uname -r`/kernel/arch/i386/kernel/

cd /tmp
mkdir v4l2
cd v4l2
tar jxvf v4l2-modules-`uname -r`+$rev.tbz
strip --strip-debug v4l2-common.o v4l1-compat.o
mkdir -p /lib/modules/`uname -r`/v4l2
cp -v v4l2-common.o v4l1-compat.o /lib/modules/`uname -r`/v4l2
depmod -a

generate diffs for the kernel tree

wget http://www.moses.uklinux.net/patches/dontdiff
diff -urN -X dontdiff linux-kernel-dir1 linux-kernel-dir2 > patch-kernel
rm -f dontdiff

Swsusp patch won't work with VIA C3 processors

This is a sad news: VIA C3 CPU does not have PSE support and therefore won't work at all with swsusp. Thus it is useless to try to use: http://sourceforge.net/projects/swsusp on your EPIA mobo...

Recompilation of a single module in case it fails

config=ezra
config=nehemiah
rev=`date +%Y%m%d`
KDATE=`date +%Y%m%d`
KVERS=2.4.23-ac1_t23.20030616
KSRC=/usr/src/linux
./debian/rules \
  KVERS="2.4.23-$config" \
  KSRC="/usr/src/linux" \
  KMAINT="Marc de Courville" \
  KEMAIL="marc@courville.org" \
  KDREV=$rev \
  kdist_image
Personal tools