DHCOM Flash Update: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Lzenz (talk | contribs)
No edit summary
Lzenz (talk | contribs)
 
(24 intermediate revisions by 2 users not shown)
Line 3: Line 3:
# Splashimage
# Splashimage
# Settings  
# Settings  
# Linux image
# Linux kernel
# Linux rootfilesystem
# WinCE image
# WinCE image
# Display adaptor EEPROM


= Overview =
If you are working with DHCOM AM335x or DHCOM i.MX6 please have a look at [[DHCOM_Update_Mechanism|DHCOM Update Mechanism]].
:[[Image:Flash Update Overview.png|1020px]]
 
= User Manual =
== Step by Step ==
If you received an ''Update Image'' follow these steps to flash it to your target:
[[File:Update_stick_v1.PNG|thumb|right|200px|Files on the update media]]
# untar or unzip (or just copy if not bundled and/or compressed) the ''Update Image'' to the root directory of a usb stick
#* see picture on the right for an example how your update media should look after this step
# plug your usb stick into the USB Host port of the target
# switch on the power supply
# wait until the update has completed
#* progress can be followed at serial console
#* or on the LCD Display (if you have any)
# switch off the power supply
# remove the usb stick
# done
 
== Pitfalls ==
# Bootloader U-Boot does not recognice all types of usb sticks. FAT32 und MSDOS master boot record is required.
# ''Update Image'' is written to a subdirectory on the usb stick. This is not supported.


= Modes =
= Modes =
== Automatically Update ==
== Automatic Mode ==
:(Supported from U-Boot v1.10.0.0 or higher)
:Is called after the start of the bootloader if the environment variable '''bootcmd''' contains '''update auto'''. The functionality tries to update the flash content '''via the DHupdate.ini file''' (Please have a look at [[DHCOM Flash Update#DHupdate.ini file|DHupdate.ini file]]). The update mechanism is searching for the update files on the specified storage devices. The update devices must be defined at the settings block (Please have a look at [[DHCOM Settings|DHCOM settings]]). With the DHupdate.ini file you have the possibility to run more then one updates, e.g. OS image and settings block.
:Is called after the start of the bootloader. The functionality tries to update the flash content '''via the DHupdate.ini file''' (Please have a look at [[COM iMX25 Bootloader U-Boot#DHupdate.ini file|DHupdate.ini file]]). The update mechanism is searching for the update files on the specified storage devices. The update devices must be defined at the settings block (Please have a look at [[COM iMX25 Bootloader U-Boot#DHCOM settings|DHCOM settings]]). With the DHupdate.ini file you have the possibility to run more then one updates, e.g. OS image and settings block.


== Command line Update ==
== Commandline Mode ==
#Instruction: "update"  
#Instruction: "update"  
#:(Supported from U-Boot v1.10.0.0 or higher)
#:The functionality tries to update the flash content '''via the DHupdate.ini file'''. In contrast to Automatically Update (which you can start with '''update auto''') the update mechanism is searching on every available storage device for the update files.
#:The functionality tries to update the flash content '''via the DHupdate.ini file'''. In contrast to Automatically Update the update mechanism is searching on every available storage device for the update files.
#Instruction: "update <type> [filename]"  
#Instruction: "update <type> [filename]"
#:(Supported from U-Boot v1.5.0.0 or higher)
#:The functionality '''doesn't use the DHupdate.ini file'''. It allows only one update and the update mechanism is searching on every available storage device for the update files. With the <type> parameter you have to specify the update type.  
#:The functionality '''doesn't use the DHupdate.ini file'''. It allows only one update and the update mechanism is searching on every available storage device for the update files. With the <type> parameter you have to specify the update type.  
#:The <type> parameter could be specified as follows:
#:The <type> parameter could be specified as follows:
#::* wince = WinCE image update + ENV update
#::* wince = WinCE image update + ENV update
#::* linux = Linux image update + ENV update  
#::* linux = Linux image update + ENV update  
#:::Note: If you run linux update, u-boot searches also for an update ENV script. This script modifies the ENV for Linux. The name of the script must be the image name with the ending .env. You can also run an update without an script file. In this case u-boot only updates the image and the ENV remains unchanged.  
#:::Note: If you run <code>update linux</code>, u-boot is searching for an update ENV script too. This script modifies the u-boot environment for Linux. The name of the script has to be the same as the kernel-image-name with the additional ending .env. You can also run an update without a script file. In this case u-boot only updates the kernel-image and the ENV remains unchanged. It is possible to update only the environment of u-boot without a kernel update by inserting the filename of the ENV script too.
#::* rootfs = Create or replace the linux root-filesystem which is stored in the NAND-Flash. The rootfs update has to be the last item (or second to last item if you insert the <code>reset</code> command) in the DHupdate.ini file. For further Details: [[DHCOM Update: Linux Root Filesystem|DHCOM Update: Linux Root Filesystem]]
#::: Note: To run a ''"NAND-Flash root-filesystem update"'' you need a special linux-kernel which must have the filename ''"uImage.update"''. This kernel must be available in the same diretory on your update-media as the DHupdate.ini file. Depending on your setup you have to update the u-boot environment too.
#::* bootloader = Bootloader update
#::* bootloader = Bootloader update
#:::Note: The ENV in Flash memory is created on the first start of u-boot. If you run a bootloader update and the ENV at the new bootloader has changed, the ENV in Flash memory remains unchanged with the bootloader update. But you could delete the ENV block in flash memory before the update, then u-boot will create the new default ENV at the next start after the bootloader update.
#:::Note: The ENV in Flash memory is created on the first start of u-boot. If you run a bootloader update and the ENV at the new bootloader has changed, the ENV in Flash memory remains unchanged with the bootloader update. But you could delete the ENV block in flash memory before the update, then u-boot will create the new default ENV at the next start after the bootloader update.
#::* splash = Bootbitmap update
#::* splash = Bootbitmap update
#::* settings = Settings block update
#::* settings = Settings block update
#:::Note: Please have a look at [[COM iMX25 Bootloader U-Boot#DHCOM settings|DHCOM settings]].
#::: Note: Please have a look at [[COM iMX25 Bootloader U-Boot#DHCOM settings|DHCOM settings]].
#::* eeprom = Display adaptor EEPROM update with DH settings
#::* reset = Execute a reset after a successfull update. A reset can only be the last item in a DHupdate.ini file.
#::: Note:  Be careful with the reset command. You can easily build a endless update loop by mistake.
#:The [filename] parameter could be used to specify a non default filename. The default filenames are:
#:The [filename] parameter could be used to specify a non default filename. The default filenames are:
#::* wince = default file names nk.gz or nk.bin
#::* wince = default file names nk.gz or nk.bin
#::* linux = default file name uImage + default script file name uImage.env
#::* linux = default file name uImage + default script file name uImage.env
#::* rootfs = default file name fsroot.tar.gz
#::* bootloader = default file name u-boot.bin
#::* bootloader = default file name u-boot.bin
#::* splash = default file name splash.bmp
#::* splash = default file name splash.bmp
#::* settings = default file name settings.bin
#::* settings = default file name settings.bin
#::* eeprom = default file name eeprom.bin
#::* reset = no file to specify


= DHupdate.ini file =
= DHupdate.ini file =
Line 43: Line 68:




:For DHupdate.ini File Example, please have a look at the Please have a look at [[COM iMX25 Bootloader U-Boot#Downloads|Download area]].
:For DHupdate.ini File Example, please have a look at the Please have a look at [[COM iMX25 Bootloader U-Boot#Downloads|Download area iMX25]] or [[COM AM35 Bootloader U-Boot#Downloads|Download area AM35x]].
:'''Notes:'''
:'''Notes:'''
:*If you update the [[COM iMX25 Bootloader U-Boot#DHCOM settings|DHCOM settings]], it is possible to use the new settings for the update progress notifications on the display, by inserting the "refresh" command to the [update] section. Example:
:*If you update the [[DHCOM Settings|DHCOM settings]], it is possible to use the new settings for the update progress notifications on the display, by inserting the "refresh" command to the [update] section. Example:
  [update]
  [update]
  settings 00_PV.bin
  settings 00_PV.bin
Line 54: Line 79:


:*It is necessary to use UNIX End Of Line conversion!!!
:*It is necessary to use UNIX End Of Line conversion!!!
:*The order of the bitmap-filenames in the section <code>display</code> tells the system when to display which bitmap.


:'''Update progress LED description''':  
:'''Update progress LED description''':  
Line 64: Line 90:
::5 LED blinking interval = Specified file not valid (e.g. linux *.env file)
::5 LED blinking interval = Specified file not valid (e.g. linux *.env file)
::6 LED blinking interval = Image file size is to large
::6 LED blinking interval = Image file size is to large
= Overview - Flow Chart =
:[[Image:Flash Update Overview.png|1020px]]

Latest revision as of 10:24, 21 August 2017

The following updates are possible with the Bootloader:

  1. Bootloader
  2. Splashimage
  3. Settings
  4. Linux kernel
  5. Linux rootfilesystem
  6. WinCE image
  7. Display adaptor EEPROM

If you are working with DHCOM AM335x or DHCOM i.MX6 please have a look at DHCOM Update Mechanism.

User Manual

Step by Step

If you received an Update Image follow these steps to flash it to your target:

Files on the update media
  1. untar or unzip (or just copy if not bundled and/or compressed) the Update Image to the root directory of a usb stick
    • see picture on the right for an example how your update media should look after this step
  2. plug your usb stick into the USB Host port of the target
  3. switch on the power supply
  4. wait until the update has completed
    • progress can be followed at serial console
    • or on the LCD Display (if you have any)
  5. switch off the power supply
  6. remove the usb stick
  7. done

Pitfalls

  1. Bootloader U-Boot does not recognice all types of usb sticks. FAT32 und MSDOS master boot record is required.
  2. Update Image is written to a subdirectory on the usb stick. This is not supported.

Modes

Automatic Mode

Is called after the start of the bootloader if the environment variable bootcmd contains update auto. The functionality tries to update the flash content via the DHupdate.ini file (Please have a look at DHupdate.ini file). The update mechanism is searching for the update files on the specified storage devices. The update devices must be defined at the settings block (Please have a look at DHCOM settings). With the DHupdate.ini file you have the possibility to run more then one updates, e.g. OS image and settings block.

Commandline Mode

  1. Instruction: "update"
    The functionality tries to update the flash content via the DHupdate.ini file. In contrast to Automatically Update (which you can start with update auto) the update mechanism is searching on every available storage device for the update files.
  2. Instruction: "update <type> [filename]"
    The functionality doesn't use the DHupdate.ini file. It allows only one update and the update mechanism is searching on every available storage device for the update files. With the <type> parameter you have to specify the update type.
    The <type> parameter could be specified as follows:
    • wince = WinCE image update + ENV update
    • linux = Linux image update + ENV update
    Note: If you run update linux, u-boot is searching for an update ENV script too. This script modifies the u-boot environment for Linux. The name of the script has to be the same as the kernel-image-name with the additional ending .env. You can also run an update without a script file. In this case u-boot only updates the kernel-image and the ENV remains unchanged. It is possible to update only the environment of u-boot without a kernel update by inserting the filename of the ENV script too.
    • rootfs = Create or replace the linux root-filesystem which is stored in the NAND-Flash. The rootfs update has to be the last item (or second to last item if you insert the reset command) in the DHupdate.ini file. For further Details: DHCOM Update: Linux Root Filesystem
    Note: To run a "NAND-Flash root-filesystem update" you need a special linux-kernel which must have the filename "uImage.update". This kernel must be available in the same diretory on your update-media as the DHupdate.ini file. Depending on your setup you have to update the u-boot environment too.
    • bootloader = Bootloader update
    Note: The ENV in Flash memory is created on the first start of u-boot. If you run a bootloader update and the ENV at the new bootloader has changed, the ENV in Flash memory remains unchanged with the bootloader update. But you could delete the ENV block in flash memory before the update, then u-boot will create the new default ENV at the next start after the bootloader update.
    • splash = Bootbitmap update
    • settings = Settings block update
    Note: Please have a look at DHCOM settings.
    • eeprom = Display adaptor EEPROM update with DH settings
    • reset = Execute a reset after a successfull update. A reset can only be the last item in a DHupdate.ini file.
    Note: Be careful with the reset command. You can easily build a endless update loop by mistake.
    The [filename] parameter could be used to specify a non default filename. The default filenames are:
    • wince = default file names nk.gz or nk.bin
    • linux = default file name uImage + default script file name uImage.env
    • rootfs = default file name fsroot.tar.gz
    • bootloader = default file name u-boot.bin
    • splash = default file name splash.bmp
    • settings = default file name settings.bin
    • eeprom = default file name eeprom.bin
    • reset = no file to specify

DHupdate.ini file

The DHupdate.ini file is a text file, which describes the user specified update mechanism.


For DHupdate.ini File Example, please have a look at the Please have a look at Download area iMX25 or Download area AM35x.
Notes:
  • If you update the DHCOM settings, it is possible to use the new settings for the update progress notifications on the display, by inserting the "refresh" command to the [update] section. Example:
[update]
settings 00_PV.bin
refresh
splash DH_800x480.bmp
...
[end]
  • It is necessary to use UNIX End Of Line conversion!!!
  • The order of the bitmap-filenames in the section display tells the system when to display which bitmap.
Update progress LED description:
The LED GPIO is activated as soon as update has started. This takes roughly 6 - 8 seconds. If the update was finished without an error, the LED GPIO is deactivated. If an error occurs during the update the LED GPIO begins blinking.
LED error code:
1 LED blinking interval = DHupdate.ini File error (Wrong file content or no valid file found)
2 LED blinking interval = Necessary File for Update not found
3 LED blinking interval = Flash write or erase error
4 LED blinking interval = Wrong OS Image type (e.g. no WinCE *.gz or *.bin file)
5 LED blinking interval = Specified file not valid (e.g. linux *.env file)
6 LED blinking interval = Image file size is to large

Overview - Flow Chart