Redhatter (VK4MSL)

Gentoo 2008.0 final stages uploaded

I’m pleased to annouce the final 2008.0 stages have been published.  I haven’t yet gotten around to giving them a run, I’ll set up a couple of chroots and do some test builds shortly, but in the meantime, I have put them up on my devspace for public review.

As previously announced, this release sees the addition of generic MIPS-1 stages for both big and little endian, as well as new stages for little-endian MIPS-3.  We still only support the hardware listed in the handbook however — the generic stages are provided merely as a convenience to those who may wish to experiment with other hardware, and know what they’re doing.

Approximately 1.2GB got uploaded over the 30 or so hours… this is apparent from my NTP server’s performance this weekend:

… Yeah… I think I’ll wait until I’m back at uni before I upload any more big files. 😉

Anyway… as I say, the new stages are up, and I’d be greatful if some brave users could take them for a spin and report back.  In the meantime, I’ve got some chroots to set up and testing to do.

Lecture Slides… and how to NOT present them

Well, presently I’m reading through the semester’s lecture slides to familiarise myself with the content I’m going to be examined on shortly.

And I’m noticing there are some bad habits that lecturers seem to be keen on repeating… again, and again.  Here’s some of my pet hates, as a student.  These relate to the presentation of the material we’re given, the actual format they’re provided in is another matter.

Many of these were provided in PDF, which is good.  My first niggle however, is when they do their “print to PDF”… in black-and-white… but don’t adapt their slides to suit this monochrome medium.Pick a shade, any shade!

The above image is from a real presentation.  Those studying “Professional Studies II” (EEB781) at QUT might recognise it.  It was shown to us in colour during the lecture… but now when we review our notes, we only have it in shades of grey.  Thankfully we’re not being examined on that chart!  Then there’s this little gem…

This is a small section of a slide… Must I say, that black looks great on dark grey.  Mind you, the same criticism could be levelled at consumer electronics designers, who think it’s great to microprint 2mm high light-grey text on a dark grey panel!  But I digress…  Colour doesn’t necessarily improve things either… as shown by this example:

If it isn’t masking much needed information by discarding the colour information… the other trap they fall into, is scaling bitmap images up in size, and/or deforming their aspect ratios.  I’ve got loads of examples of this, dating back over 5 years of studies… Here’s a brilliant example of the former.

Uh huh… you honestly are going to tell me you can read every word of that?  Well yes, if you look closely, you can make things out… but why should we?  That slide is so blurred and pixellated, it’s hard to see what is being said.

Here’s the lesson… Vector graphics are your friend.  You can scale a vector to any size you like, and it won’t pixellate.  SVG is great for this… EPS isn’t too bad too.  Or WMF.  They all allow for graphics that can be scaled to any size.

Some things of course, are inherently bitmaps, such as photographs and scanned images.  If you must use a bitmap… make sure it’s a decent resolution to begin with. Making a bitmap smaller (by resampling) is fine… but don’t try to make it bigger… it’ll look like utter shite.

And of course, if you do try to resize a bitmap (or any graphic really, vector or bitmap)… at least preserve the aspect ratio.  Nothing looks worse than a stretched and distorted photo…

If you look closely, you can see the top-left photo has been stretched (made bigger!) horizontally slightly (not too bad, but still).  The worst is the bottom-right photo, which has been compressed vertically.  It’d be okay had the image been compressed horizontally in proportion… but instead, it looks squashed.

Just about every presentation package I have used, provides the means to scale images while preserving their aspect ratio.  Some do it by default… some require you to hold down Shift or Control whilst dragging it out.  In either case… it’s trivial to do.  If something doesn’t fit the hole in your slide… consider cropping the bits that aren’t needed so that it matches the aspect ratio of the hole.  But don’t squash it!

Anyway… that’s enough ranting from me… about time I got back to my studies.

Tugboat vs Bridge

Another one that arrived via the Department of Defence… this time, a rather striking series of images. I have no idea where these photos were taken, or who was involved… but anyway. Enjoy. 🙂

To avoid my ADSL link getting saturated, I’ve moved the article here.

Great Comeback Line (or how to offend an ABC interviewer)

The following is an email I just received via the Department of Defence.
Enjoy. 🙂  (Update: It has been revealed by a commenter to this post, that the transcript below is a hoax.  Cheers for the info.)


For those that don’t know him, Major General Peter Cosgrove is an ‘Australian treasure!’

General Cosgrove was interviewed on the radio recently. You’ll love his reply to the lady who interviewed him concerning guns and children… Regardless of how you feel about gun laws you gotta love this! This is one of the best comeback lines of all time. It is a portion of an ABC interview between a female broadcaster and General Cosgrove who was about to sponsor a Boy Scout Troop visiting his military headquarters.

FEMALE INTERVIEWER: So, General Cosgrove, what things are you going to teach these young boys when they visit your base?

GENERAL COSGROVE: We’re going to teach t hem climbing, canoeing, archery and shooting.

FEMALE INTERVIEWER: Shooting! That’s a bit irresponsible, isn’t it?

GENERAL COSGROVE: I don’t see why, they’ll be properly supervised on the rifle range.

FEMALE INTERVIEWER: Don’t you admit that this is a terribly dangerous activity to be teaching children?

GENERAL COSGROVE: I don’t see how. We will be teaching them proper rifle discipline before they even touch a firearm.

FEMALE INTERVIEWER: But you’re equipping them to become violent killers.

GENERAL COSGROVE: Well, Ma’am, you’re equipped to be a prostitute, but you’re not one, are you?

The radio went silent and the interview ended.


Clearly a certain General didn’t read the part of the ACMA rules that state you should not use language that would offend a reasonable person. 😉 But very succinct nonetheless.

mod_auth_mysql

Hi all…

This is more a note to myself… but may also be useful with others who may be wondering WTF is wrong with their mod_auth_mysql setup.

To configure it, do it as per the instructions mentioned in the CONFIGURE file, or even following the /etc/apache2/modules.d/12_mod_auth_mysql.conf that the ebuild installs… HOWEVER… you will need to change the length of the password field in the MySQL code snippets to suit your encryption method.

I decided to use SHA1 hashes, which are 40 characters long (encoded as hex).  Thus, you use a column type of CHAR(40), and set your authentication configuration to use AuthMySQLPwEncryption sha1. To use the “scrambled” encryption scheme (uses MySQL’s PASSWORD() function), this column needs to be 41 characters long, not the 20 advertised in the examples.

Once you do this, everything should be fine… and things will work as expected.

Join the FaceBorg

Seems I’ve coined a new term tonight… “faceborg”.  Okay… seems others have come up with the same idea before me, as pointed out by others.  Not sure what to call the MySpace users… I’m sure someone will come up with a succinct term for them. 😉

Ever since social networking sites such as MySpace and FaceBook have come on the scene, the internet veterans have been under increasing pressure to join up with these sites.  Me?  I don’t see the point.  They don’t appear to offer anything new.  From what I can tell, they are centred around allowing someone to create their own identity.

The misconception out there among the non-technical people, is that you need to be part of one of these sites to have an online identity.  This is simply not true.  You can achieve much the same thing, through the use of traditional media such as email, IRC, and modern media such as blogs.

The one big “advantage” I keep hearing, is that it makes it easy to find others.  Again… you don’t need these social networking sites for that.  There are two ways you can achieve what these sites give you:

Keep your identity consistent.  If you like being known by a certain nickname, then use that nickname.  You can also put your real name up there too if you wish, and anything else that identifies you.

In my case, there are three identifying keywords that will locate me in many search engines: my full real name, my nickname, and my radio callsign.

The major thing that social networking sites offer however, is friendship lists.  Guess what… good ol’e HTML provides that already.  And blogs these days offer XFN.  You simply link to your friends’ blogs/webpages… and voila… your friendship is instantly publicised.  Many search engines also track links between sites — so they will also pick up on these links.

What are the advantages in having your own blog/site?  Well, you can have all the bells and whistles you like.  Want to post videos?  No worries, there are tools for doing exactly that, and embedding them in your blog posts.  The other big advantage, is you’re totally in control — you own the content, and you’re responsible for it.

How about messaging?  Well… you can add that to your blog… there are facilities that can accept such addons.  Or there’s a plethora of tools already out there… such as IRC, XMPP, MSN Messenger (dare I mention it), and of course, plain old email.

To those who are already on these social networking sites.  Great… you’re happy where you are… this is fine.  However, don’t be disappointed if the rest of us, who may likewise be happy with where we are on the web, don’t come rushing to join you.

Life at the present moment

… is not a pretty tale at this point.

At the moment, I’m a bit pissed off. Some inconsiderate bastards in my neighbourhood are playing crap music at top volume (Yes… I’m talking about YOU, at the Settlement Road/Kaloma Road intersection!) — so loud in fact, that wearing earmuffs with a 80dB attenuation rating, does not stop the noise. However, this isn’t what I’m really annoyed about.

I’ve switched all the radios off, and the mobile phone… in this state of mind it’s better I don’t go talking on air, as I’m likely to say something I’ll probably regret. Likewise the phone. I’ve just tweaked my blog’s config, so now this won’t appear on planet.gentoo.org or anywhere else stupid enough to syndicate the entire blog.

Worth noting, that save a few isolated examples, my presence doesn’t seem to be wanted at all. A couple of the senior devs (and former devs) in the Gentoo/MIPS team for instance — regard me as an incompetent idiot (I have IRC logs and email archives of this), I’m only tollerated because they need the numbers.

My big beef at this present time, is where my future is headded. I’m almost through my education. I’ve been at it now, non-stop, since 1991… 7 years of primary school, 5 years of high school, a year of straight IT at Griffith, and now, 5 years of IT/EE at QUT. Well almost… it will be 5 years at the end of the year.

I’ve managed to organise some work experience with a mob out at Laidley. This is great news — it means I might have some chance of graduating this year. However, it’s a long commute from Brisbane to Laidley… and I’ve just been given a direct order by my father that I’m to be home by 7:00PM! Wonderful… it was going to be a struggle accumulating the hours up as it is.

The work experience issue is a big problem on my mind. Where as most students I’d imagine, at this stage of education, would be filling in job applications for graduate positions… this isn’t an option for me. Without the industrial experience, I don’t graduate!

This is a point I can’t seem to get through to people. If I were to apply to a graduate position, they’ll expect someone who has done the 60 days experience as required by the Institution of Engineers. Someone who already has this experience will instantly get preference over someone like myself who hasn’t been successful obtaining this experience.

Now… 60 days in this case, is 60 8-hour days. So with the above kerfew in place, that pushes that well past 80 days. And I’ll be studying during this period too, so I won’t be able to travel out to Laidley every working day to get the experience.

Why did I go to an outfit that’s so far from home? Well, I had little choice. Outside of Campbell Scientific, and Powerlink, nobody else has been willing to talk to me. I’ve sent off numerous job applications, if they contact me at all, it’s an impersonal letter saying your offer was declined. No explaination why. And the job sites are pretty much barren with respect to job ads.

I realise the vast majority of job vacancies aren’t advertised… but what’s 70% of nothing? By my maths… nothing. It seems you have to know people… and in there lies a problem.

I feel like someone’s smashed both my legs, then told me to go take a hike. Yeah, very funny! If I was suicidal 6 months ago… you can imagine what my mental state is at the present time. Here’s hoping this is temporary turbulance, and things will settle. There is the possibility of getting paid work with this company in the future (presently it’s unpaid)… in which case, it’s “See ya later Brisbane… I’m moving out!”… yeah, I’m sick of this rat race and I want some peace and quiet!

I’ll be glad when this year’s over… then I can see where I’m at. Hopefully I’ll be done with uni… and it’ll be off to find work. Exactly where I do not know — my ideas of what to do have shifted quite a bit since I started. The engineering studies have been a valuable — I’ll see how it is after I’ve done some industrial experience. At the very least, I can say, I have tried.

All else fails… I might talk to the TAFE or something, see if I can fast track an electrical tradesmanship… as that’s most closely aligned to what I know, and there seems to be a lot of demand in that field at this time.

Time will tell… but for now, I just had to get the above behemoth off my chest.

Installing Gentoo/MIPS without a netboot image

Hi all…

In the absence of recent netboot images, you might find these notes useful.  These describe how to install Gentoo without the use of a netboot image, but rather, making your own, and using root-over-NFS.  This same guide can also be used to port Gentoo to other presently unsupported MIPS hardware.

What you need…

You’ll need about 200MB or so (the more the better) on the netboot server to house a root filesystem.  In addition to the tools mentioned in the handbook, you’ll also want nfs-utils installed to export the client’s root FS.

You’ll also want a cross-compiler.  You only need to be able to build a kernel — libc is not necessary.  To generate such a compiler, install the sys-devel/crossdev package, and run crossdev -t mips64-unknown-linux-gnu -S1 (or  mips64el for Cobalt/little endian targets).  If the build fails, try various versions of binutils and gcc, it may be a little tinkering to get a combo that works.

IP28 users will want to enable the ip28 USE-flag on in /etc/portage/package.keywords for the cross-mips64-unknown-linux-gnu/gcc package.

Unpacking and setting up the root fs…

Download the stage 3 tarball, and unpack that into a directory on your server.  Then, export it by editing /etc/exports, and adding a line like the following:

/unpacked/stage3/path    *(ro,sync)

Remember to reload your NFS server config by typing /etc/init.d/nfs reload.

Building the kernel…

Start by unpacking the kernel with appropriate USE flags set (USE=ip28 for IP28 users, USE=ip30 for Octane users, USE=cobalt for Cobalt users).  This is done with the following command (adjust if your PORTDIR is in a different place):

# USE=ip28 \
  ebuild /usr/portage/sys-kernel/mips-sources/mips-sources-VERSION.ebuild \
    unpack

If all goes well, you’ll have a copy of the patched kernel tree in /var/tmp/sys-kernel/mips-sources-VERSION/work/linux-VERSION.  Change to that directory, and configure the kernel as per the guide in the Gentoo/MIPS handbook, passing ARCH=mips CROSS_COMPILE=mips64-unknown-linux-gnu- (or mips64el…) to all make calls.  If you want to use the .config that comes with one of the old netboot images, you can use scripts/extract-ikconfig to extract it.

Remember to say Y to your network card driver, and these options:

  • Root-over-NFS support
  • NFS Client support
  • IP Level Autoconfiguration (DHCP)

Once you’ve compiled your kernel and have your vmlinux (or vmlinux.32) file, copy this file to your server’s /nfsroot (Cobalt hardware) or /tftproot (almost anything else) directory in place of the usual Gentoo netboot image.  For kernel modules, install them by typing make CROSS_COMPILE=”…” INSTALL_MOD_PATH=/unpacked/stage3/path modules_install.

You may also find it helpful to place a copy of the stage 3 tarball and kernel inside the NFS root area for convenient access on the final host.

Booting the system…

SGI Boxes:

Break into the command monitor prompt as per the handbook, and at the prompt, type the following (all on one line):

>> bootp(): root=/dev/nfs ip=dhcp 
            init=/bin/bash
            nfsroot=ip.of.root.server:/unpacked/stage3/path

Cobalt boxes:

This assumes you have one of my netboot images already unpacked in /nfsroot and that you’ve placed your freshly compiled kernel in /nfsroot as well.

Compress the kernel image using gzip -9, and rename it to kernel.gz (overwriting the existing file).  Then edit the default.colo file … the execute line should read (place this on one line):

execute root=/dev/nfs ip=dhcp init=/bin/bash
        nfsroot=ip.of.root.server:/unpacked/stage3/path

Netboot the Cobalt system in the usual way.

Lemote hardware:

Hit ESC a few times to break into the PMON2000 prompt… then type the following (each on one line):

PMON> ifaddr rtl0 lemote_box_ip_addr # (e.g. 10.0.0.8)
PMON> load tftp://tftp_server_ip_addr/kernel_name
PMON> g console=tty0 root=/dev/nfs ip=dhcp
      nfsroot=ip.of.root.server:/unpacked/stage3/path

In all cases, you should be at a prompt.  Proceed with the Gentoo/MIPS handbook instructions as per normal at this point. 🙂

Keeping things simple

I’ve been doing some thinking today.  I haven’t been in the amateur radio gig very long… I got my license in mid January, and I’ve been active mostly on the 2m and 70cm bands for the past few months.

The last month saw me acquire the parts needed for a HF station, and so lately I’ve also been poking around on 40m and 80m too.  I’ll admit I’m still very new to the scene, getting to know what bands are best in what conditions, and making a small number of contacts.

I’ve been very active lately on 70cm on the Mt. Coot-tha repeater, VK4RBC (438.525MHz), and have been on the odd occasion, tried making contact on various frequencies on HF.

At BARCfest this year, a number of commercial traders were present, showing off the latest and greatest from two of the big communications companies out there… ICom and Yaesu.  It was at BARCfest, that I picked up my current HF rig, a Kenwood TS-120S, and a few sellers had a number of older rigs on sale.

Now this particular rig is quite old… according to the eHam site, they are 1980s vintage, although the exact date my rig was manufactured is unclear.  As far as features, it’s basic… SSB and CW modes, coverage of 80m, 40m, 20m, 15m and 10m, and around 100W output.  For my needs, okay, the power output is overkill, but it’s sufficient.  In fact, the power output is good, as if there is an emergency, I have the extra power to make contact.

At BARCfest however, there were some of the very latest rigs on display.  There was one Yaesu base station monster being shown off by Kyle Communications, I can’t recall what model, but its (discounted!) price tag was around AU$8000.  This thing did just about everything except errect its own antenna and make you coffee.  SSTV, RTTY, Packet, DSP filtering, you name it, it had it.  Very impressive, but are all these gratuituous bells and whistles really needed?

One thing I like about the rig I have, is that the handbook includes full schematics of the transceiver circuitry, with explainations on how it works.  It’s all implemented using solid state components that are easily sourced.  In fact, the handbook has some hand-written notes suggesting that the thing has been serviced a couple of times before hand already.  Being basic in features, has enabled it to be serviced, and I suspect that I should have this rig for a very long time, as long as I can get replacement parts — I see no reason why it shouldn’t continue operating for years to come.

However, rigs like the one I described above, the average operator, I suspect, would be helpless to try and fix a complex beast like that.  There’s just so much that could go wrong, and loads of specialised components that are purpose built for it.  Sure, it might be off-the-shelf DSPs and microcontrollers in use… you might be able to buy replacements… but where do you go to get them reprogrammed so they perform the function for which they are intended?

Even my handheld, a Kenwood TH-F7E, is a rather complicated beast.  It has a small microcontroller in it, and a lot of integrated circuitry, that I couldn’t possibly fix if something went wrong.  I bought it because it had FM transmit capability on 2m and 70cm (the only two VHF/UHF bands I’m permitted on presently) and it could receive AM, {,W,N}FM, SSB and CW over a wide range from 100kHz through to about 1.3GHz.  Now okay, in order to minaturise the device, it was necessary for specialised components to be used here… that’s fair enough, but I can forget doing much in the ways of repairs.

I believe that base station rigs are getting overly complicated these days — we really need to get back to basics.  For someone like myself, I really only need a few basic features:

  • Coverage of all the analogue modes: CW, AM, FM and SSB
  • Reasonable output power
  • Good sensitivity/selectivity
  • Digital readout

All of this (except digital readout) can be implemented with analogue electronics.

Digital modes in my book are better implemented on a desktop PC.  Computers these days are quite capable of doing software DSP… I don’t see any reason why it is necessary for the transceiver to do all that.  A small microcontroller inside the rig to provide PC control, and memory banks, no worries… but that’s about as complicated as it needs to be in my opinion.

Heck, there’s no reason why some of this couldn’t be modular — that is, the rig works without the microcontroller.  The microcontroller would just be responsible for loading/storing VFO frequencies, and switching modes — if it’s absent, this just gets done manually by the user.  The controls on the front would just manipulate digital flip flops, that could also be driven by the microcontroller.

The upshot is, a rig like the above, could be made quite robust… and reasonably inexpensive.  Some of us don’t need the frills — or if they do, are sufficiently knowledgable enough to make them ourselves.  There are people who will demand very fancy rigs, and that’s fine… there’s plenty in the market now to cater for that group of operators, but for the rest of us, I think a lot could be gained from reducing the complexity in current transceivers.

Gentoo/MIPS 2008.0: Stages Uploaded

Hi all…

I’ve now uploaded the stages for Gentoo/MIPS 2008.0.  I’m hoping to get these pushed out to mirrors shortly, but in the meantime, you can find them on my devspace.  These stages need a fairly modern kernel, 2.6.19 or later, ideally  2.6.2x-series, otherwise you’ll strike issues with rm doing strange things (as people have reported already).  I have some kernel images for IP30, IP32, Loongson and Cobalt that should work with these stages.

These are only freshly compiled, and haven’t undergone much testing, so I’d appreciate it if some brave souls could give them a try and report back.  Stages are available for:

Enjoy. 🙂