Didj Emerald Boot
This page describes out to apply a source code patch and installation of Emerald Boot, the Leapster Explorer boot program, to run from NAND on the Didj device. This will allow you to USB Boot a Surgeon firmware, for updating to the newer Kernel and RootFS firmware.
There is a possibility of bricking your Didj doing this, as it will be flashing a new bootloader, if anything goes wrong, this will leave you unable to boot the device. It is possible to save it with an SD capable Cartridge using uboot. You've been warned.
It will also require a new Kernel and RootFS specific to this build.
Compile Emerald Boot
Extract the contents of the Patch and Source Code archives. Move inside the source folder, you should see emerald-boot, linux-2.6, etc. Copy packages/ from the patch archive to the source folder, along with host_tools/. If you get complaints during the build about not finding images, it is more than likely because of these two folders. Test the patch.
$ patch --dry-run -p1 < path/to/emerald-boot-supplement_v2.2.2.patch
If everything goes okay, apply it
$ patch -p1 < path/to/emerald-boot-supplement_v2.2.2.patch
You can now build it. Make sure your environment variables are set up, per the build environment tutorial, and compile
$ DIDJ=1 ./install.sh
This will build Emerald Boot for the Didj, if you would like to test it using UART and micromon add MICRO=1 to the command line.
You will find it created a file, either in emerald-boot/ or <sources>/target/tftp called emerald-boot_DIDJ.bin. This is the file we will be placing on the Didj.
You will be mounting your Didj as a USB drive, and replacing the /Base/bin/AppManager binary with a shell script, and adding emerald-boot_DIDJ.bin in the same folder.
First you'll need to create the shell script, AppManager. Make sure you don't give it the extension .sh. There are two things to configure in this script. Both are on the line starting with mtd_debug. First is 0x48001, this is the filesize in hex format. Make sure you change this if it differs for your emerald-boot_DIDJ.bin file. Also, insure the path name is correct, it should be the full path to your emerald boot file. Which on the Device is /Didj/Base/bin/<filename> Don't forget the Didj/ part.
#!/bin/sh set -e set -x echo "Flash EB" flash_eraseall /dev/mtd0 flash_eraseall /dev/mtd1 mtd_debug write /dev/mtd0 0x0 0x48001 /Didj/Base/bin/emerald-boot_DIDJ.bin echo "Flash EB Done" exit 0
Copy your AppManager script to /Base/bin, which you'll find when you mount the Didj as USB storage. This will replace a file called AppManager already in the folder. You can back that file up if you want, but after running the script it won't be needed.
With both files in place, eject the Didj, and unplug the USB cord. This is your last chance, if it is booted with the USB plugged in the script will not run, once it boots, it will start flashing the NAND. This is the part where it could brick if the script is wrong, or something else fails like loosing power. Double check everything!
Now boot up the Didj normally. It should go into its normal routine but before the user interface comes up, it will reboot. Restart the Didj, and you should see the Emerald Boot screen now appearing.
OpenLFConnect can be used for this process also, as it includes a command that moves the files and creates the script necessary. It creates the path name and file size in the script, and also double checks you compiled a DIDJ version of the patched emerald-boot.
Plug in the USB and power on your Didj and open OpenLFConnect
$ didj_mount $ didj_update_eb path/to/emerald-boot_DIDJ.bin
The Didj will then power down. Unplug the USB and power it back up. It will again shut itself down. Turn it on again and the emerald boot screen should appear. Emerald-boot will panic since there is no kernel for it to find on the NAND. You can boot a surgeon.cbf file from here if you like
$ boot_surgeon path/to/surgeon.cbf
If you have console access you can use it to configure networking, or you can compile your own surgeon with changed networking, as the Explorer and LeapPad surgeon networkings depend on a serial number that is not on the Didj.