In my earlier post, we started modifying the t5325 without opening the box. This time we’ll try to achieve the same, but with the use of the serial connection. Via this way we can load and boot our own kernel, change the root device etc, thus giving more control over the device! At the end, if you have followed this post thoroughly and no errors occur during the installation, you will have the latest kernel running with Debian Squeeze, later partially upgraded to Sid for extra functionality and a complete Gnome desktop for your needs!
Some software is provided on my downloads page, see below:
Since this is a Kirkwood based board, there is uBoot again, however, there is one major plus on this uBoot: HP didn’t protect it, so you can actually modify everything inside uBoot, including the bootargs etc!
To reach the serial header, remove the screw on the back and slide the back panel off the device and slide the top case off. If you have the front of the device towards you there will be a COMAconnector in the bottom left (near the speaker). This is your serial header, this uses a 4-pin JST connector and I got a bundle of these connectors off eBay for $1, which gave me 10 of these connectors with 4 wires already connected to them.
The pinout is, with the device facing towards you: 3V3, TxD, RxD and GND. I used a CP2102 USB -> TTL converter and on connecting, it’s done as follows:
GND -> GND
RxD -> TxD
TxD -> RxD
3V3, not used, not needed with this converter (this converter is USB powered, so not needing the 3V3 for this purpose, also the HP is powered, so not needing added power)
You can build a kernel using the kirkwood kernelconfig, there is one major point to look out for and that is the XGI display driver, since this driver is staging, this needs to be extra specified in Device Drivers -> Staging Drivers, and disable the option “Disallow staging drivers from being built”, once disabled, you’ll see all the staging (testing) drivers in the current kernel, there is your XGI display driver. Also, if you want to have sound on the t5325, enable Alsa and enable the SoC audio options for the t5325 (you’ll notice the options directly).
I’ve also shared my working kernel for the t5325 on my Downloads page, check it out, if you don’t want to compile a kernel of your own.
The internal storage is not sufficient for normal usage (I’ve prepared this as a rescue zone), so your options are using an USB flash/harddisk or NFS storage, my main focus will be the USB hard disk storage using a 80 Gb Hitachi disk, which should provide enough space for this box.
The xorg XGI display driver is not available in the armel repo’s of Debian, luckily there was a dude that built the XGI driver from source, creating the armel deb package for our needs, it’s available in my Downloads section.
Make sure you have the right cables and are able to connect to the HP via serial line and are able to see the uBoot output and can input text into it. Also prepare the harddisk for usage with the device, prepared rootfilesystems are available on my Downloads page. Also see my post on how to prepare your harddisk for use. When that’s done, make sure you’ve got the kernel ready for load. In my case I use tftp to load the kernel.
There are IP-addresses set in uBoot, but they are wrong in my case, I want to set these first, else I am not able to load the kernel via TFTP (reflect these with your own values):
setenv serverip 192.168.0.75
setenv gatewayip 192.168.0.1
setenv ipaddr 192.168.0.150
Also, the default bootargs part is not set, so I’ll do that now, note that the second disk will be sdb:
setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rw init=/sbin/init video=xgifb rootwait
The rootwait flag is for the USB device to let the kernel know it has to pause until the device becomes ready. The video flag is for setting the display device.
Since I’m using TFTP to load the kernel, I want to set this at boot time using the bootcmd option:
setenv tftp_boot tftp 00800000 t5325\; bootm
Now I’ve set the bootcommand, the actual bootcmd will be changed at the end to prevent hassle during the installation.
And, at last, we want to change the bootdelay, now on 1 second, you really need to be fast and is annoying during this part of the setup, change it to it’s maximum value, 3:
setenv bootdelay 3
Installation 1: The preinstall and setup
Now that you have your disk prepared, have your kernel waiting for you and having uBoot configured, it’s time to start the first install round. Hook up the disk via USB and for this instance you need to set a different set of bootargs and do not need to be saved:
setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rw init=/bin/bash video=xgifb rootwait
Since you’ve set the tftp_boot command, you can issue this command to load and execute the kernel:
You’ll be left with a prompt if all goes well, first we need to set the PATH variable:
Now start the second stage of Debootstrap:
Wait for it to install, should be ready in a couple of minutes. When done, edit some configuration files which are necessary, starting with fstab:
Add the following 2 lines and save it afterwards:
/deb/sdb1 / ext3 defaults 0 0
/dev/sdb2 none swap defaults 0 0
Now edit the inittab file and save your settings:
Add the following line on a empty line:
This will give you serial access to the box once booted in different runlevels.
Now edit the APT sources.list, for now we’ll use squeeze, but will partly upgrade to sid later on.
Add the following line:
deb http://ftp.nl.debian.org/debian squeeze main contrib non-free
Change the country code (NL) to the one matching yours for better connection speeds!
Now open up your interfaces file to establish a basic DHCP connection (will be managed via Gnome later on):
Add the following lines for lo and eth0 support:
iface lo inet loopback
iface eth0 inet dhcp
Set the root password now:
Enter the password you want twice.
That’s it! Now you’ve installed a basic Debian Squeeze system on your t5325, now it’s time to restart the device and let it boot the new Debian system. Since a reboot won’t work, power off the device and re-power it on. Cancel the autoboot by hitting any key within the 3 second span and move on to the next part, the actual installation!
Installation 2: Installing the desktop
If all went correct you’re now again at the uBoot prompt, now boot the kernel again, but this time we are using the preset bootargs to actually boot the new Debian system, start:
When left at the prompt again, but this time you have complete access to the Debian environment, on some systems the swapspace does not setup properly, that’s corrected this way, preparing it for swap and activating it, this is a one-time action:
mkswap /dev/sdb2 (assuming your swap partition is number 2)
Now we can actually install the desktop, for this box I’ve choosen Gnome / LXDE and XFCE4, I’ve installed all 3 of them, since space is of no issue to me and for testing the box, it’s handy to have them installed. They will be driven via GDM3 (much faster than 2).
First update your packagetree and start installing some base tools:
apt-get update (I tend to use vim alot)
apt-get install vim vim-doc vim-scripts
Also, since this is an ARM box, sometimes you’ll have to build software from source, to install this suite do:
apt-get install build-essential
The above is not necessary for running a desktop, but can come handy when needed to recompile software which are available as source, but not as a package.
Now we start installing our desktop, I’ll install everything in one batch, but you can leave out the stuff you don’t want:
apt-get install gdm3 gnome lxde xfce4
This will take a good while to install (15 minutes on my t5325).
Now install the prepared Xorg XGI debian package, download and install it:
dpkg -i xserver-xorg-video-xgi_1.6.0-1_armel.deb
When it’s done, give GDM a restart, if all goes well, you’ll see a graphical login prompt, altho, you cannot login yet, move on to the next part. (if you have compiled the kernel with XGI support):
Installation 3: Installing apps
Now that your desktop is actually running like a desktop, it’s time to install some apps that should be installed on a good desktop (note that this is my opinion, you may install whatever you like).
Now that our base system is installed, we are going to switch to sid since this unstable repo offers the latest on armel software:
Replace the squeeze with sid , save and update, but do NOT upgrade:
Within sid, there is LibreOffice (the non-Oracle branded version of OpenOffice), which we want to install, since I don’t need the whole suite, but only the Writer app, I’m installing that:
apt-get install libreoffice-writer
Also, some multimedia apps are handy. There’s Rhythmbox in Gnome, but having VLC is a nice addon:
apt-get install vlc
For internet browsing we’ll use IceWeasel (rebranded Firefox):
apt-get install iceweasel
For emailing you can use Evolution within Gnome, but IceDove (rebranded Thunderbird) is handy:
apt-get install icedove
That would be about it, install all other software you would like as well. Since we upgraded to sid repo, we need to do an upgrade, not mistaken by a dist-upgrade. Note that doing a dist-upgrade will break your xserver, as it will remove the XGI driver. Doing an upgrade will upgrade the common libraries and software, but leaves out Xorg:
Installation 4: Adding users and logging in
Now that the installation is almost complete, we get to the step where we can configure the users that are able to login, this is a simple task:
Replacing username for the username you want to add.
Now that you’ve added user(s), try to let one login with it’s given password and see if everything works well. When all works, log out and continue, you’re almost done!
Installation 5: Setting tftp_boot default in uBoot
Now that the installation is finished on your machine, it’s time to make some changes to uBoot so it knows that it boots from TFTP (my case). Reboot your installation:
When back in uBoot make the following change and save that:
setenv bootcmd tftp_boot
Now you’ve made the TFTP boot and start permanent in uBoot. Now give a reset and check if everything starts up without your intervention, also, this time you don’t need to interrupt the bootdelay process.
When everything works without your intervention and GDM shows up you know you’ve done everything right. Halt the system:
When powered off, remove all the cables and put the unit back together and install it on your desired location.
As noted before, once you use sid do not issue a
dist-upgrade, this will break your current Xorg configuration therefore removing the XGI driver, as it is not compatible (and never will) with the newer Xorg systems.
When using the device as a full desktop you’ll notice that the device can become pretty hot, this is not a problem, I’ve installed several ARM based systems now, all gaining the same temperature and is not as temperature sensitive as Intel or AMD.
When using my kernel (for now at least), there is no audio support, I’ve built it in, but the alsa modules in the kernel are too old. It’s on my todo list to build a better kernel for this device.
If you get a garbled screen with the default X settings, try my xorg.conf file, ready on my Downloads page. I noted the garbled screen only using a VGA monitor, DVI seems to be picking the highest resolution possible as VGA does not. The maximum resolutions are 1680×1050 (16:10) and 1600×1200 (4:3).
Since this is a very long blogpost, there may be some errors in it, if you stumble upon one, let me know to fix it!