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.

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:

*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.

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.

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).

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.

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

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!

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.

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).

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.

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

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.

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

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.

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

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).

I didn’t have much luck building custom images with the online image builder; I always ended up leaving out something important. I did however install an image from the unstable branch following the same steps outlined in the post.
here is a link to the unstable x11-gpe image;

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.

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.

*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.

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.

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.

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?

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.

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?

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.

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?

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.

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.

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?