26 August 2004 - MikePatterson

Retrieve sources for 2.6.8.1 from http://www.isurf.lkams.kernel.org/pub/linux/kernel/v2.6/

(that's the latest stable, might as well go big or go home). Why that site? It's a Canadian mirror of kernel.org with 155mbits - I got 570KB/s.

Configure kernel.

Build with:

quadra# make-kpkg clean
quadra# make-kpkg --append-to-version -watform --revision mpatters.1 binary modules_image

Now, quadra (and the other Dells) use a Broadcom network interface which in previous (2.4) kernels requires an external module to be built. However, sarge found the network interface just fine on aransas as tg3, so I built that right into the kernel on quadra (see attached config). So that should be sufficient.

gcc -DMODULE -D__KERNEL__ -DDBG=0 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT -DINCLUDE_5701_AX_FIX=1 -Wall -Wstrict-prototypes -O6 -I/usr/src/linux-2.6.8.1/include   -c -o b57um.o b57um.c
In file included from b57um.c:19:
mm.h:31: linux/modversions.h: No such file or directory
In file included from /usr/src/linux-2.6.8.1/include/asm/smp.h:18,
                 from /usr/src/linux-2.6.8.1/include/linux/smp.h:17,
                 from /usr/src/linux-2.6.8.1/include/linux/sched.h:23,
                 from /usr/src/linux-2.6.8.1/include/linux/module.h:10,
                 from mm.h:33,
                 from b57um.c:19:
/usr/src/linux-2.6.8.1/include/asm/mpspec.h:6: mach_mpspec.h: No such file or directory
In file included from /usr/src/linux-2.6.8.1/include/linux/smp.h:17,
                 from /usr/src/linux-2.6.8.1/include/linux/sched.h:23,
                 from /usr/src/linux-2.6.8.1/include/linux/module.h:10,
                 from mm.h:33,
                 from b57um.c:19:
/usr/src/linux-2.6.8.1/include/asm/smp.h:71: mach_apicdef.h: No such file or directory
In file included from /usr/src/linux-2.6.8.1/include/linux/irq.h:20,
                 from /usr/src/linux-2.6.8.1/include/asm/hardirq.h:6,
                 from /usr/src/linux-2.6.8.1/include/linux/interrupt.h:12,
                 from mm.h:48,
                 from b57um.c:19:
/usr/src/linux-2.6.8.1/include/asm/irq.h:16: irq_vectors.h: No such file or directory
make[2]: *** [b57um.o] Error 1
make[2]: Leaving directory `/usr/src/modules/bcm5700/src'
make[1]: *** [build-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/bcm5700'
Module /usr/src/modules/bcm5700 failed.
Hit return to Continue

So let's take out the bcm5700 driver, if we can - remove all drivers but the tg3 and rebuild with same make-kpkg line.

That died too. :~( Now what... Ohh. It's building things from /usr/src/modules/bcm5700, but why? I didn't tell it to go in there! mv it to modules_whoknows and start again with "make-kpkg clean" and the same command line as before with binary modules_image. Maybe it's just looking in /usr/src/modules and finding the bcm5700 driver there and assuming that means I want to build it.

How odd. I wound up with a kernel-headers .deb (which I installed) but nothing else - no kernel-image, particularly.

Google, and try this:

1>(root)@quadra[167]% make-kpkg clean ; make-kpkg buildpackage --append-to-version -watform --revision mpatters.1
la la
make[1]: Leaving directory `/usr/src/linux-2.6.8.1'
 dpkg-source -b linux-2.6.8.1
dpkg-parsechangelog: error: cannot open ./linux-2.6.8.1/debian/changelog to find format: No such file or directory
dpkg-source: error: syntax error in parsed version of changelog at line 0: empty file
make: *** [stamp-buildpackage] Error 29

So I suspect it's angry that I'm not using a debian package for the kernel source.

ooo, should have checked backports.org.

wget http://www.backports.org/debian/dists/stable/kernel-2.6/binary-i386/kernel-source-2.6.7/kernel-source-2.6.7_2.6.7-3_all.deb

Install that, untar the sources, and also grab http://www.backports.org/debian/dists/stable/kernel-2.6/binary-i386/kernel-source-2.6.7/kernel-package/kernel-package_8.093_all.deb and install that.

cd /usr/src/kernel-source-2.6.7 && make-kpkg clean

now make menuconfig again. smile (This is why I hate Linux.) And: make-kpkg clean && make-kpkg --append-to-version -watform --revision mpatters.1 binary modules_image. And I still don't get a kernel-image package.

google hints that perhaps my modutils package is out of date - grab that from backports too. And let's make sure PATH = showpath vendor u=m, just in case. "make-kpkg clean" and build again with "make-kpkg --append-to-version -watform --revision mpatters.1 binary modules_image". Get module_init_tools from backports too.

27 August

That seems to have done it - we now have debs for image, headers, source, and docs. So install the image and headers, run LILO, reboot, and cross fingers... nope, that didn't cut it. Panicked trying to mount root. Reboot and watch kernel messsages: it looks like it loaded SCSI drivers fine. So did I miss a filesystem? scsi1:A:0 is the hdd... it sees sda and the partitions, but "Kernel panic: VFS: Unable to mount root fs on sda6."

Nope, didn't miss any filesystem types, but I did enable an experimental Adaptec driver for the AIC7xxx and had the other be a module. So let's disable the experimental and build the other one right in.

Since we're broken already, I skipped make-kpkg clean and did a make-kpkg with the same revisions as above. If that doesn't work, try it again with a clean and new revision increment... humpf, looks like that didn't save us any time at all, it appears to be rebuilding everything.

Either way, that wasn't the problem either. Boot from FC1 rescue CD again. SevernTsui suggested I try copying the old kernel config over - he thought there was a config upgrader. Looking more carefully, it appears that perhaps I need to upgrade a few more system packages.

From http://kerneltrap.org/node/view/799 it looks like I may need to upgrade procps, so get the backports for that too. Also: e2fsprogs (maybe that's why it panicked?). Ditto kernel-package, kernel-kbuild.

After all that, go back to the source directory. make-kpkg clean and

make-kpkg --append-to-version -watform --revision mpatters.3 binary modules_image

LILO balked whilst installing the resulting debs, so I got grub and purged lilo. grub-install /dev/sda, grub and then root(hd0,4), setup(hd0)... / is on sda6, but /boot is on sda5.

menu.lst didn't get created, so copy one from williams and edit to taste. Don't forget: quadra has a separate /boot partition, so references to kernel images should be like /vmlinuz, not /boot/vmlinuz (because root(hd0,4) = sda5 = /boot).

That worked, but I somehow missed building the driver for the network card in! So rebuild with revision 4 and include that after a make-kpkg clean again.

That worked a treat and now quadra's running 2.6. But it still craps out after allocating 2077MB, so I guess I need the kernel patch to allow allocating 4gb.

Topic revision: r6 - 2004-08-27 - MikePatterson
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback