Making Ubuntu 8.04 work with the HP Thin Client t574x

The network chipset provided by this Thin Client is a BCM 57780 which is not supported by default by Ubuntu 8.04.

In order to change that you can download a more recent driver for the Tigon3 either from the Broadcom Web site (110g at time of writing) at http://www.broadcom.com/support/ethernet_nic/netlink_k57.php or previous versions as preserved on the HP site at ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p122860230/

To make compatible drivers for the Ubuntu kernel, the best approach is to create a chroot of Ubuntu 8.04 to have a clean install env.
You can use debootstrap for that. As the project Lead of project-builder.org, I used my rpmbootstrap command through pb which did that for me:

$ pb -p pb -m ubuntu-8.04-i386 newve
Project: pb
Action: newve
Creating the debootstrap VE for ubuntu-8.04 (i386)... OK
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Retrieving Packages
I: Validating Packages
I: Found packages in base already in required: gzip tar
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: libgdbm3 perl-modules
I: Checking component main on http://linuxcoe.corp.hp.com/LinuxCOE/Ubuntu...
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
[...]
I: Retrieving zlib1g
I: Validating zlib1g
I: Extracting base-files...
I: Extracting base-passwd...
I: Extracting bash...
[...]
I: Extracting util-linux...
I: Extracting zlib1g...
I: Installing core packages...
I: Unpacking required packages...
I: Unpacking base-files...
I: Unpacking base-passwd...
[...]
I: Unpacking util-linux...
I: Unpacking zlib1g...
I: Configuring required packages...
I: Configuring sysv-rc...
[...]
I: Configuring system-services...
I: Configuring libc6...
I: Unpacking the base system...
I: Unpacking adduser...
I: Unpacking apt...
[...]
I: Unpacking wpasupplicant...
I: Unpacking xkb-data...
I: Configuring the base system...
I: Configuring sudo...
I: Configuring libsysfs2...
[...]
I: Base system installed successfully.

$ sudo cp /etc/hosts /home/rinse/ubuntu/8.04/i386/etc/hosts... OK
Fixing permissions... OK

Then you can go into the chroot to prepare it for being a good build environment (in particular copying in it the .config file coming from the Ubuntu 8.04 live CD under /boot/config-2.6.24-26-generic):

$ cp /media/USBDISK/config-2.6.24-26-generic /home/rinse/ubuntu/8.04/i386/tmp/.config
$ sudo chroot /home/rinse/ubuntu/8.04/i386/ /bin/bash
# mount -t proc proc /proc
# apt-get install linux-headers-2.6.24-16-generic linux-source-2.6.24 libncurses5-dev gcc unzip
[...]
# cd /usr/src
# tar xfj linux-source-2.6.24.tar.bz2
# ln -sf linux-source-2.6.24 linux
# cd linux-source-2.6.24
# mv /tmp/.config .
# perl -pi -e 's/EXTRAVERSION = .3/EXTRAVERSION = -26-generic/' /usr/src/linux/Makefile
# make clean prepare scripts
[...]
scripts/kconfig/conf -s arch/x86/Kconfig
CHK include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
CC arch/x86/kernel/asm-offsets.s
GEN include/asm-x86/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
# cd /root
# wget http://www.broadcom.com/docs/driver_download/570x/linux-3.110g.zip
[...]
# unzip linux-3.110g.zip
[...]
# tar xfz Server/Linux/Driver/tg3-3.110g.tar.gz
# make clean
rm -f tg3.o tg3.ko tg3.mod.c tg3.mod.o tg3.4.gz tg3_flags.h .tg3* Module.symvers modules.order
rm -rf .tmp_versions Module.markers
# make KVER=2.6.24-26-generic
sh makeflags.sh /usr/src/linux > tg3_flags.h
make -C /usr/src/linux SUBDIRS=/root/tg3-3.110g modules
make[1]: Entering directory `/usr/src/linux-source-2.6.24'

WARNING: Symbol version dump /usr/src/linux-source-2.6.24/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /root/tg3-3.110g/tg3.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/tg3-3.110g/tg3.mod.o
LD [M] /root/tg3-3.110g/tg3.ko

Now you can use that tg3.ko module with insmod into your live CD and have network support !
(Original article available at http://brunocornec.wordpress.com/2010/11/10/making-ubuntu-8-04-work-with...