Leapster Explorer: UART Boot
This how-to will show you how to gain UART Boot access to your Explorer. This involves a hardware hack not for the faint of smd soldering skills, or eye sight. There is two connections that need to be made to some pads that are very very tiny, takes some soldering skills, so be prepared. Also being a hardware hack, there is there is a chance of breaking something important, be careful and be warned. In the second part it will take you through compiling Emerald Boot and sending it over UART to the LX for testing.
How tiny are the pads? Here is a comparison of a normal resistor vs the pads you will be soldering to.
Notice that the width of the pad is the same size as the stripe on the resistor. If you don't feel comfortable soldering something this small, this mod might not be good for you to attempt.
Linux with Python 2.5+ and PySerial installed
emerald-boot-supplement Includes binaries, source patch, and micromon
LF Linux Source Tested on LF-Linux-8291-20101026-1425.tar.gz
DJHI or similar cartridge for access to UART console
Soldering Iron (with very tiny tip)
Wire (very fine gauge)
2x 10K Ohm Resistor
2x Switch or jumper pins
Pictures SD and SD show the pads you will be working with. Take your 4 pieces of wire and strip a small amount of insulation off one end of each, and solder one to each pad shown, watch your heat and where the tip is, so as not to destroy the pad or unsolder the component next to it. A magnifier would be a good idea here. Then on one of the wires, of the two to be connected together, attach the resistor and on the other the switch, then solder the resistor to the switch. Add a dab of hot glue or some other means of strain relief, put back together and you are done. To test, hold down both buttons, while you turn on your Explorer, nothing should happen. Try it with out holding down the buttons, to verify your Explorer still works.
Technically this isn't a UART boot, what will be happening is, once Emerald Boot is compiled, the Micromon application will be used to load the bin file onto the LX in RAM, where Micromon will then execute the code and start Emerald Boot loading. The reason for this is Emerald Boot is too big to load over UART since it can range from 40 to 200+KB in size, and the Pollux SoC will start running the code sent to it over UART at 16KB.
This works with the RidgeRun toolchain and on the LF-Linux-8291-20101026-1425.tar.gz sources, it may work with others toolchains and source version, but is as of yet untested. It also requires that you have built the LF-Linux kernel, as Emerald Boot draws a few files from it.
Extract the emerald-boot-supplement archive. Make sure you have a clean copy of the emerald-boot/ directory in the LF-Source tree.
Copy screens/ to the packages/ directory in the source tree.
Copy host_tools/ to the root directory along side emerald-boot and packages. If you want you can make your own, just save them as png. Although they only get used when Emerald Boot is in USB boot mode.
Next apply the patch which makes the necessary modifications for UART booting, along with a few other mods to make things a bit more friendly. Inside the emerald-boot/ directory apply the patch.
$ patch -p1 < /path/to/emerald-boot-supplement.patch
To compile the bootloader run
$ OPTION=1 ./install.sh
Some OPTION values include MICRO_BOOT for UART enabling, SDCARD for booting a kernel off an SD card, and DEBUG which puts out some extra info in the console which is nice for bootloader testing.
example for UART booting and Debugging
$ MICRO_BOOT=1 DEBUG=1 ./install.sh
Once you have compiled a UART enabled Emerald Boot, copy the resulting emerald-boot_UART.bin file to the micromon directory in emerald-boot-supplement/. Set the jumpers or switches to enable UART boot on the Explorer and hook up a serial cable or usb adapter, then run this command while holding down the power button.
$ ./bootstrap.py emerald-boot_UART.bin 115200
You should see something like this
Opening serial port Setting local baudrate to 19200 Sending block 1 of 1 block(s) Sending block 31 of 31 block(s) Setting target baudrate to 115200 Setting local baudrate to 115200 Remote CRC32: 0xE514244C Local CRC32: 0xE514244C Sending block 335 of 410 block(s)
This uploads a small program, Micromon to the Explorer, which allows uploading a file much larger than the 16k bytes the Pollux SoC accepts for UART booting. If all goes well the Explorer should boot up as normal.
Flash to NOR
Once you've tested out your Emerald Boot by running a UART version, or have found a precompiled NOR version you want to permanently install on your Explorer, you need to flash it to the NOR memory.
Caution: This is a potentially harmful modification. Some precautions, make sure you have a known working copy of Emerald Boot for NOR and UART. If you compile you're own, make sure to test a UART version first. Before attempting this, make sure you have fresh batteries or AC adapter, and in worst case, will be able to make the hardware modifications necessary to UART boot if you have not already.
Copy emerald-boot_NOR.bin to /LF/Bulk then run these commands on the Explorers command line.
mfgmode.sh 9 > /dev/null flashcp -v /LF/Bulk/emerald-boot_NOR.bin /dev/mtd5 mfgmode.sh 0 > /dev/null
Then reboot your device, if all went well it should boot up fine. If there is an issue and it will not boot, make the necessary hardware modifications for UART boot if you have not. UART boot the device, and redo this process with a known working version of Emerald Boot.