Archive for September, 2007

find /var/spool/internet -type f -exec sed -i -e s/longlandclan.hopto.org/longlandclan.yi.org/ {} \;

Sunday, September 30th, 2007

Hi All..

I finally got fed up with the lack of flexibility with my former hopto.org address, thus I’ve started moving towards deprecating it. I’ll keep it around for email, but all my websites and other facilities will now move over to a new domain. I’ll be putting in Redirect directives in my webserver’s config, so it’ll all be completely transparent. My blog is already moved across now, and I’ve updated to WordPress 2.3 in the meantime. The feeds are now:

  • Gentoo Planet content: http://stuartl.longlandclan.yi.org/blog/category/linux-development/gentoo-development/feed/
  • Publically Syndicated content: http://stuartl.longlandclan.yi.org/blog/category/public/feed/

The change in domain means I’ve got much greater flexibility over the DNS entries, such as the ability to add AAAA records and such. So if you see a URL referencing the longlandclan.hopto.org domain, change that to longlandclan.yi.org.

The decline in legacy interfaces

Thursday, September 27th, 2007

There’s been a rather disturbing trend lately.

In recent times, we’ve all seen a very high increase in the number of players in the portable computing market, and a significant reduction in the cost of laptops. People are demanding more features packed in, higher performance, etc. This is fine… however it seems laptop manufacturers overlook those of us who still use dated interfaces such as PCMCIA/Cardbus, Parallel ports, and RS232.

Now okay, I can see that there’s a need to cut costs, and that there’s limited space… but surely somewhere in these laptops, there’s room for a lowly MAX232 and a DB9 male socket? Most of the manufacturers cater for the “average user”, who probably has no idea what to use these ports for and thus never use them. There are, however, numerous places where one finds themselves needing a proper RS232 port. What on earth for?

  • Serial consoles — a very convenient way to run servers that normally are accessed remotely.
  • Programming various embedded devices — such as PLCs and microcontrollers.
  • Driving simple logic devices — why complicate things with USB when parallel or serial port interfaces will suffice?

In my experience, USB<->RS232 serial converters aren’t what they’re cracked up to be. We bought one (an ATEN one based on the PL2303 IC) to use with a Lego Mindstorms RCX kit we have (the IR transceiver connects via RS232). It works for hooking up to a serial console quite well… but it demonstrates all kinds of quirks when using it with the Mindstorms kit — the faults being intermittent in nature.

The same device, also acts up when I use it at university to program some Rabbit Semiconductor RCM4000-series microcontrollers. I tell the programming environment to use COM4: (the assigned device name under Windows XP) and that it’s a USB device. Things seem fine, until I try loading my compiled program onto the microcontroller… the loader fails to detect it. Switch back to COM1:, plug the microcontroller into that port, voila… everything works.

At the moment, I’m keen to keep my present laptop (Toshiba TE2100) going as long as possible. It has a few quirks (e.g. no OpenGL under Linux, issues with USB on resuming from suspend under both Linux and Windows XP, and a LCD backlight that started acting up recently), but largely works okay, and comes complete with all the legacy ports I require. The only thing I miss is a Line-In socket for ripping my vinyl records. However I realise that I may need to upgrade in the next few years.

My needs as a customer are unusual … a lot of people seem to want über gaming rigs or multimedia systems… for me, I’m after a workstation that’ll work well with Linux. So high-end OpenGL isn’t a priority, I’d sooner get a laptop with Intel graphics, and put up with somewhat lesser 3D performance under Win32, than deal with the pain that is proprietary drivers under Linux. Heck… even just good accelerated 2D is acceptable — I rarely use 3D.

Cardbus/PCMCIA is important, since I have a lot of legacy PCMCIA devices such as network cards that I’d like to continue to use — sometimes multiple network cards is useful. I sometimes do use my laptop as a router, and would sooner use one of the spare Xircom PCMCIA cards I have lying around, than fork out for a USB ethernet device (I have one… but they’re more expensive than PCMCIA cards).

A proper RS232 port is important for my needs as outlined above.

Presently, I’m holding off for as long as I can. I know I’m going to have fun getting a laptop with no OS (or failing that, Windows XP… I don’t like Vista, and refuse to buy it) from the usual suppliers. Looking around though, everyone seems to be keen on inflicting USB on me — sorry guys, not good enough! I’m watching what Lemote is doing with keen interest. Having used the Fulong PCs for a while, I’m really quite impressed by them.

Lemote do make a laptop version of the Fulong, with very similar hardware. I have no idea how much they cost (the Fulong PCs are about AU$260 depending on exchange rates) but I’ve found the Fulongs do almost everything I need to do. The upcomming Loongson 2F processor in a laptop would be awesome.

The Loongson 2E used in these Fulongs implements a subset of the MIPS3 ISA. runs at up to 800MHz, and draws 20W of power. The Loongson 2F apparently will fully implement MIPS64r2, exceed 1GHz clock speed, and draw just 5W. Some good power management, and I could see a laptop based on one of these, lasting several hours on a charge. And of course, it’d likely run Linux flawlessly. Gentoo already runs extremely well on the Fulong. The only downside being unable to run many proprietary apps.

I only hope that some of the major companies (Yes, Apple, Dell, Lenovo, Asus, Toshiba, Acer… anyone else…) could reconsider their desire to drop these still-needed interfaces. While the general population might find them useless, that’s still no reason to take them away from those who do use them!

Gentoo/MIPS for Loongson: LiveUSB images coming soon

Sunday, September 23rd, 2007

Hi All…

Some good news on the Loongson front. I’ve managed to figure out unionfs, and udev enough to construct a kernel and minimal userland that’s capable of mounting a SquashFS volume from a USB HDD, then lay a tmpfs volume over the top of it, making it writable.

The LiveUSB images will likely come in two forms:

  • A minimal image, that’ll just provide a basic system capable of performing an installation of Gentoo
  • A complete desktop image, with KDE, Firefox, Thunderbird and all the usual conveniences.

The boot procedure will go something like this:

  1. Download the LiveUSB kernel and your chosen OS image to a USB HDD, or burn them on a CD (if you have a USB CD-ROM drive) naming the files ‘kernel’ and ‘gentoo-mipsel-root.sqfs’ respectively in the root directory of the disk.
  2. Plug the USB HDD or CD-ROM into the Lemote Fulong computer and power it up
  3. Hit ESC to break into the PROM, then type (substituting vfat with the appropriate driver… I might have the vfat wrong too):
    PMON> load /dev/fs/vfat@usb0/kernel
    PMON> g console=tty

Gentoo will then start automatically booting from the USB HDD. Ultimately I want to construct something equivalent to the Gentoo 2007.0 x86 Installer CDs which have the Gentoo Linux Installer, but I figure even there, it’ll be a similar procedure to boot them — first though, the installer needs some MIPS love.

On my TODO list, is to figure out how the livecd target in catalyst works … at present I’m doing everything by hand. I’d also like to try and fix µClibc so it doesn’t die when the kernel page size is bigger than 4KB (on Loongson, one needs to use a page size of 16KB).  Time will tell here, at the moment I’m a bit busy to go delving into the depths of the µClibc dynamic linker to fix things, so I’m just using the rather bloaty glibc library.

In short though… we’ll soon have the very first install images for Gentoo/MIPS on this platform available.

binutils-config issues and possible hiatus warning

Wednesday, September 19th, 2007

Hi all… Two issues to raise here:

binutils-config and the missing ldscripts/elf64btsmip.xr reference

It seems this problem seems to be happening to quite a few people. If you follow the Gentoo/MIPS handbook to-the-letter with the present version of binutils-config, you wind up with this:

moosehead linux-2.6.22.6-20070902 # make vmlinux.32 modules CROSS_COMPILE=mips64-unknown-linux-gnu-
CHK include/linux/version.h
CHK include/linux/utsrelease.h
Checking missing-syscalls for N32
CALL scripts/checksyscalls.sh
Checking missing-syscalls for O32
CALL scripts/checksyscalls.sh
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
LD init/mounts.o
mips64-unknown-linux-gnu-ld: cannot open linker script file ldscripts/elf64btsmip.xr: No such file or directory

The fix… update to binutils-config-1.9-r4 or newer, then run binutils-config –mips && . /etc/profile before trying your kernel build again. For further details, see bug #171486. Gentoo 2007.1 (next release) will fix this issue.

Heads Up

As some of you may know, I’m nearing the end of my double degree (Bachelor of IT/Bachelor of Electronic Engineering), and part of that involves getting 60 days industrial experience. I’ve applied to a number of companies — some of these positions will take me to rural locations where I may not have a permanent internet connection (or even reliable dialup).

Thus, during this upcoming summer break (between mid November through to late February), I may wind up going on a temporary hiatus from Gentoo. None of this is definite at this stage, nobody that I’ve contacted has gotten in touch to line up an interview however I figure I may as well post this here now so that the me disappearing doesn’t come out-of-the-blue.

The plan if I do wind up temporarily moving: I’ll try and get 2007.1 pushed out the door before I leave. This will focus on newer stages for MIPS1 and MIPS4 little-endian targets. I’ll set up both Lemote boxes here so that other Gentoo devs can gain access to them whilst I’m away. If I can get any internet service at all, I’ll be around to answer queries, and maybe do some limited work via SSH, but testing X or audio apps are out of the question.

As I say, none of this is definite, and I may wind up getting my experience somewhere here in Brisbane (ideal case). That said… given my stress levels lately, they say a change is as good as a holiday… maybe a few months living in a country town is just what I need.

Sydney APEC Meeting Roundup

Thursday, September 13th, 2007

The following is a satirical piece regarding the APEC saga last week. I’m considering whether I put it in vodcast form on YouTube for our dear PM — but for now, I’ll just put the transcript up.


Well, it seems Sydney drew the short straw, and thus got the joy of almost completely shutting down while some high-brow politicians go gather to discuss trade and other issues. All this, whilst at the same time dealing with a betting industry which is sounding rather hoarse at the moment. Well, what do you expect when they shut the stable doors after the horse-flu bolted?

I must admit, I’m glad I live in Brisbane… 1000km away from all the hassles. We’re largely insulated from all the hassles playing out down south. That said, the local media has been doing a good job of letting us know what’s been happening down there.  It as been interesting to see what these politicians bring with them in their travels. Most of us, when we go abroad, we bring clothing, whatever papers, etc we need… in general, we’re careful to not pack too much. Not the United States of America it seems. The US President turned up with a 800-strong entourage.

Here’s hoping he didn’t forget the kitchen sink. The strategic placement of one rather large bird over at Brisbane Airport was genius too — I mean, have you ever tried to get up the Pacific Motorway in a hurry? If WW3 came knocking, it’d be at least a day before they’d get over the border — then there’s the Gateway Motorway traffic to contend with. They’d be sitting ducks stuck in one of Brisbane’s most prestigious parking lots.

George Bush is off to a great start, right in the opening speech, he welcomes everyone to the OPEC meeting. Well, it’s good to see that Operation Iraqi Liberation (OIL) hasn’t been far from a certain president’s mind. For a world leader though, it’s a shame he didn’t pay more attention to his geography teacher at school. Do I look like an Austrian to you? Hmmm?

Osama Bin Ladin … apparentlyThe Chaser’s APEC passes — an obvious fakeSecurity has been tight though… I mean really tight. The only people allowed through are those dressed up like Osama Bin Ladin, or those carrying a Chaser’s War on Everything “Insecurity” pass with “Joke” written on it. No terrorist could possibly penetrate this iron-clad wall of security.   (Image source & credit: News Corp.)

It was rather amusing too, to see the cast of “The Chaser” get a dose of their own medicine too. Indeed, the shoe was on the other foot. They should indeed consider renaming the show, “The Chasee’s War on Everything” — at least while the courts decide their fate.

As far as breeching security is concerned, either someone in charge of the gates doesn’t quite understand what “joke” means, or they mis-interpreted the number of barks emitted by their guide dogs. If they let through something as blatantly suspect as they did, then I’m afraid they’ve only got themselves to blame. But it seems security is everyone’s problem, and everyone is at fault when it falls down. Unfortunately for the NSW Police, it’s done little other than make them look like fools — and their present attacks only make the hole deeper.

If it’s one thing we can learn from this whole experience, it’s this: don’t go hosting such highly sensitive events in the middle of a busy city. Seriously guys, go somewhere rural where you’ll be miles away from any trouble, and you’re not going to be a right pain in the arse to millions of people. Of course, this would just be common sense, and we all know just how common that is these days.

Riverfire 2007 Photos & Video

Monday, September 10th, 2007

The photos have been up for a little while, but I haven’t bothered to actually post the link to them.

Brisbane has a fireworks event called Riverfire on an annual basis around this time each year.  It fires off around various points of the Brisbane River that passes right through the CBD

For the last few years, we’ve been going as a group of friends up Mt. Coot-tha and taking shots of the fireworks.  Last year’s efforts are here.

This year, I tried using some different exposure settings … normally I like leaving the shutter open for a while, to capture the full effect.  This time I tried 1/6 sec exposure.  If I hit the button at the right moment, the effect worked well, but the timing was a real issue.  I wound up going back to long exposure, which produced some nice shots towards the end.

The ground wasn’t as stable this time either, thus there was a little camera wobble in some of my shots as the tripod moved.  I also managed to get some videos of the F111 dump-and-burn sequences at the start and end.  These are in pretty low quality MPEG4+AAC or Vorbis+Theora since I’ve only got a 128Kbps upload pipe — so go easy on the downloads.  For best results, download them to disk, then start playback.

I make an appearance in some of these photos — I won’t say which ones… that I leave as an exercise for the viewer.

See http://gallery.longlandclan.hopto.org/viewalbum.cgi/riverfire-2007 for the photos and videos.  If you decide to link to the videos, please mirror them on your space, providing a hyperlink to the photo gallery.

Re-inventing the headlamp… the Hat-lamp

Wednesday, September 5th, 2007

This is an idea I’ve had for some time now, but only recently started doing anything about it. Anyway…

The problem:

As many of you may know, I study at university. Often the lectures and tutorials are on late at night. Thus, I frequently find myself making my way from or two university in the dark. Many of the areas I walk through are dimly lit, with sparse street lighting and quite a few road crossings. Often the footpath is an uneven surface, and therefore one needs a torch of some kind to see any hazards underfoot. The same torch does improve one’s visibility — but only for those in the torch’s beam.

Headlamps are really nifty torches… freeing both hands. The problem one has though, is that the small compact ones aren’t much good for distance vision, and the big bulky ones chew batteries like they’re going out of fashion. Then there’s the fussing over whether they’re pointed up or down, adjusting head straps…etc. They’re great when camping, and even for walking home of an evening, but the balance between light intensity and battery drain is a big problem, especially when only a limited supply of batteries is on hand. Seldom does one need a high-power beam all the time, but they’re useful to have.

Bike tail-lights are useful for improving one’s visibility to vehicles coming from behind, but they aren’t much help if they’re approaching side-on. And none of these lights will turn themselves off if there’s sufficient ambient light.

My idea:

These problems got me thinking about how I could solve the problem. Does it really need to be solved? Well, it isn’t a big one, so I guess not… but for the sake of it, I’ll try and solve it anyway. LED technology has vastly improved in the last few years, to the point now where they’re talking of using them in street lighting and car headlights (PDF; IEEE Explore subscription required). The big advantage is the high efficiency and low heat of LEDs. A few high-power LEDs should last as long, if not, longer than the incandescent bulb that my present headlamp uses.

My idea revolves around mounting 3 sets of LEDs on a hard hat of some description. Why a hard hat? Well, they’re a rigid structure that I can easily drill holes into and mount components on. Using a full-brim hard hat (rare in Brisbane), it’ll also keep the sun off during the day, thus serving a fourth purpose.

This headlamp would use 3 different LED banks:

  • High-Beam LED: Single 1W high-power White LED — mounted above the rim facing forward in the distance.
  • Low-Beam LEDs: Three high-intensity 5mm White LEDs — mounted under the rim facing downward.
  • Rim LEDs: Twelve high-intensity 5mm Red or Yellow LEDs — mounted around the rim of the hard hat facing outwards.

The high-beam LED would provide the distance lamp… acting like any high-power torch. It’d be focussed slightly below the horizon. The low-beam LEDs would be directed downwards so that they light up an area just in front of the wearer, allowing them to see what they’re doing. The Rim LEDs would be divided into two groups of 6 that flash alternately to warn approaching vehicles at any angle.

Mounted on the top of the hard hat, would be a light-dependant resistor (cadmium-sulfide cell) that detects ambient light, and just underneath, a PCB containing the controller logic for the automatic switching. Then down the side under the rim, would be the switches and threshold pot for controlling the whole circuit.

Each of the functions can be in one of three states, controlled by the user: on, automatic, or off

Controller Circuit:

The key to this headlamp design is the controller circuit. I ended up trying three different circuits before settling on this design. By far, the most simple circuit was based on a IRF630B N-channel power MOSFET.

In this configuration, the CdS cell and potentiometer were wired in a resistor-divider configuration, such that the voltage rose as the light level dropped. This drove the MOSFET’s gate pin, causing it to sink current whenever the light levels were low.

I soon discovered this circuit was no good for high-current devices such as my existing incandescent headlamp. Because the bulb was such a heavy load, it put a heavy strain on the batteries, causing the voltage potential to drop significantly. This in turn, shifted the threshold point on the voltage divider, causing the MOSFET to turn off again, causing the batteries to rise up again… ad nauseum, until the batteries were flat or the user got frustrated and switched to manual modes.
Addition of a relay helped… the ciruit was slightly more stable, increasingly so as large amounts of capacitance were added across the relay, slowing response times. It still was possible to get the whole system into a battery-guzzling oscillating state.

In the end, I turned to the humble 74HC14 Hex Inverting Schmitt Trigger. By turning my voltage divider up-side-down (so voltage rose with light level) I found I could gain the effect I needed. Due to the hysteresis provided by the Schmitt Triggers, the light doesn’t turn off until it gets significantly lighter than the threshold point, and doesn’t turn off until it gets significantly darker. This provided the stability I needed. Hard Hat headlamp controller, rev3

The final design (click image on right, or see SVG or Kicad .sch versions) works as follows. The CdS cell and pot provide the means for detecting the light level. Adjusting the pot will make the circuit more or less sensitive to light. This drives the first Schmitt-Triggered inverter.

The output of this inverter is passed through a BC547C NPN transistor which in turn, drives a small reed relay. This relay is the main switching workhorse, providing a switched 6v rail which hooks to small toggle switches for the low and high-beam LEDs.

For the Rim LEDs, the same schmitt trigger IC could be used to make the oscillators. The Phillips 74HC14 datasheet describes how. I didn’t care much about frequency, so long as it flickered just fast enough to be noticable. To get the alternate flashing action — I set one inverter up as an oscillator, and used it to drive a second inverter. The outputs of both drive individual BC547C transistors, which act as current sinks from the Rim LEDs.

The following two photos show my testing of the circuit on a breadboard.

Testing on breadboardCircuit in action

Bill of Materials

The following is the list of parts for this headlamp, and where I purchased them. Some components can be exchanged to suit one’s needs. At the moment, I haven’t yet bought the 1W LED and power supply which would form the high-beam LED.

Quantity Part Desc Supplier. Part No. Approx. Price each (at time of post)
1 Hard Hat Blackwoods 05339960 $22.00
1 74HC14 Hex Inverting Schmitt Trigger Jaycar ZC4821 $1.30
3 BC547C NPN Transistor (or similar) Jaycar ZT2152 $0.20
1 5V SPST Reed Relay Jaycar SY4036 $2.95
3 1kOhm Resistor Dick Smith Electronics R1074 $0.04
1 10kOhm Resistor Dick Smith Electronics R1098 $0.04
1 33Ohm Resistor (for low-beam LEDs) Dick Smith Electronics R1038 $0.04
1 10Ohm Resistor (for rim LEDs) Dick Smith Electronics R1026 $0.04
1 33µF Capacitor (electrolytic) Dick Smith Electronics R4340 $0.25
1 Veroboard PCB 95mm×76mm Jaycar HP9540 $3.80
1 1MOhm Potentiometer Jaycar RP8524 $2.50
1 Photoresistor (CdS Cell) Jaycar RD3480 $2.50
1 4×AA battery holder Jaycar PH9282 $2.25
1 1W Constant Current Supply Jaycar AA0582 $19.95
1 1W High-power White LED Jaycar ZD0508 $9.95
3 18000mcd White 5mm LED Jaycar ZD0195 $4.95
12 4000mcd Red 5mm LED Jaycar ZD0154 $0.80
1 Packet of Nylon bolts 12×3mm Jaycar HP0140 $2.65
1 Packet of Nylon bolts 25×3mm Jaycar HP0142 $3.00
1 Packet of Nylon nuts 3mm Jaycar HP0146 $2.50
3 DP3T Switch Dick Smith Electronics R7614 $0.98

Assembly

Underside of modded hardhatConstruction of this headlamp will require drilling holes into the shell of the hard hat. So once complete, I wouldn’t go using it on a construction site. To mount the rim LEDs, I found the best way to do it was to use a 3mm drill to make the hole, then use a screwdriver to widen the hole so it was just big enough to accomodate the LED. The LED was then forced into the hole, plugging it — friction holds it in place.

The switches were small enough to mount using double-sided tape just inside the hard hat. A small piece of PCB was used to mount the potentiometer, allowing it to be fastened to the underside of the rim using a nylon nut & bolt.

The low-beam LEDs were mounted onto a small PCB with the current-limiting resistor, and fixed to the front of the hard hat using masking tape (yeah, dodgy I know) — some cardboard prevents the light from shining into the wearer’s eyes.

The main PCB and battery pack were fitted inside the shell of the hard hat — two 25mm long bolts hold the battery pack in place, while one 12mm bolt holds the PCB in place. The actual components are placed on the PCB according to the PCB board design shown to the right (click for larger image).

Final Product (almost)

Well, I haven’t bought the high-beam LED yet, that’s for later. The end result however, works great. I first used it at Riverfire 2007 and found it very convenient. At the time I had lost the LDR, so had to buy one yesterday, which I fitted last night. The unit now automatically switches off if the light levels are sufficient. As far as appearance, it doesn’t look that different to an ordinary hard hat, until you switch the LEDs on. These show the hard hat, before modifications, after, and what it looks like in action.

Original Hard hat After modifications Hat-lamp in action

Safety & commercial considerations

It’s worth noting that although this hard hat would’ve been manufactured to meet AS/NZS 1801. I’ve destroyed this rating by drilling holes and inserting electronics. This project might still survive the double impact tests needed — but it’s never been tested, and isn’t intended to. I just wanted a hat that shaded me by day, and lit my path by night.

If this idea prooves popular, I could see it being adapted into a removable brim that sits over a hard hat/cap. The actual electronics cost over $60 … so embedding it into a hard hat on a commercial basis is not economic, since hard hats have a limited lifespan and need to be replaced every few years. So the headlamp would need to be detachable.

Update: 22nd November

Finished hard hat+headlampWell, having used it now for two months, the idea has worked great. One set of 4×AA batteries lasts about 2 months, with moderate usage — and even then everything still worked, just the light was getting a little dim. I’ve since added the high-beam 1W LED (the supply for it wound up costing about $40, but anyway) and extended the brim so that it provides additional shade during the day.

The photo on the left shows what it looks like now. There has been one minor technical problem, in that the relay occasionally sticks — I’m investigating whether I replace this with something solid-state such as a P-channel power MOSFET which should do the job nicely. The only other one is the odd social problem — of people asking if you’re expecting a disaster, but once they’re used to seeing me wear it, this usually isn’t an issue. ;-)


Update 2009-06-05: I did get around to making a P-MOSFET version. See the schematic in PDF or gschem.  The circuit can theoretically use any P-MOSFET rated at 1A current for Q1… this one uses the IRF9540N available from Jaycar (which is overkill).  I use BC547Cs for Q2 and Q3.  CONN1 connects to the adjustment pot (use a 2M? one), CONN2 connects to the LDR.  R1 and R2 may be omitted, but are present to allow the circuit to operate if either the pot or LDR connections are broken.  CONN3 and CONN4 connect to your low and high beam LED banks.  CONN5 connect to the two warning LED banks.  R4 and C1 control the rate of oscillation… any value can be used, see the NXP 74HC14 datasheet for details on how to calculate these.

Murphy’s Law

Saturday, September 1st, 2007

Well… I’ve had some interesting issues this week.  Murphy must be looking down on me.

O2: RM5200 CPUs with PROM 4.0

I recently purchased a RM5200 CPU module for my O2.  Now, my O2 at the time came with a R5000 180MHz CPU, and had PROM rev 4.0.  After handing across AU$100 on the new CPU module, I later discovered my PROM didn’t recognise the CPU, instead, it emitted the message:

Not supported CPU type. PRid<impl>=0x28

PANIC: assertion failure (IMPOSSIBLE) in file cache_mi.c at line 203

… via serial console.  The seller had tested the CPU in one of his boxes (accidentally left one of the riser connectors attached to the module) prior to me picking it up, so I knew the CPU worked.   He hadn’t struck this problem before — which I suspect is because 99% of his customers would have IRIX 6.5 installed (the PROM gets updated during the install process).

My problem, I don’t have a complete set of IRIX.  I downloaded IRIX 6.5.30 from SGI’s SupportFolio website, plonked some files out of the first overlay CD on my TFTP server and managed to netboot IRIX into a miniroot, however I lacked the foundation CDs, thus couldn’t perform an installation.  Thankfully, J. Scott Kasten was generous enough to email me the flashinst utility and IP32 PROM image, which I used to update my PROM to v4.18.  It’s a shame that SGI haven’t considered releasing a minimal IRIX miniroot with flashinst so that us Linux users can update our PROMs without downloading >2GB of tarballs and spending an entire weekend trying to figure out how to turn tarballs into an IRIX installation.  I’ll post up how I netbooted IRIX and updated the PROM later.

In any case, my O2 is back up and running… flying along at 300MHz.  Just to upgrade the RAM (it already has 36GB+4GB HDDs)  and it’ll be a sweet machine (as far as O2s go).  I’ve since left feedback on the item, and posted the surplus riser connector back.  (I got the CPU module from “octane_king” on eBay Australia, who has a few of these available as a buy-it-now auction, if people are interested.)

Building a new headlamp

I broke my LED headlamp on a recent camping trip … it was one of these 3-LED jobs, that ran on AAA batteries, and could either work as a handheld torch, or clip onto a bracket.  The torch still works, but it is now an ex-headlamp, a pain in the arse if you’re trying to carry things.

Not happy with what’s on the market, I got a bright idea to make my own.  Basic idea, I’d use a hard hat to mount the LEDs on and conceal the electronics under the shell.  As an added feature, the headlamp was intended to incorporate a light-dependant resistor (CdS cell) which was to drive a inverting schmitt trigger, so that the headlamp could switch-off if there was sufficient light around (e.g. I stepped indoors).  I’ll be posting about this in detail later too.

I had all sorts of fun getting the hard hat… I was after a full-brim one, since the others look bland, and the full brim one would also give me more surface area for mounting components.   My first problem was not knowing the right key words, I had tried “wide rimmed”, mining, and numerous other keywords without success.  Once I had the right keywords though, I did discover a couple of suppliers here in Brisbane (such as Blackwoods at Carole Park).  They’re still insanely rare in this part of the world.

Now that I’ve got everything, I started building it last night.  Trouble is, the CdS cell has gone walkies, and I just know it’ll turn up if I buy one.  I also didn’t count on the curvature of the hard hat being a problem — I planned to use double-sided tape to attach the battery packs and PCB to the underside of the shell.  Turns out I’ll need to drill a hole and use nylon nuts & bolts to attach these.  That said… I have my headlamp partially working now — sure, I look like I’ve just stepped off a building site, but it’s functional (still some fine tuning to do).  I intend to make use of it at Riverfire tonight, as well as those late nights when heading to/from university.

Anyway, right now I’m in procrastination mode… I need to resume studies on a telecommunications subject pronto, so I better pull my finger out and get to work. ;-)