this is obsolete doc -- see http://doc.nethence.com/ instead

Linux kernel configuration 

 

It is not always best to use the latest kernel: you might want to keep the exact same version the Linux distribution provided and be able to compile the exact same packages. For example, the 'lirc' Slackbuild for Slackware 13.37 needs smp_lock.h, which is in 2.6.37.6 but not in the latest 2.6 kernel versions. 

 

That said, either use your Linux distribution’s ‘.config’ file and add what is missing or [build a custom kernel] (http://pbraun.nethence.com/doc/sysutils_linux/kernel_custom.html). In the former case, simply proceed like e.g. (Slackware64 13.1), 

cd /usr/src/linux-2.6.33.4/
make distclean
cp /boot/config-huge-2.6.33.4 .config

 

cat >> .config <<EOF9
<CHANGES HERE>
EOF9
make silentoldconfig

 

# Note. -j twice the number of cores
(( jobs = `grep ^processor /proc/cpuinfo | wc -l` * 2 ))
echo jobs: $jobs
time nice make -j$jobs
unset jobs

 

version=`grep version .config | awk '{print $NF}'`
echo version: $version
ls -lkd /lib/modules/$version/
rm -rf /lib/modules/$version/
unset version
make modules_install
cp -f arch/x86_64/boot/bzImage /boot/vmlinuz