Multi-boot for Beagleboard XM

At present I can arrange for the BEagleboard XM to boot into one of
three possibilities by creating a user script (user.scr) that tests
the 'user' button:

led all off
sleep 1
led 0 on
sleep 1
led 1 on
led 0 off
echo Press USER button to enter Angstrom GUI
sleep 3
mmc init
if userbutton; then echo Entering Angstrom GUI; setenv bootargs
'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw
roofstype=ext3 rootwait omapfb.mode=dvi:1280x1024MR-16@60'; setenv
bootcmd 'fatload mmc 0 0x80300000 uImage; bootm 0x80300000'; boot; fi
echo Entering RISC OS
fatload mmc 0 0x80100000 riscos
go 0x80100000

It looks horrible but allows three possible boots:
boot.scr - starts command line Linux if user button not pressed at all
user.scr (above) - starts Linux GUI if user button held throughout and
starts RISC OS if user button released after LEDs flash.

What I want to do is to allow multi-boot but without access to the
user button. My idea is to attach a simple circuit to the expansion
header - for example a DIL switch to select which mode to boot up in
presented as (e.g.) some flags at a memory address. Then have a
command as follows:
fatload mmc 0 0x801000000 codefile
go 0x801000000
fatload mmc 0 0x801000000 codefile2
go 0x801000000
(as many times as I need)

each code block will either execute itself or return (MOV PC,R14) to
execute the next code block depending on the flags it sees on the
expansion header plug.

I have assumed that the uboot script cannot interrogate the expansion
header in any way directly?

Clearly this question was in the 'too difficult' category. I'll break
it down into some simpler questions.