Long Live Angstrom

Rather then doing something useful I decided to upgrade my Zaurus sl-5600 from OpenZaurus to Angstrom. Several months back the SanDisk wifi card I had died, and since I would need to install applications, I would need a network connection. I got the cheapest cf wifi card I could find on ebay, a Symbol High Rate, only to discover that it only supports WEP encryption. This means it won’t be very useful at the local coffee shop but by temporarily changing my home network from WPA to WEP I can do upgrades and install software. At least I only paid $10 buck for the card

“OpenZaurus time is over – long live Ångström” reads the headline at the OpenZaurus web site. The post is dated April 26 2007. It is more than two years later and Angstrom has been busy. They created install kits and root file system images for all manner of handheld and ultra-portable computing  devices (incuding a robot). They even have the OpenMoko software packages in their repos.

On OZ I had been using the Qtopia/Opie distribution, but found that Opie from Angstrom lacked wireless networking support. So I gave X11 with GPE another try. I had last tried X11 with OZ but found it much too sluggish. This time I set up a swap file and once it was configured to use it I found performance tolerable. The first attempt at upgrading the system following install failed, the sl-5600 only has 64MB of storage and only 22 of that is for the rootfs. Halfway through the update it ran out of space locked up and refused to reboot.

The solution was to install the altboot console distribution, which has a boot loader for loading image files on the loop device at runlevel “-1” (the kernel is loaded into memory but the fs has not yet been mounted) from a CF or SD card. This allows you to have multiple image files on a storage device and lets you choose which one to run from a menu.

You will need;

Angstrom-altboot-console-image-glibc-ipk-2007.12-r18-poodle-installkit.tgz

this is an install kit which includes an image file and a flashing utility for the sl-5600.

Here are pretty good instructions for using the flash utility.

Once you have completed that step you will need a gzipped root file system;

Angstrom-x11-image-glibc-ipk-2007.12-r18-poodle.rootfs.tar.gz

First lets make a swap file;

1. create a 120MB swapfile

dd if=/dev/zero of=/swapfile.swap bs=1M count=120

2. format it

mkswap /swapfile.swap

The swap file will be installed on the same SD/CF card you install the rootfs images.

Next create the disk image and populate it with the contents of gzipped rootfs

1. This makes a 256MB image file base.img, change the count to change the size

dd if=/dev/zero of=base.img bs=1M count=256

2. Here we format base.img to ext2

mke2fs base.img

3. Now we set up the file on the loop device

losetup /dev/loop0 base.img

4. This is simple, we make the base directory and use it to mount the loop device

mkdir base
mount -t ext2 /dev/loop0 base

5. change directory to base and extract the contents of the rootfs.tar.gz

cd base
tar xvzf ../Angstrom-x11-image-glibc-ipk-2007.12-r18-poodle.rootfs.tar.gz

6. Create a swap entry in the  /etc/fstab to make it “persistent” automatically available. This entry is for an SD card; for a CF card replace “card” with “cf”.

echo "/media/card/swapfile.swap none  swap sw  0  0" >> ./etc/fstab

7. Then we leave the directory, unmount it and sync the file system, I believe that sync is redundant as it happens when you unmount the file system.

cd ..
umount base
sync

You can now copy that base.img file to your SD/CF card. For altboot to recognize it, you must put it on the SD/CF card under a directory named “boot-images”, and the file must be named with -rootfs.bin at the end. For example on my system I used these commands to copy the image and the swap file to their final locations:

cp base.img /media/disk/boot-images/x11-rootfs.bin
cp swapfile.swap /media/disk/swapfile.swap

*Warning* The mount point of your SD/CF card may be different on your computer.

You can use the default fat file system that all SD/CF cards ship with but I took this opportunity to format the file system with ext2. No fancy code here, I used gparted but if you want to be hardcore you can use fdisk, its simple enough that I wont bother explaining it. If you want the SD/CF card to remain readable by a Windows operating system then stick with the default FAT fs.

256MB might not seem like a lot but it is plenty of space for updates and applications. I went ahead and installed all the GPE stuff, Calender, Contacts sketch book, text editor (vim wasn’t cutting it), as well as XMMS, Mplayer, and acouple of web browsers. Minimo, the only web browser in the repos designed handheld devices, I found to be sluggish and unstable. Midori worked much better but is not really suitable for a 4” screen. Then I found Links-X11, it is rock solid stable and zippy compared to Midori. It is not without issues though, it trashes page formating and no cookies and no JavaScript means that many sites don’t function correctly. I left Midori on for those difficult web sites. Odd considering how solid it was, Links-X11 can only be found in the unstable branch. This had me delving into the old “dependency hell’ for about twenty minutes, although I suppose I could have tried to change the ipkg sources list file instead.

XMMS rocks compared to the old Opie Player. I am still waiting for Fennec, Firefox’s mobile browser, it may replace Midori. I have yet to see if it  can connect to the City Wifi network which is unencrypted, so lack of WPA support shouldn’t be an issue. I would hate try and tap out a lengthy email on that tiny keyboard, modern cellular phones have bigger keyboards then the 5600 and the on screen keyboard is much too sensitive. The repeat rate should be adjustable somewhere, as is it would do for a short spelling iimppairred msssage.

*Edit

Today I found the Fennec packages in the Angstrom unstable branch. I am going to set up an unstable image and see how it runs, alt-boot boot makes it a simple process. I’ll try out the OpenMoko distribution as well, the sl-5600 is not phone and doesn’t have GPS but I would like to see where OM is going and perhaps install it on a smart phone in the future.

Advertisements

46 thoughts on “Long Live Angstrom

  1. Thanks! I’ve reproduced most of your results on my poodle, but I’m stuck getting sound. I’m fiddling with aplay and alsamixer, but no joy. Did you have any trouble making noise?

    1. I haven’t tried aplay, but xmms works great. There are a few sound issues; it will make staticky noise at the start of every sound/track (ANY sound, this is not an xmms thing) unless you put it into suspend for about five minutes following boot up. This is not a huge issue since reboots are not that common. Also I have not been able to get it to hold audio setting through a reboot. I had thought that ‘alsactl store’ would save the settings, but every time I reboot I have to go to the mixer and set all the levels where I want them. Again, not a huge problem and I may be able to get around this I sat down and wrote an /etc/asound.conf file. I have found that alsamixer is finicky, it sometimes needs on/off settings (e.g. the sidetone speaker or the microphone) to be toggled a couple of times before the setting takes.

      1. Hi,
        I have been having trouble with sound being muted after resume. I put this simple script (perhaps not the smartest way to get around it… but it works for me) in /etc/apm/resume.d:

        #!/bin/sh
        # 01-restorealsa

        c1=”Master Playback ZC”
        c2=”Line”
        c3=”Mic Boost (+20dB)”
        c4=”Capture Mic”
        c5=”ADC High Pass Filter”
        c6=”Output Mixer HiFi Playback Swit”
        c7=”Output Mixer Line Bypass”
        c8=”Output Mixer Mic Sidetone Switc”

        for j in “$c1” “$c3” “$c4” “$c5” “$c6” “$c7” “$c8”
        do
        for i in 1 2 3 4
        do
        if [ “$(amixer sget “$j” | grep “\[on\]”)” != “” ]
        then
        amixer sset “$j” off 1>/dev/null
        else
        amixer sset “$j” on 1>/dev/null
        fi
        done
        done

        Hope it can be of any help to someone,
        Pier

  2. Hi,
    thanks for sharing your experience with poodle.
    I am waiting for a cf wifi DLink DCF-650W from ebay.com and see how to install a music player and a pdf reader. For the time being I was wondering whether there is the possibility to install packages uploaded on an sd from the internet, and if you managed to ssh through usb to your poodle. I cannot get the usb0 device created on my laptop when the Z is plugged (that was easy with OZ-3.5.2 though).

    Thanks,
    Pier

    1. Yes, packages can be installed locally using ipkg, however you will have to take care of dependencies manually.

      The DLink DCF-650W is a prism card and should work with hostap right out of the box, provided the necessary firmware is installed. I found that the OZ images from Angstrom have broken wireless support, so if you want wifi you will need to go with the X11 image.

      I never managed to get the usb network connection to work.

      1. Hi again and thanks for your reply,
        I installed the root fs image on an sd and boot it via altboot. As a matter of fact the system is so slow that is almost unusable with respect to the installation on internal ram. Perhaps I did something wrong. SD is 1GB, base.img and swap as you suggested. What would you suggest on how to investigate about that?
        Thanks,
        Pier

      2. It sounds like swap has not been turned on. Have you verified it with free?

        free -m

        will tell you how much swap (and memory) you have in Megabytes.

        you can turn swap on with

        swapon /path/to/your/swapfile

        to automaticaly have swap turned on at boot make an entry in /etc/fstab

        /path/to/your/swapfile swap sw defaults 0 0

        Another possibility is poor sd performance, since both your file system and your swap file are located on the sd card, a slow card will affect performance during the many read and write operations that will constantly be required. Test the read and write speeds with hdparm to test read speeds, if the sd card is /dev/sdb

        sudo hdparm -t /dev/sdb

        and dd can test write speeds by directly writing to the device

        dd count=1k bs=1M if=/dev/zero of=/mount/point/of/SDcard/test.img

        that command writes 1GB to the disk, use a large number because the filesystem on the device will speed up the transfer by caching the data if a small transfer is carried out.

        This is a VERY dangerous command if you miss-type the output file so obviously take care using it and be sure to type correctly!

  3. 1bnr,
    thanks a lot, I was positive I had already turned the swap on but that was clearly not the case.
    Now things are much better, thanks again.

    I’ve found out that the opkg command is not available here whereas the ipkg is. Alas trying to install aplay (because of fewer dependencies required with respect to mplayer) always aborts and complains with a e.g. “Multiple packages (libc6 and libc6) providing same name marked HOLD or PREFER. Using latest” error message. I would think that an update would be advisable in order to get this thing sorted out, yet I am not sure about that. I imagine a kind of Gentoo eselect utils is not available, nonetheless I would refrain from uninstalling the previous version of libraries and afterwards installing the newer one.
    I am really puzzled with this issue now.

    Thanks,
    Pier

    1. it could be that the package you are installing is from a different branch then your system, perhaps the unstable branch. If you have the network up and running and are connected to the internet you can use the ‘Package Manager’ found in ‘Settings’. first update the list and then upgrade the system. This may take a while, afterwards look through the list and see if aplay is available. If it is only in the unstable branch you can change the feeds, but they are significantly different than the stable branch (it is Not a one word change).

      something like this;

      http://www.angstrom-distribution.org/unstable/feed/armv5te/machine/poodle/

      1. 1bnr,
        well… thanks again, (there’s no limit to newbie’s goofyness) it worked fine.
        I thought I had to get dependencies satisfied but just installing the right aplay branch (I picked the wrong branch package beforehand) was enough.

        Now I am eager to put hands on cf wifi card which is hopefully on its way here from the USA, but that will take at least three weeks.

        I’ve learned a lot from your advice!

        Thanks,
        Pier

  4. Hi,
    I have been lately fumbling around with Opie installed on internal flash. It is much quicker than when it resides on sd by means of altboot. As it is impossible to install further packages on account of no memory left, I was wondering whether it would be possible to install new packages on the sd memory card.
    Downloading is possible giving the flag -t /media/card/tmp to the ipkg command but -d /media/card/packages/ returns:
    ERROR: Unknown destination name

    Thanks for any hint on this,
    Pier

    1. Yes, it should be possible, this is how I originally had my Zaurus set up with Opie. Did you check and make sure that the path is there? If the /packages directory is missing from the /card directory it will complain because the specified destination is not there.
      I believe that I just specified /media/card/ and ipkg made its own /packages directory.

      Is this Opie on Angstrom? I was unable to get the wireless to work and had read that the 80211 stack was corrupt; that is the whole reason that I went with the X11/GPE install instead – which is far to big to fit on the internal RAM drive.

      1. Hi,
        the DLink DCF-650W worked out of the box with both X11 and OPIE on Angstrom. Yet although WEP works correctly I haven’t had the chance so far to try WPA out.

  5. Well, having a look at the /etc/ipkg.conf helped to writing down the right command. In order to installing a package on the sd the -d correct option is: -d sd (which actually is /media/card/packages). Now installation returns messages as:
    ipkg: Cannot create symlink from ./usr/lib/libmad.so.0 to ‘libmad.so.0.2.1’: Operation not permitted

    I’ll try and investigate further,

    Pier

    1. It looks like it is impossible to create symbolic links to fix the library names extension. I dumbly copied the long original name lib file with short version name. I also added the line:
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/media/card/packages/usr/lib
      to the ~/.bashrc (… or .shrc?) which I source when the new installed libraries are to be used.

      1. The linking problem still remains when trying to link stuff on sd card to lib files residing on internal memory… and a program like e.g. minimo fails to start when installed on external sd card.
        Another annoying hitch relates to X programs like for example gqview or minimo installed on sd card complaining about missing DISPLAY env variable. export DISPLAY=”:0.0″ didn’t avail (programs like opie-notes, opie-calculator installed on home work well)
        Thanks a lot for any suggestions on any of the above issues,
        Pier

      2. I was under the impression that Open Embedded (opie) and X11 were two different, exclusive (nonconcurrent), display systems. If you run OE then all GUI programs have to be coded for OE and conversely if you run X11 all GUI programs have to be written for X11. Although I must add that I never tried to mix them myself.
        one advantage of using altboot is that it give the option of booting either system image off the sd, of course that would sacrifice a small speed advantage from running from the internal RAM drive. I have been thinking of giving Opie another try since you managed to get wireless networking going. The only thing holding me back is the inferior application offerings from OE. I mostly just use my sl5600 as a media player and xmms is much nicer than Opie player. While there are for more web browsers available in GPE/X11 then Opie the truth is they are all crap (OEs included).

  6. I’ve been unable to build a working image for my zaurus sl-5600 poodle.

    did you ever get around to setting up an unstable image on yours?

  7. if by above you mean altboot? or did you just reflash the whole sucker?
    we need to do something wrg to this whole zaurus mess. there’s a ton of information out there, but there’s precious little /reliable/ and /recent/ information regarding the devices.

  8. Yes. It is necessary to use altboot to boot images from an SD/CF card. Otherwise there is not enough space on the root fs. Previously it had been possible to install packages on to removable media and have them linked in to the normal fs locations. For some reason this didn’t work when I tried it, perhaps required packages pulled in by ipkg defaulted to the internal storage; regardless it ended up filling the internal storage and locking up the device.

    Altboot works well, just follow the directions from the post and substitute the unstable branch image, or install both for dual-boot as I did.

    After installation it is trivial to remove packages you don’t want and add new ones that you do. Assuming that you have a wireless connection; I had not been able to get wireless to work with the Oppie image (and had read of other people with the same problem)but it worked fine in gpe.

    If you do not have wireless you can manually download packages from the repository and transfer them to the poodle on an SD/CF card, but it can be tedious tracking down all the dependencies.

    I went back and edited the instructions above for clarity. I have not had a chance to test every bit of the changes, but they should work and be a little easier to follow. If you run into any problems with the commands please let me know so I can fix them.

    1. Opps! Sorry about that.
      I fixed the links in the comment, they now point to the correct directory and an x11-gpe rootfs image.

  9. yeah.. it aint booting the unstable experimental image for me. upgrading it via a chroot has also proven somewhat.. special.

    I wonder if i/we should provide an updated image for all the lonesome poodle owners instead.

    1. I think that may be the nature of unstable/unsupported; it is a work in progress and may be broken at any point in time.

      It seems to be the same one that I got working a while back.

      there is also the kdepim distro, but it may be just as broken.

      *Edit*
      actually the files do have different names, so maybe they are different. I had assumed that the short named file was a copy of the long named file in the same directory for convenience, but I may have been mistaken.

      1. the thing is, these images and rootfs tarballs are nothing if not old. pity, it would’ve been fun with a semi-working set of clothes for the poodle.

  10. Ok so for future reference, out of the following images in the unstable/unsupported poodle image dir
    the Opie and x11-gpe image are the only ones that’ll do more than post the psplash image.

  11. Yeah no go on the Opie unstable image from that unsupported directory, it doesn’t like my wifi card.
    peckish.

    i’ll try to do a straight upgrade to unstable from the “stable” x11 image instead.

    1. I had read somewhere that the problem was with the Oppie 80211 network stack, but that may have been speculation.

  12. Still cannot get sound working on poodle. Any suggestions? Help is appreciated. WM8731.

    I reversed /usr/sbin/gpe on opie Dec 2007 image binary and flipped 1 bit with hex editor to change test results bypass new media panel upon first boot (with an sd or cf card inserted). Works fine now.

    1. have you used ‘alsamixer’ in the terminal? I always have to toggle some of the on/off settings, even though it says its on, no sound comes out until its been turned off and back on. Despite saving the settings with ‘alsactl store’ they are reset with every reboot (see the script in the comments to fix this).

      Also, there will be a staticy noise accompanying every sound unless you put it into suspend for a few minutes after booting. I don’t know what that is about, but after resume it works perfectly. Luckily reboots are rare.

      The last sound quirk I have found is that there is no way to turn off the microphone, regardless of what you do in alsamixer it continues to pipe the microphone input into the output stream.

      I reversed /usr/sbin/gpe on opie Dec 2007 image binary and flipped 1 bit with hex editor

      I am not quite sure what you mean here. Did this fix the wifi problem?

    1. yes to both. You can just use packages from the unstable branch but they may require versions of other packages from the unstable branch. I managed to install links-x11 which was only in the unstable branch onto a stable install but it required about a dozen packages from the unstable branch. Afterwards I realized that had I temporarily changed the feeds to the unstable branch ipkg would have sorted it all out for me.

  13. This is a nice way of expanding the limited memory and file system size of a Zaurus SL-5600. I have a problem, though that messes things up. When I flash my Zaurus with the altboot-console image it gives me a very sensitive keyboard. This makes it very difficult to type because one key press gives 2 or 3 characters and 1 delete key takes away 3 or 4 characters. Any idea how I can fix this so that I can get x11 running?

    1. Sorry, I haven’t had that issue. I would assume that it could be dealt with the same way you would with a full sized linux distro – in the x configuration, but I haven’t had to deal with that problem on a desktop install either.

  14. I’ve noticed that OpenZaurus indicates on their downloads that there are 2 types of CPU available for the Zaurus SL-5600. One is PXA250 (my Zaurus has this) and PXA255. Angstrom does not seem to differentiate between the two. Is your Zaurus SL-5600 running a PXA255 CPU?

    To check which CPU your poodle has do cat /proc/cpuinfo in terminal.

  15. so, it’s probably a kernel problem? Can this be fixed? How would I get a kernel.conf file to re-compile an Angstrom kernel?

    1. Looking into it a little more, I believe that the issue was a cpu/ram timing issue that made the first run of the 5600,s (those with the PXA250 cpu) default to a slower clock speed. Initially Z,s with the factory sharp ROM needed an updated ROM. I believe that for the most part the issue has been resolved in OZ/Angstrom, although it is possible that there were other issues either not fixed or caused by the fix.

      It is also possible that the issue is machine specific, sensitive buttons on your keyboard. at any rate you could try to this.

  16. the kbdrate command is not on the console or x11 rom (in the path anyway) and the kernel isn’t either. I don’t have my wireless Netgear MA701 CF card working but I can download from my desktop and do a local ipkg install. What Angstrom feed package is kbdrate in?

    1. The feed browser is here, but kbdrate isnt in it, nor setterm which is the only other non-x way to adjust repeat rate. That only leaves the kernel source edit suggested in the first link. If compiling a custom kernel doesn’t work you may be out of luck.

      Just to clarify; the problem is with the physical keyboard in the terminal, not the on screen keyboard in a console window, correct? I ask because I did find that one of the two on screen keyboards (“Ol’ Good Keyboard”) has a repeat rate problem, the other one (“Keyboard”) although it looks a little funny actually works ok.

  17. it is the physical keyboard that repeats as well as the gui keyboard. The gui keyboard is worse, but I’ll try switching gui keyboards and see if I can get one that’s ok. I also tried a newer console with all the kernel moodules installed in narcissus and got the same thing with no kbdrate command in the updated ROM. I’ll also look att setterm.

  18. I’d like to use the altboot method you described here to set up my SD card with 2 ways to boot my Zaurus SL5600. The first is with the x11-rootfs you explained and the second is with a 256 MB file with my Sharp ROM files (initrd.bin and zImage.bin). Any idea how I can make a bootable bin file from these 2 files?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s