Aug 232010
 

As most of you readers probably know, I have been terribly remiss in my postings of late. That isn’t to say that I haven’t been hacking. Oh no. Bootstrapping a startup requires hacking all over the place. During the past week alone I’ve

  1. Gotten to know my franchise tax agent on a first name basis
  2. Authored contracts, which in my opinion should be written in python
  3. Authored a research paper on novel methods for efficient bulk virtual machine storage and retrieval (stay tuned for that one!)
  4. Reminded myself daily why I use git, while writing features integrating svn, cvs, etc
  5. Created what, I am fairly sure, is the world’s largest openWRT/BCM5354 firmware image/executable set
  6. Created at least 10 new project virtual machines

Which actually brings me out of my /startup header and back into :/publish . One of the terrific things about founding a startup (ducks!) is the flexibility you get while setting up your workflow. Long a proponent of integrating virtual machines into business processes, I have been enjoying the real freedom a robust virtualized system can provide. I’ll get into the detailed workflow later in the post. For those ‘first page only’ readers I’ll get to the golden ticket, I recently picked up a REX 6000 credit card PDA for 6$ at the local thrift.

REX 6000

Read on for (much) more and download links!

In 10 years this 4mhz z80 compatible PDA has remained unrivaled in terms of portability and size. Though I’ve started (in the few non work-related hours I get each month) prototyping work on an e-ink version of the REX 6000, it still has a long way to go before it’s usable. In the meantime, I’ve been enjoying my REX 6k immensely. There were quite a few user programs written for the device in the years after Intel bought and squashed the project, and the history of the device is as fascinating a look at a hacker subculture as you’ll ever find.

Anyway, if you want to develop for the device, there’s a useful SDK that’s been updated to work with new compilers and versions of linux available here. As I am using the REX 6000 for prototyping (something I often do at work), I figured I would apply my professional workflow to this my personal project. This means a tight, low overhead virtual machine in .ovf format using all open source software which you can import from a vmRepo and be up to speed in seconds (cloud friendly!).

DOWNLOAD LINKS:
If you work or are visiting Discursive Labs, you can download rexVM from the VMrepo here. For everyone else, you can download it directly from hunterdavis.com here.
971,810,614 Bytes, will be available 6am Pacific Time August 24th 2010 …

One forum post which has saved me immense amounts of time in this process has been this one at ubuntuforums. I could have (and many many times have) built debian based VM’s from scratch/stock/server Ubuntu distros and it is just not the same as when you build from a minimal system that’s got just what you want in it. Here’s how I setup rexVM. I use a set of scripts at DL but for personal projects I don’t mind starting from a fresh interactive command line. Assuming Ubuntu, and wanting to use Puppy (for smallest size… installing make and svn could be easier …). We’re going to do this a bit backwards. Puppy likes running in live cd mode, especially when you want to have the devx (compiler) package running. We’re going to install puppy in hard drive mode, then copy the contents of the devx package into our compiler.

  1. Download puppy linux 5.1, this is a great tight base image to start building from
  2. Fire up VirtualBox, and create a new VM named rexVM. For tightly bound development I like to have a 10gb expanding size disk and a small amount of ram ~256mb -i.e. lots of room for libraries and enough ram to compile
  3. Add the puppy-510.iso to your virtual media manager
  4. On the rexVM details page, add the puppy-510.iso as the ide secondary master (cd-drive)
  5. Boot up the VM, and in puppy select ‘system->puppy universal installer’
  6. Open gParted, device->create partition table, then partition your virtual HDD to 9.5gb ext3/.5gb swap
  7. Set the boot flag to on for the partition you just created
  8. Close gParted and the installer will commence-do a full install and install grub to sda1
  9. Shutdown the VM and de-attach the pupper live iso from the system
  10. Once it boots up, open system->quickpet and install the xorg_high driver
  11. Reboot or restart the x-server to activated
  12. Open the puppy package configuration utility and add extra repositories
  13. Close the package utility and download the devx package from here
  14. Click on the devx_510.sfs in a ROX-Filer window to mount it.
  15. Open a terminal in the mounted directory. (/mnt/+lupu_devx_510.sfs)
  16. cp -a --remove-destination ./* /mnt/home/
  17. Reboot the VM
  18. At this point we should be ready for the compiler, so make yourself a project directory
  19. mkdir /projects/rexVM
  20. Enter that directory, and checkout the rxSDK
  21. svn co https://mondragon.tek.bth.se/svn/main/world/ska/rex/trunk/rxsdk/
  22. (you’ll need to accept his security cert..which may be expired bleh)
  23. cd into the rexSDK directory, and edit the Makefile
  24. Change the sdcc: svn root target to be https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc sdcc
  25. (Make sure you’ve got the extra /sdcc/trunk/sdcc on the end of that link!! )
  26. Now copy over the sdcc-sparse link directory with cp -rp ./sdcc-sparse/link/ ./sdcc/
  27. Now, in that same directory, make the project with a standard make
  28. This may take a while, grab a snack, or cheat a little and up the ram/cpus on your VM during this compile ;)
  29. Once sdcc has finished compiling, execute a make install_sdcc
  30. Once sdcc has finished installing, softlink the z80 assemler command ln -s /usr/local/bin/sdasz80 /usr/local/bin/as-z80
  31. Execute the next make step with make build_rxsdk
  32. Once rxsdk has finished compiling, execute a make install_rxsdk
  33. If install_rxsdk barfs on librex, manually finish the tool compile install with cd rxsdk/tools/rxbuild && make install
  34. At this point, you have a nice build environment for your REX 6000 (and really most z80 based chipsets)
  35. If you’re like me, you’ll want to export the virtual appliance as a .ovf and add it to your vmRepo

And that’s that. Time for me to setup – hours. Time for each developer after me to setup a REX 6000 development environment? The time taken to download a ~970mb zip file. About 20 seconds over my local wifi network — not bad! You can more generically use these instructions to create any number of custom compile environments. Like the 300mb Z2 image I posted so long ago, I’ll post the 1gb rexVM for as long as it doesn’t start to eat up my bandwidth. Considering there’s probably 50 REX users left out there, (only one of whom I’m sure reads this blog) I’m not too worried. Happy Hacking!!

Share

  13 Responses to “rexVM – A virtualBox Appliance for Developing for The REX 6000”

  1. i totaly remember those things from way back. always wanted to take one apart. they still are worth quite a bit even today im suprised you got it for $6

    • Yeah me too, I thought it was ‘$60′ initially but was ‘$6.0′ when they rang it up. I’ve had a really good string of expensive old electronics come up at the “Out of the Closet” on Pico in Century City. Once I finish using it for prototyping or building an e-ink replacement (have you seen the 2.9″ kent they’ve got at sparkfun?) I’ll put it in the next Hackaway. Good times

  2. I remember seeing those in staples years ago. I always liked the look of them but not at the $100 or so they were. I didn’t know they were z80 based though, i’ll have to keep my eyes open for one or two being the z80 fanboi that I am :)

    What’s the resolution on them?

    • It’s funny, I love z80 all over the place (if you can call a NES a z80…), and somehow the REX flew right under my radar. It’s a shame really, as it sounds like for a time it was a really active and fun hacker community. It’s not technically a Z80, just a compatible 4mhz chip from Toshiba. The resolution is 240×120, and doesn’t bother my eyes to read e-books. I’d actually replace my kindle if it wasn’t so constrained on the auxiliary storage (2m +1m unused flash). Once I finish my e-ink replacement I’ll make sure to give the REX away in the hackaway :)

  3. Hunter: Do you know about the /new/ function in the 3.2.x series of VirtualBox in addition to seemless mode there is also now something called guestcontrol that allows the host to execute applications within the guest as if it was a host program. it’s pretty nifty :)

    • RK,

      That is freaking fantastic! I had not heard of that, but am already putting it to use at work as I type this. Utterly fantastic. Will save me quite a bit of time installing ssh hosts on my build machines! Thanks for the heads up!

  4. damn, ill have to fight kevin for it, and then my dad(who still has his Altair 8800). dosn’t the gameboy have a similar chip to the nes?

  5. Hey Nonya,

    Similar in terms of speed yes. The NES wasn’t any kind of a z80 at all really a low register 6502, I should have said “game boy” but the original game boy omitted many of the z80 registers so it’s kind of hard to call that a Z80 either heh. I should have referenced my old TI-86 :)

  6. Hunter: see if uzi or cp/m will run on it :) pocket wordstar anyone? (pocket dbase might be more useful though). btw i have a project idea that you might be able to help with? do you know anything about tandy model 100/102 hardware in particular the lcd and keyboard? — i picked up a model 100 case and keyboard and a 102 case, keyboard and lcd and wondering if a zipit could be recased into the case and the model 10? keyboard be made to interface to the zipit and even if i have to get another lcd it would be nice to try to get that interfaced too especially as the pxa270 can drive upto an 800×600 display.

    wishful thinking mostly but would be nice to try especially as it looks liek the wife binned my broken model 102 that the case and keyboards were originally planned for

  7. Hey RK,

    Yeah pocket wordstar wouldn’t be bad, though it has to break up all documents into 10k “memos”. Kind of a pain for anything large. I don’t know much at all about the tandy 100/102, but bunny from bunny studios had a great writeup on it earlier this year here http://www.bunniestudios.com/blog/?page_id=27. Sounds like a really fun project :)

  8. Hunter: thanks for the link. it looks interesting and might give me some clues on where to start.

  9. Hunter: I’m sure you already know this but just in case you don’t. the sata emulation in virtual box is faster and less resource hungry than the ide emulation so if you have the option, not using an existing hd image (you can move them but requires booting the vm, editing fstab and then switching in the virtualbox gui) and not installing windows as the guest IMHO it’s better you use sata for the hd image.

    I’ve slowly moved all my virtualbox vm’s to use the sata emulation and i’m much happier :)

  10. Good info, thanks :) I imagine there’s less protocol overhead in sata and ide had a built-in transfer limit if I recall..

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>