#!/bin/bash set -x #for i in depend bzImage modules modules_install install #for i in distclean mrproper xconfig depend bzImage modules modules_install install for i in distclean mrproper xconfig depend bzImage modules modules_install install do if [ "$i" = xconfig ] then #cp configs/kernel-2.4.21-i686-smp.config .config cp ../esmft2.config .config fi #make -j5 $i || make $i || { echo make target $i failed exit 1 } if [ "$i" = xconfig ] then #cp configs/kernel-2.4.21-i686-smp.config .config cp .config ../esmft2.config fi done
The -j5 above says to build two files in parallel, because I did most of my builds on a four-cpu machine. Some people prefer #cpu's, some people prefer #cpu's + 1.
cd /usr/src
...is useful. This applies a compressed patch, and strips off the first
directory from pathnames within the patch. You can then "grep -i fail
/tmp/results" to see if anything didn't apply correctly.
...and then look around to see what's included. These are the modules
from your working initrd; make sure you get them in your new initrd if
they are still needed.
cp -rfv
...and then make my tweaks under /usr/local/src/
When applying kernel patches, gunzip -c patch.gz | patch -p1 >
/tmp/results
If you suspect you aren't getting the right modules into your initrd,
you can do the following with a known-good initrd:
gunzip -c /boot/initrd-2.4.18-14.img > /tmp/foo
mkdir -p /mnt/loop
mount -o loop /tmp/foo /mnt/loop
cd /mnt/loop/lib
If you get an unresolved symbol of "e1000_clean" when building the e1000
(intel gigabit ethernet) driver, make sure you click the "NAPI" option;
the driver doesn't build without this option.
When building a kernel with the Lustre patches today (Fri Sep 3
16:11:43 PDT 2004), it errored out on the new crypto stuff. If I go
into make xconfig and look around, it has all the crypto stuff grey'd
out. But if I ^Z after save & exit'ing, and vi .config, then
the .config has crypto enabled. I manually disabled it with vi,
and then fg'd.
Dan Stromberg - Aug 9, 2004