Snapshot of my enhanced IZ2S ZipitZ2 SDCard
[ Fourth in a series recreating the lost posts -- This was originally posted 30/03/10]
I've just uploaded my fork of Ray Dios Haque's IZ2S z2shell. It has a few enhancements and upgrades such as my latest power related utilities, dialog based wifi setup and a couple of new fonts and the ability to brand. This is basically a snapshot of my current in-use sdcard with a tiny bit of cleaning up. The installation is the same as with Ray's IZ2S. Just extract the files in the zip archive to your sdcard.
you can find the zip file @ http://russelldavis.org/ZipitZ2/IZ2S205beta-enhanced.zip
If you need help you can normally find me in the #zipit irc channel
COBOL is not just for dinosaurs
[ Third in a series recreating the lost posts -- This was originally posted 02/08/10]
COBOL has always given me a nice warm fuzzy feeling whenever i've been required to program in it. This is probably because it was the first language that I learnt that wasn't self taught (BASIC and Z80 assembler) and I liked the lecturers that we had at the college, one was very stuffy but the technicians and other 2 lecturers were great and had very warped senses of humour.
We were taught Ryan-MacFarland COBOL on Tandy Model3's with 48k, dual floppies, networking and a Corvus Winchester drive that sat quietly in the corner of the room trying to pretend that it didn't look remarkably like a refrigerator. (I still have a soft spot for TRaSh-80 model 3s and 4s, so if anyone has one lying around unwanted and unused they know where to send it) . COBOL is probably made me what I am today programming-wise. A curmudgeonly grumpy old git, over 25 years later I still wake up with night sweats about finishing my course project on time (I ended up with a 95% and thus a distinction although I did cut it close as I kept getting banned from the computer lab for hacking the network so did most of the coding on coding sheets and then quickly typing it in and doing a couple of test runs when they let me back in until the next banning. It was actually a bit of a game as the techs, lecturers and I would often have a few pints riding on whether i could bypass whatever security they had installed that week -- oh fun days).
So a few weeks ago I was between projects for the ZipitZ2 and decided to see if I could run COBOL applications on it and started looking around on freshmeat.net and sourceforge.net and found two possibilities. The first one TinyCOBOL wasn't going to do me much good as it outputs IA32 assembler, but the other one, OpenCOBOL looked more promising as it outputs C source code and uses gcc as the compiler. After a bit of playing around with it and messing around with my ZipitZ2 development VM I managed to get a version that would produce executables that ran on a ZipitZ2 running Z2shell/IZ2S/IZ2Se/EZ2S which is good enough for what I personally want. But as alot of people seem to have moved away from the stock ZipitZ2 environment to mozzwald's Zubuntu which has gcc nativly running on the ZipitZ2 I decided to have a go at building the OpenCOBOL compiler to run on the ZipitZ2. After a few false starts setting up a new development vm for just OpenCOBOL and a couple of hours reading documentation I managed to build binaries of the OpenCOBOL compiler and libraries that pass all the tests in make check and seem to work as expected (at least inside my vm, I haven't tested actually on a ZipitZ2 running mozzwald's zubuntu as I don't currently have a ZipitZ2 configured to run that rootfs). You can find the tarball with the compiler, libs and conf files on this link. Extract and move to the right places and you should be able to write COBOL programs that will build and run on a ZipitZ2 running zubuntu. Because of the settings I used to build OpenCOBOL in theory it shoudl also work on any ARM based computer running Ubuntu as well although YMMV and also the same method of building OpenCOBOL should work for any Ubuntu distribution running on a processor that is supported by QEMU.
["COBOL Warriors" image Copyright © 2008 Robert Saczkowski. Banner courtesy of the GIMP, Copyright © 2010 Brian Tiffin and both are licensed under Creative Commons Attribution-Share Alike 2.0 Generic License http://creativecommons.org/licenses/by-sa/2.0/ ]
Repairing a broken Zipit Z2 motherboard power socket
[ Second in a series recreating the lost posts -- This was originally posted 29/06/10]
Sorry there are no photos for this I was struggling too much with getting the iron into a tight place to actually worry about photos.
I recently got given two zipits where the tip of the power plug had snapped off and was stuck in the power jack. One still worked fine when used with the wall wart that had the tip broken off but in the other it seemed like the little bit of plastic from the power plug had come off in a weird way and blocked the plug from going in more than half way and thus the Zipit wouldn't power on.
After a bit of digging on the digikey.com website I found what looked almost the same as the connector in the zipit (PJ1-022-SMT)
so I ordered 3 and they arrived on monday. I had to use an extremely hot iron (50W) and alot of flux and desoldering braid and one leg is an extremely tight fit but after desoldering the old connector and soldering on a new one I now have working zipit again.
My soldering skills current suck so it wasn't the easiest or neatest soldering job in the world but it does the job. It would help of course when I went to put the zipit back together if I could have found the box i've got all the zipit screws in so I could put the zipit back together properly but so far so good and hopefully I will find the screws.
Setting up Scratchbox2 to build software for zubuntu
[First in a series recreating the lost posts -- This was originally posted 10/08/10]
Mozzwald's zubuntu being ubuntu based and thus debian based has alot of prebuilt software via the apt repositories but there are times when you just want to knock something up for yourself or build something that isn't in the repositoires or even rebuild something that is but isn't ZipitZ2 friendly.
You can install and use gcc on the ZipitZ2 but it isn't something I recommend unless you have alot of patience and are a bit of a masochist. However there is another way that leverages the power of your desktop, Scratchbox2. Scratchbox2 is a toolkit for building cross compiling SDK's, in fact it is the basis of the maemo sdk for the nokia n7xx/8xx/9xx.There is one problem with Scratchbox2 though, there is little documentation and what little there is sucks.
Scratchbox2 has a few dependencies but if you are planning on using it on a ubuntu or debian host they are all (except one) available in the repositories.
The first thing to download is a toolchain for your target processor, in the case of the ZipitZ2 and zubuntu we need an ARM toolchain and the de facto standard for prebuilt ARM toolchains is CodeSourcery's G++ lite. Download the 2010q1 release. Although I prefer the CodeSourcery toolchain you might prefer the emdebian one or to build one yourself. After downloading the toolchain, in my case CodeSourcery's. Create a directory and extract the toolchain into it.
mkdir ZipitZ2 tar xjvf ../path/to/downloaded/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 ls arm-2010q1
Now we have to install Scratchbox2, if you are using ubuntu >= 9.10 it should already be in the ubuntu repositories, if not add the following likes to your /etc/apt/sources.list
deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-jaunty free
and
sudo apt-get update
Once that is done or if Scratchbox2 is already in the repositories
sudo apt-get scratchbox2 sb2-qemu-arm
Scratchbox2 is now installed on your system and it's time to add a seed rootfs, at minimum this is just the lib, include and etc directories from your target device but in this case because we have the whole rootfs available and configured we might as well use it as it will give us a few abilities that we wouldn't have otherwise, such as the ability to use apt on the seed rootfs once it is installed.
There are several ways to do this, but the easiest would be to use the technique in my previous post Mounting a raw disk image. Once mounted create a directory inside the ZipitZ2 directory.
cd ~/ZipitZ2 mkdir zubuntu_rootfs
and copy the directories and files from the mounted image to zubuntu_rootfs, using mc or cp will do (will will need to do this as root or via sudo as we need to create /dev nodes and you might have permission problems if you don't. then change the owner and group of all the files and directories in zubuntu_rootfs.
[Update: #zipit user slug said I copped out on the above paragraph by saying use mc or cp. the real command you should use if you aren't going to use mc is.
sudo cp -RvPp /media/mounted/image/. ~/ZipitZ2/zubuntu_rootfs
]
cd ~/ZipitZ2/zubuntu_rootfs sudo chown -R user * sudo chgrp -R user *
And finally we now need to setup Scratchbox2 for our target device, so make sure you are in the rootfs directory and then run sb2-init.
cd ~/ZipitZ2/zubuntu_rootfssb2-init -c sb2-qemu-arm ZipitZ2 $HOME/ZipitZ2/arm-2010q1/bin/arm-none-linux-gnueabi-gcccd .. mkdir build cd build sb2 -eR apt-get update sb2 -eR apt-get upgrade
You are now ready to build software for the ZipitZ2 running mozzwald's zubuntu. To build stuff for your host use the normal commands, make, gcc.... if you are building for your target then prefix everything with sb2 i.e.
gcc hello.c -o hello
builds for your host
sb2 gcc hello.c -o hello
Builds for your target.
If you are building and need to use libraries or include files from your seed rootfs then you will need to use the -R (fakeroot) option of sb2 i.e.
sb2 -R gcc hello.c -o hello
and if you need to install a handbuilt library or other software into your seed rootfs then you'll need to use both the -R option and the -e (emulate) option i.e.
sb2 -eR make install
I have used this method to setup Scratchbox2 successfully and have used it to build both small dirty hacks and build my ZipitZ2 utilities for messing with gpio's and also really large software such as OpenCOBOL.
