Wednesday, October 20, 2010

Upgrading TS-TPC-7395 to Debian Lenny with EABI

Not long after getting the stock Etch/OABI distro running with Qt embedded, I tried the QT Embedded Widgets demo apps.

For the curious, you can check out a windows demo of the various available widgets through this package here:
http://qt.nokia.com/files/embedded-widget-demos/qt-embedded-widgets-catalog/view

Unfortunately, the OABI Debian/QT Embedded is a bit sluggish on the 7395 hardware. I spoke with Donal O'Connor via email and he suggested going the EABI route as I'd likely see the performance of the QT/E apps double.

So far I've gotten the new distro running. I'm working on compiling TSlib at the moment but for now here's a guide on how to get Lenny/EABI Running.

First you need to get some files from ftp.embeddedarm.com . Once there, go to the TS-TPC-7395 (or 7390 they're basically the same machine). You will need one of the binary dd sd-card images (I chose 512mbsd-jun282010 but really any of them should be fine). Also you need to go to the distributions folder and get the Debian-Lenny-EABI distribution.

To install follow these steps:
1. Place the files you downloaded on a USB jump drive or other external storage
2. Boot the Ubuntu 10.10 live cd
3. When Ubuntu finishes loading, click on your jump drive in the file explorer to mount it.
4. Un BZ2 the dd file
5. Insert your SD-Card
6. Find where Ubuntu is mounting your SD card (it will vary depending on the number of hard drives and other things you have installed in your system) opening GParted (System->Administration->Gparted Partition Editor). Once there you can look at your storage devices and it should be easy to deduce which /dev is the SD card.

My jump drive is named JUMP DRIVE and was mounted at /dev/sdb (linked to /media/JUMP\ DRIVE . The SD card was /dev/sdc. You will need to change device names and mount points to fit your circumstances but these are the general steps you need to take from here:

In a terminal:
$ cd /media/JUMP\ DRIVE/
$ dd if=512mbsd-jun282010.dd of=/dev/sdc

This should take a few minutes then you will see your command prompt come back signaling that the job is finished.

Now lets see if everything worked out. Remove then reinsert the SD Card. You should see Ubuntu mount 2 filesystems. They will be named 1.6MB Filesystem and 482MB Filesystem respectively.

Now your sd card will have some pretty crazy partition names (mostly just long strings of numbers, nothing too memorable. What you want to do now is figure out in the terminal which is which.

To do so do this:
$ cd /media
$ ls

Here you should see your jump drive, and 2 random devices. What you need to do here is cd into one of them and see which of the two filesystems it is with the ls command.

Once you've found the 482mb filesystem in the terminal change your directory to it. Now do:

$ rm -rf * 

Now you need to un-tar the Lenny Filesystem you downloaded to the 482mb Filesystem. You can use the command line or you can use the GUI and move it over. In either case you will need sudo privileges.

Once you have the Lenny files on the SD Card you can either boot the 7395 off of this card as is or make the Lenny root partition bigger to use up any available unpartitioned space on the SD card.

If you want to expand the filesystem, Ubuntu's GParted won't work as it crashes when confronted with a device with a JFS filesystem. What you need to do is download the GParted Live CD and resize the filesystem from there.

Depending on the base image you dd'ed from you may find that when you boot up you are confronted with nothing but a blinking cursor followed by a blank screen. If that happens to you, simply connect the 7395 to a serial port on your pc while it is booting. You will see the boot sequence then be given an ash shell prompt. Type exit and the full Debian distro will boot. You will now see things going on with the screen on the 7395 and you can carry on as normal.

No comments:

Post a Comment