Didj BootLoader Firmware Updating

Summary
There are several ways to commit your firmware, or bootloader to NAND. These methods can update your Didj with a fresh firmware, or a modified one with proper packaging.

 Caution  Make sure your batteries are charged, or you have an A/C adapter. Also that you understand, there is a certain level of risk making these modifications. Make sure you read through it first, and understand what is being done, before proceeding. Its best to first test these methods with a known working firmware or bootloader. And reading through U-Boot NAND Flashing to make sure you can recover if things go wrong.

Prerequisites

 * Didj USB Mount
 * Extract lfp Archives

Programs Needed
Terminal program: Hyperterminal or equivalent

Hardware Needed

 * Didj handheld device
 * Console Access

Files Needed

 * DIDJ-0x000E0002-000001.lfp (bootloader)
 * DIDJ-0x000E0003-000001.lfp (firmware)

Using Built in Tools
This method will use a few built in programs that come with the Didj for updating the firmware and bootloader. You will need to copy, or create a folder, and certain files in it for this to work It is easiest to extract the folder from the lfp archives and modify it as needed.

 Firmware 

For firmware this method will install into the opposite partitions, than the one you are on, so if you are on RFS0, the update will be installed to RFS1. And the Didj will be configured to boot from that one.

The firmware folder should be named firmware-LF_LF1000.

Mount your Didj and copy you're prepared folder to the /Didj/Base directory on your Didj.

After loading your folder onto the Didj, its best to run the check program, to make sure it can find it.

 On Didj  /Didj/Base/firmware-LF_LF1000 This should return the path to your folder, indicating it was found.
 * 1) fwcheck

Now you can run the actual update program: Found /Didj/Base/firmware-LF_LF1000/ Package Integrity Test Passed Installing kernel.bin in Kernel1 (mtd5) Kernel install successful. Installing erootfs.jffs2 in Linux_RFS1 (mtd6) Rootfs install successful. Switching from RFS0 to RFS1
 * 1) fwupdate /Didj/Base/firmware-LF_LF1000/ > /dev/console

 Bootloader 

The folder must be prefixed with 'bootstrap-' (ex. bootstrap-LF1000).

The only files that are needed are: lightning-boot.bin lightning-boot.md5

Check that the updater can find your folder.

 On Didj 

/Didj/Base/bootstrap-LF_LF1000
 * 1) blcheck

Then run: Found /Didj/Base/bootstrap-LF_LF1000/ Package Integrity Test Passed Installing lightning-boot.bin in LF1000_uniboot (mtd0) Bootloader install successful.
 * 1) blupdate /Didj/Base/boostrap-LF_LF1000 > /dev/console

Manually
This method is for the advanced user. You must understand the partition layouts. Copy your file to /Didj/Base and run the following commands: flash_eraseall /dev/mtd0 nandwrite -p /dev/mtd0 /Didj/Base/lightning-boot.bin

Force Update with Custom SCSI Commands
This update can be done with out a console connection, and mimics how LFConnect handles the task. Both updates can be done at the same time. This is exactly like With Built in Tools except we trigger the Didj to run those commands for us, by giving our package a higher version number and telling the Didj to eject. This is nice if you do not have console access to the device.

There are two ways to do trigger the update with the eject command.
 * SCSI Commands for how to use SCSI Commands.
 * OpenDidjConnect and installation.

If you want to do both at the same time, load both folders into /Didj/Base then run the command to eject.

 Bootloader 

For bootloader create a folder in /Didj/Base called prefixed with 'bootstrap-' (ex. bootstrap-LF_LF1000)

It should have the same files as the lfp package.

Make sure meta.inf has a version number higher than Version="1.35.2.4222" or if you've changed the version number in your file system, higher than that one.

 Firmware 

For the firmware create a folder in /Didj/Base called firmware-LF_LF1000

It should have the same files as in LFP package DIDJ-0x000E0003-000001

Make sure meta.inf has a version number higher than Version="1.35.2.4222" or if you've changed the version number in your file system, higher than that one.

 Trigger Update With SCSI Commands

Then run the SCSI Command C6 "Disconnect Ok", which will cause it to say its "Learning New Tricks" before saying its okay to disconnect your Didj.

Then turn the Didj off.

This processes causes the Didj state machine to look for a folder called firmware-LF_LF1000, if its a newer version, which is found in meta.inf and compared to /etc/version on the Didj, it will update the files with the new ones.

Trigger Update With OpenDidjConnect 

This is a program that does the SCSI Commands for you. You just need to give it the action desired, and the drive letter (Windows) or device (Linux).

Mount your Didj and Assign it a Driver Letter if in Windows. Else use dmesg in Linux to find the /dev/? it is.

Prepare your firmware or bootloader folder, just like the  SCSI Commands  section. But instead of running those commands, use OpenDidjConnect instead.

 On Host 

$ OpenDidjConnect -d  -c eject

Which will cause it to say its "Learning New Tricks" before saying its okay to disconnect your Didj.

Then turn the Didj off.

This processes causes the Didj state machine to look for a folder called firmware-LF_LF1000, if its a newer version, which is found in meta.inf and compared to /etc/version on the Didj, it will update the files with the new ones.