Difference between revisions of "Didj BootLoader Firmware Updating"

From eLinux.org
Jump to: navigation, search
(Created page with 'This is a method that should work with nothing more than USB connectivity to update the Didj's Bootloader and Firmware. When starting up the Didj looks for new firmware and bootl…')
 
Line 1: Line 1:
This is a method that should work with nothing more than USB connectivity to update the Didj's Bootloader and Firmware. When starting up the Didj looks for new firmware and bootloader versions, by checking the Didj folder, which is accessible by USB. I haven't tested this method, but it is straight from the Didj source, so it should work.
+
This is a way to manually upgrade your firmware and bootloader.
 +
 
 +
== Programs Needed ==
 +
Terminal program, Hyperterminal or equivalent
 +
 
 +
== Hardware Needed ==
 +
UART connection
 +
 
 +
USB Connection
  
 
== Firmware Update ==
 
== 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 "firmeware-", 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.
  
When the script /usr/bin/launch_main runs, it runs the fwcheck command, which checks for new firmware that has been uploaded to the Didj by either of these means. (from the fwcheck help)
+
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.
 
 
1) If a directory named firmware-* exists in the DEVICE_ROOT (i.e., /Didj) and contains any files other than the meta.inf file. If multiple firmware-* directories exist, the one with the latest version is installed.
 
  
2) If a package named firmware-*.lfp exists in the default DEVICE_ROOT (i.e.,/Didj) whose version is different than the current firmware version. If multiple such packages exist, the one with the greatest version is installed.
+
# 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 ==  
 
== Bootloader ==  
  
for the bootloader (from the bwcheck help)
+
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-'. 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.
  
1) An unpacked .lfp package is found in /Didj/Base/bootstrap-*/ that contains the bootloader image lightning-boot.bin whose md5 sum differs from that of the installed bootloader.
+
# 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.
  
2) A package named bootstrap-*.lfp exists in the default DEVICE_ROOT (i.e., /Didj) whose lightning-boot.bin has a different md5 sum than that of the currently installed bootloader.
 
  
if any of these are true, launch_main sets new_state FIRMWARE_UPDATE_STATE, launch_main is the "state machine" it looks to loop thru all the possibilities until it either launches AppManager, or shuts down. There is also bwcheck-cart and fwcheck-cart, which check for bootloader and firmware updates from the cartridges.
+
== ToDo ==
 +
fwupdate and blupdate will run automatically if fwcheck and blcheck return results when the Didj boots up, but only if the Didj's state is set to FIRMWARE_UPDATE_STATE. I'd like to figure out how to set this, so that the terminal connection will not be needed. It looks as if LFConnect sets the DOWNLOAD_IN_PROGRESS_STATE while updating the Didj, when it then runs the fwcheck and blchecks. Perhaps a custom scsi command is needed.
  
 
== Caution ==
 
== Caution ==
 
It is possible to brick your Didj messing with these files, I recommend you know what you are doing, before replacing these files.
 
It is possible to brick your Didj messing with these files, I recommend you know what you are doing, before replacing these files.

Revision as of 01:42, 14 March 2010

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

Programs Needed

Terminal program, Hyperterminal or equivalent

Hardware Needed

UART connection

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 "firmeware-", 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

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


ToDo

fwupdate and blupdate will run automatically if fwcheck and blcheck return results when the Didj boots up, but only if the Didj's state is set to FIRMWARE_UPDATE_STATE. I'd like to figure out how to set this, so that the terminal connection will not be needed. It looks as if LFConnect sets the DOWNLOAD_IN_PROGRESS_STATE while updating the Didj, when it then runs the fwcheck and blchecks. Perhaps a custom scsi command is needed.

Caution

It is possible to brick your Didj messing with these files, I recommend you know what you are doing, before replacing these files.