Entries Tagged as 'N800'

Maemo build of Hercules

HerculesSo I finally got round to building a package for the Maemo (bora) build of Hercules, and setting up a Debian repository for it and future builds of other stuff for Maemo. You can add the repository by clicking here, and then find Hercules under user/Emulators in Application manager. Or if you prefer you can just download the package here. Since this is my first attempt at building a Debian package any feedback would be much appreciated.

Disclaimer: This is provided as-is, without any warranty of any kind, and don’t blame me if this bricks your device or you find yourself addicted to vintage IBM mainframe operating systems.

OpenVMS VAX 7.3 booted on an N800

Friday evening I came home to discover that the 2GB SD card I had ordered almost 2 weeks ago had finally arrived (postal strikes).
Last night I got round to copying on to it an ISO of the OpenVMS VAX v7.3 install CD, and managed to boot this on the Nokia N800 via SimH running in an xterm. And tonight I grabbed a few screen shots for posterity - could this be the smallest VAX ever? Whilst VMS booted it was only the cut down version on the install CD that is used to install a fully featured VMS system to a target disk drive. It is none the less VMS but the journey doesn’t stop here.

Next up on this ‘NanoVAX’ adventure will be building a hard disk image with VMS tailored such that it writes to disk as infrequently as possible. And I have a few ideas of where to start thanks to suggestions from folks on the Classic Computing mailing list, and the advice of a chap who sent me e-mail following my post on building SimH for Maemo.

Turning the N800 into an IBM mainframe

Excited by last night’s success at turning my internet tablet into a VAX I thought I’d see if it could pretend to be an IBM mainframe, and in particular a System/370 running 1970s vintage IBM VM. I also knew I could fit this operating system on the spare SD card I had which is only 128MB. And will have to wait until I get a spare 1GB or 2GB card before trying out booting OpenVMS under SimH. And besides which I have observed previously that VM when not running a task doesn’t appear to access disk much if at all, and so it should be kind to flash storage.

And so I downloaded a copy of the source for the IBM mainframe emulator Hercules, untarred it inside the scratchbox, and ran configure followed by make. Once again no issues and so I followed this by a ‘make install’, and then went on to locate the Hercules files installed into the scratchbox under ‘/usr/local’, tarred them up and copied this across to the N800. I then took an existing Hercules config file and tweaked it for the N800 by commenting out any devices I didn’t need, and updating the file paths to the virtual DASD containing IBM VM/370 R6 which would be located on ‘/media/mmc1/’ (128Mb SD card in the external slot).

Hercules started up without any problems, VM IPLed (Initial Processor Load - IBM parlance for ‘boot’) and the CPU was busy for a while as VM started up. Following this I was able to fire up an IBM 3270 terminal emulator on my Mac, observe the connection in Hercules, and get a VM logon screen on the 3270. I then tried to logon but the 3270 had lost connection to Hercules, which I ‘m pretty confident was a result of the N800’s WLAN power saving mode kicking in (outbound connections turn it off, but not inbound it seems). To complete this handheld mainframe configuration I really need to get TN3270 or similar built for Maemo so that I can fire up a local 3270 terminal.

I still can’t believe that I have an IBM mainframe running in the palm of my hand. It’s pretty crazy… For the uninitiated IBM were doing virtualisation with VM _way_ before the likes of VMware and Xen etc. And even with this antique pre-software-copyright version you can run a whole new copy of VM inside one virtual machine, and inside that run another copy, and so on. Or inside a virtual machine run another IBM operating system such as MVS. And if you are licensed for a more recent copy of VM can even get Linux running inside virtual machines. It’s pretty cool and each logged in user gets an entire (virtual) IBM mainframe at their disposal.

I think I’ll order that bigger SD card tomorrow so I can give OpenVMS a go under SimH. And should also now look into how to package Maemo SimH and Hercules builds up into ‘.deb’ files.

First experience porting to Maemo: SimH VAX on an N800

So at the weekend I finally got round to rebuilding my home Linux server with Debian, and following which as I promised myself I would I went on to load the Maemo development environment.

Whilst setting up the dev environment was pretty straightforward the sheer amount of stuff that was getting installed did worry me a little at first. As when complexity increases so does the potential for something to go wrong. And given I am not a developer and possess no development skills this was especially of concern. However all appeared to go swimmingly and I decided to build something from source for which to my knowledge no existing Maemo port existed. To this end I downloaded the source for SimH and gave it a bash.

So after logging in to scratchbox and selecting a target of SDK_X86 I untarred SimH, and tried a ‘make BIN/vax’. And hey presto, I got a vax simulator binary for Maemo, albeit for the x86 architecture. Which is only useful for testing before you compile for the ARM CPU architecture and load onto a device - e.g. in checking that you have all the required dependencies etc. So next I instructed sratchbox to select a target of SDK_ARMEL and ran make again. And a brief period of time and minor compiler warning later I had a binary that should run on my N800.

After quickly copying the ’vax’ binary to the N800 I confirmed it would start up (click above image for detail). And next copied over MicroVAX firmware and an existing simh configuration file, commenting out any configuration for disk drives mapping to local files. On executing ’./vax vax.ini’ all was fine, and so proceeded to type at at the simh prompt ’boot cpu’. This resulted in the MicroVAX test sequence being printed out followed by the chevron prompt from where I could type VAX console commands such as ’show devices’ etc.

In terms of SimH on the N800 next up will be to build an OpenVMS operating system disk image, that in the interests of prolonging the usable lifetime of flash memory is tailored to minimise writes as much as possible. Whilst I’m confident that OPCOM, batch, and auditing etc can be turned off or minimised, I’m not sure a VMS system can live without page and swap files. Although perhaps these could be tiny and live on a ramdisk. In any case with 1GB SD cards to be had for under £10 I’ll happily wear one out in order to get to play with a battery powered handheld VAX for a week, or however long it takes for enough flash memory cells to exceed their million-write quota and the spare cell reserve to be exhausted. 

I must say I’m impressed by how easy it was to build an existing Linux application Linux for the internet tablet - hats off to the folks at Nokia! Although must also point out that using the expression ‘port’ in connection with this build of SimH is a stretch as I did nothing more than cross my fingers and run make. Had this been an application with a GUI and required actual porting to Maemo’s Hildon it would have been a different matter, and required real work… So for now I think I’ll be taking the wimp’s route and building only daemons, and CLI and curses based applications.

Sexy Computer Geeks



After feeling slightly sad yesterday on the ChIT moving out of the Chateau, I decided to try out my new Bluetooth GPS with Maemo Mapper and Kismet. And when I fired up the latter I spotted an amusing SSID (click image for detail) which raised a smile. But how to respond to the greeting… Would locating the access point by triangulation constitute stalking? I suspect it would!

A handheld VAX

How do you lift a VAX 11/780 with one hand? Load it onto an Apple iPhone!

I really hope Jason succeeds with his iPhone port of SimH as a VAX (and PDP-11, PDP-8 etc) simulator running on a mobile phone would be super cool. Never mind those geeks getting a bash shell up to SSH into a Linux box and check their e-mail with Pine, or for the hardcore, Mutt (a real ale drinker’s e-mail client). They’ll be shamefully relegated to the league of the newbie geek, as you boot up a copy of VMS or early 80s vintage BSD UNIX on your shiny ARM-powered geek swiss army knife.

When I get the chance to set up a build environment for Maemo, the first thing I’ll be attempting is to cross-compile SimH for the Nokia N800. I’m hoping this will be relatively straightforward as being a console app there will be no porting of GUI stuff to be done. One issue that may arise however is the wearing out of flash memory through the guest operating system performing frequent writes. It may be that the guests can be to an extent tweaked: virtual memory turned off or placed on a tiny RAM disk, logging disabled or set to minimum, and options such as noatime or similar specified for file systems.  And also the older more esoteric operating systems don’t tend to be so busy with their file systems anyhow, so might not cause such problems. Or another option would be to hack the device such that you can hang off a pocket USB HDD, or to possibly use NAS of some sort, e.g. NFS

Pimping the Nokia N800

So whilst pimping is hardly my favourite expression it seems fitting to describe the process one of my latest acquisitions - a Nokia N800 - is being subjected to. For most people these days customisation is key, and as was the case with the scooter loving Mods this holds especially true for geeks - folks who exist to hack.

Earlier this week a 2GB SD card arrived in the post, and this signalled the real start of the process, with the card getting installed into the internal slot of the N800, being partitioned into 2 x 1GB Ext2 file systems, and the Linux system copied from the on-board flash into the first partition. Prior to this I’d already populated sources.list with a bunch of handy repositories, installed all manner of useful tools, and flashed Fanoush’s initfs-with-boot-menu to the internal flash in preparation to enable booting from SD cards.

After copying everything across and successfully booting from the SD card, I decided that since it was Class 6 device it would be worth trying to get a bit more I/O performance out of it than the stock Nokia kernel allows (highspeed capability is disabled). And to that end flashed a suitably patched kernel as provided by Philip Langdale. And for this used another handy tool from Fanoush that lets you flash the kernel from a local FS rather than having to attach a USB cable and perform this from another machine. On rebooting dmesg reported that the bus speed for the SD card had been switched from 25MHz up to 48MHz.

Next up I’ll be copying the Linux system into the 2nd partition, so that I can boot from this FS to test installs of anything that might break the system, and keep the 1st partition stable. A neat idea picked up from Rod Whitby (although not sure about his using Ext3 - i.e. journalling - on flash, when such storage is only capable of a limited number of writes).

To do:

  • Set up a PPP-over-SSH VPN from the N800 to my home OpenBSD based firewall, so that the device can be accessible from the internet as long as it can get to the internet, and NAT etc will be of no consequence. I have a RIPE /29 routed to my DSL connection and so can use an address from this block for the public endpoint of the VPN.
  • Once the above is in place configure nginx and php (both installed but doing nothing at the moment) to do something fun. Maybe with GPS - not sure yet.
  • Write/find a small script utilising ping or similar to stop the N800 turning WLAN power saving on, in order that you can reliably ssh in. Or perhaps there is a sysctl to tweak this behaviour…
  • Rebuild my home server and get the Maemo development environment set up. Some time ago I decided the server needed a rebuild as the disk layout is wasteful (everything mirrored) and I wanted to switch from Ubuntu to Debian amongst other things.
  • Once the above is done attempt to port (or hopefully at least just cross-compile, to start) applications!
  • …BT GPS + 8GB SDHC card in external slot, loading of maps for Maemo Mapper etc.

War railing, aesthetic wifi, and karmic mesh networks

On the train from Leeds back to Glasgow it wasn’t long before I tired of retuning the radio what seemed like every two minutes, as broadcast frequencies changed. A pocket shortwave receiver is all very well, when what you really need on such a trip is a good FM radio with RDS that can automagically skip to the next frequency as the journey progresses. So I decided to get out the Nokia N800, freshly loaded with Kismet, and fire up an Xterm to see if any wireless networks could be found on the North Yorkshire Moors. And much to my surprise I did manage to spot quite a few networks as the train passed through small villages.

The photo on the right isn’t that exciting but you can see a few WLANs in Kismet. Information that hopefully nobody will object to being made public. I.e. simply the fact an SSID exists, somewhere… (this stuff is in public ’stumbling’ databases anyhow) And I should point out I didn’t associate with any networks or search for keys etc.

One interesting discovery was the most commonly occurring SSID of ‘Ribblenet’. And a quick spot of Googling on my return has revealed this to be a community wireless network (<– check the topography and node link maps!) based on mesh networking. Very cool indeed. What would have been even cooler is if the N800 had support for AODV routing as used by the Locust World mesh nodes. And could have joined the mesh, updating routes in an ad-hoc fashion, as new links are made and old ones broken. Of course to attempt to do this would have required the permission of the guys who run the network. And in any case would have likely enjoyed limited if any success due to the speed of the train and relatively sparse distribution of mesh nodes along the route.

However there is a port of the daemon for another ad-hoc routing protocol, OLSR, available for Maemo. And this has got me to thinking how it would be fun to try it out with a bunch of N770/N800 owners, seeing how far you could extend a fixed connection. And how you could dynamically represent the state of the mesh graphically on the devices, and optionally also from the network edge out to the Internet. Add Placelab (if Java can be got to work on Maemo - I’ve such heard mumblings…) also to extract data on the positioning and trajectory of nodes and you could have the basis for an interesting geeky art project: factoring together received signal strength of peers, link states, and calculated position, speed and trajectory. In addition to finding interesting ways to interpret and present this information, the system could also interact with the device owners. Wouldn’t it be fun if the system could instruct people to take new positions in order that the mesh network be optimised for a particular use. E.g. a TCP connection is set up between two endpoints, the system looks at the current network configuration, and then in a bid to optimise topology, via Flite the N800 nodes instruct their human agents to assume a new position. Network connections in the virtual world being used to orchestrate a dance in the physical.

Getting back to more practical uses it would be nice to think that one day mesh networking capabilities will be built into most devices, and in a secure and robust (as it can be) fashion. Such that we no longer, or rather less frequently, have to worry about being in close proximity to access points. And if we reach that stage I can see an exemplar use for technology developed as part of a research project I was involved in a number of years ago whilst at Mysterian: MMAPPS (co-incidentally my current employer BT were lead research partner). The work sought to find ways to encourage altruistic actions in peer-to-peer networks, discourage leeching, and thus foster sustainability. So in this case you would say gain credit for being a node in a mesh and providing routing resource, and be less tempted to turn off your device when not using it directly. Credit accumulated could be then spent on network services. With for example basic network access being priced slightly higher than rates of reward for participation in routing, such that the operator covers costs and turns a profit. As banks work with interest rates for saving vs. lending, but without illegal penalty charges and nonsense constructs such as ‘clearing times’.

Images (top - bottom): Nokia N800 w/iGo BT keyboard, N800 running Kismet (detail), about to cross the mighty Ribblehead viaduct.