pointless.net  • Blog • Photos • About


There is a fair amount of info out there on repurposing the HP t5352 thin client, this post is the most popular one.

Unfortunately the info that's out there doesn't cover upgrading the Debian Wheezy, or on running a kernel other than the HP supplied one. This post is my notes from getting Wheezy running.

Firstly you'll need serial console access. It might be possible to make this work with netconsole and booting off of a fat formated usb flash drive by pretending to be a HP recovery image. But then you wouldn't be able to change the u-boot settings.

You can find the serial console pinouts here (There is lots of other good info on those pages). I didn't have a 1.25mm pitch 4 pin connector so I carefully removed the metal connectors + wires from a different pitch connector and then plugged the connectors in with a pair of fine pliers, which was irritatingly fiddly, consider using a bit of insulating tape on the middle connector to avoid them shorting.

/m/p/jasper/phone/thumb_IMG_20140416_051514.jpg

The serial console is 115200 8n1, press any key pretty much immediately after it's powered on to get to the u-boot prompt.

I've used a tftp server to serve the kernel and initrd images, a flash drive would work as well.

We'll need to change some u-boot settings so the Debian kernel knows what type of machine it's running on. Note that these changes will apparently stop the HP kernel running!:

setenv mainlineLinux yes
setenv arcNumber 2846
setenv machid b1e
saveenv

The critical thing seems to be the setenv machid b1e, arcNumber on it's own didn't work for me.

Now grab uImage and uInitrd from here:

http://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/openrd/

and put them on your tftpserver

Now enter at the u-boot prompt: (If you are copying and pasting do it a line at a time):

setenv ipaddr 172.31.24.169
setenv serverip 172.31.24.31
tftpboot 0x01100000 uInitrd
tftpboot 0x00800000 uImage
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most base-installer/install-recommends=false
bootm 0x00800000 0x01100000

Since we've only got 512Mb of flash to play with we need to minimise the amount of packages we install, the base-installer/install-recommends=false helps with that.

u-boot should load the initrd and kernel and the bootm command should boot the kernel.

Now go through the install as usual, note that the version of u-boot on the t5352 does not appear to support the ext4 file system, I used ext2 instead, you could try a small fat formatted /boot partition instead. I also didn't bother with a swap partition.

Part way through the actual install it will run out of disk space. To fix go down the menu of installer options and choose the one to run a shell, then type:

# chroot /target
# apt-get autoclean
# exit
# exit

and then re-do the software install stage of the installation. There doesn't seem to be a way to tell the installer to not cache packages :(

Once the install is done we need to set some u-boot vairables so the machine will boot the debian kernel, this assumes you have a single parition:

setenv debian 'ide reset;ext2load ide 0:1 0x800000 /boot/uImage;setenv bootargs $(debian_bootargs);bootm 0x800000'
setenv debian_bootargs 'console=ttyS0,115200n8 console=tty0 video=xgifb root=/dev/sda1 rw'
setenv bootcmd 'run debian'
saveenv

You should be able to boot from power on now.

Note, you need to make these changes from uboot, the fw_printenv command that ships with the Debian u-boot-tools package dosen't appear to be able to work with the uboot on the t5325, maybe it calculates the checksum differently?!?

To free up some more space there's a few things we can do:

add:

DSELECT::Clean "always";
APT::Clean-Installed "true";
Dir::Cache {
     srcpkgcache "";
     pkgcache "";
}

to /etc/apt/apt.conf.d/99AutomaticClean to keep the package cache clean, then rm /var/cache/apt/*.bin

now install some tools to help us clean up the packages a bit apt-get install localepurge deborphan debfoster, and then run:

# localepurge
# deborphan | xargs apt-get -y remove --purge
#

If you can live without documentation you can also run:

# rm -rf /usr/share/doc/
# rm -rf /usr/share/doc-base/
# dpkg --purge man-db manpages
# rm -rf /usr/share/man/

No comments yet!


Valid HTML 4.01! Valid CSS! ipv6 ready