Difference between revisions of "Didj BootLoader Firmware Updating"

From eLinux.org
Jump to: navigation, search
m (Firmware Update: Fixed typo in folder name --~~~~)
(Hardware Needed: Added Didj device (mostly to have quick access to the main Didj page- is there a better way to do this?), link to UART info page. --~~~~)
Line 5: Line 5:
  
 
== Hardware Needed ==
 
== Hardware Needed ==
UART connection (except when using SCSI Commands)
+
* [[Didj]] handheld device
 +
* [[Didj Boot From UART | UART]] connection (except when using SCSI Commands or OpenDidjConnect)
  
 
== Files Needed ==
 
== Files Needed ==

Revision as of 15:52, 11 November 2010

This is a way to manually upgrade your firmware and bootloader.

Programs Needed

Terminal program, Hyperterminal or equivalent (except when using SCSI Commands)

Hardware Needed

  • Didj handheld device
  • UART connection (except when using SCSI Commands or OpenDidjConnect)

Files Needed

LFP packages DIDJ-0x000E0002-000001 (bootloader) and DIDJ-0x000E0003-000001 (firmware). Mostly just needed to reference what is expected to be found in the firmware and bootloader packages, or to just test it out the update process with known good files.

USB Connection

Firmware Update

This requires you create a folder with contents similar to the firmware-LF_LF1000 folder in the lfp packages, the folder name should start with "firmware-", or if you want it should work as an lfp extension zip archive. Place the folder or archive in the /Didj/Base directory, there might be one there already. This can be done over the USB connection.

In the terminal run the command 'fwcheck' it should return a result /Didj/Base/firmware-<your name> then run 'fwupdate /Didj/Base/firmware-LF_LF1000/ > /dev/console' it should have an output like this.

# fwupdate /Didj/Base/firmware-LF_LF1000/ > /dev/console
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

Bootloader Update

Bootloader is exactly the same as firmware, but the folder is named bootstrap-LF_LF1000, the name of the folder you put on the Didj must start with 'bootstrap-'. The only files that are needed are:

lightning-boot.bin
lightning-boot.md5

In the terminal run 'blcheck' and make sure it returns /Didj/Base/bootstrap-<your name> then run 'blupdate /Didj/Base/boostrap-<your name> > /dev/console' and it should return output like.

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

Force Update with Custom SCSI Commands

This update can be done with out a console connection, and mimics how LFConnect handles the task. They can be done at the same time.

Check out SCSI Commands for how to use SCSI Commands.

Mount the Didj usb storage

bootloader

For bootloader create a folder in /Didj/Base called bootstrap-LF_LF1000

It should have the same files as in LFP package DIDJ-0x000E0002-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.

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 bootstrap-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.


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.

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.

OpenDidjConnect

OpenDidjConnect Latest Version

For Windows

Download and extract the program, then cd to the directory you extracted it to. Plug your Didj USB in and turn it on. This works with out LFConnect being installed, so close it if it opened. Check under My Computer for which drive letter the Didj is, if LFConnect is installed or started up after plugging the Didj in, you may need to go in and assign it a drive letter Run OpenDidjConnect.exe -d <drive_letter> -c unlock you can run it with -h only for the help. On WinXP autoplay starts up, then it asks what to do, open the folder, and navigate to /Didj/Base. Place you folders in there, like in the above methods, then close out the explorer window. Now run the program again, OpenDidjConnect -d <drive_letter> -c eject if you are running batteries, run OpenDidjConnect -d <drive_letter> while the Didj is unlocked, and make sure your battery is not critically low, to prevent it dying in the middle of an update. Once you eject it, you should see the screen say, learning new tricks, before it says okay to disconnect. Unplug the usb and turn it back on to test you're work. If you get the learning new tricks screen, when ever you eject, when you haven't put a new firmware/bootloader on the usb drive, its because of version issues, so either change the version number or delete the files to prevent the constant reflashing of the new files.


For Linux

Extract the files in the archive, then open a terminal window and cd to the directory

you extracted the files to.

run gcc -o OpenDidjConnect OpenDidjConnect.c


Plug in your Didj to a usb port and turn it on. Run dmesg in a terminal, and look for the device, usually something like [25905.905635] sd 10:0:0:0: Attached scsi generic sg2 type 0 which would make the device /dev/sg2 that will be used as the <device> in the command line options. In Ubuntu 9.10 the Didj mounts and opens a folder window of is contents, navigate to /Didj/Base. Place you firmware/lightning folders in there, like in the above methods, then close out the folder window. Now run the program again, OpenDidjConnect -d <device> -c eject if you are running batteries, run OpenDidjConnect -d <device> while the Didj is unlocked, and make sure your battery is not critically low, to prevent it dying in the middle of an update. Once you eject it, you should see the screen say, learning new tricks, before it says okay to disconnect. Unplug the usb and turn it back on to test you're work. If you get the learning new tricks screen, when ever you eject, when you haven't put a new firmware/bootloader on the usb drive, its because of version issues, so either change the version number or delete the files to prevent the constant reflashing of the new files.

Caution

It is possible to cause a major malfunction with your Didj replacing these files, I recommend you know for sure they are working first, also double check your SCSI commands and which device they are being sent to, if you use them.