DHCOM Update Mechanism: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
Line 44: | Line 44: | ||
== Commandline Mode == | == Commandline Mode == | ||
*Instruction: "'''update'''" | |||
*:The functionality tries to update the flash content via the [[#DHupdate.ini file|'''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. | |||
*Instruction: "'''update <command> [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 following <command> parameters are possible from command line: | |||
#:: | :::{| class="wikitable" | style="width: 50%; color: #000000; background: #f3f3f3;" valign="top" | | ||
|- | |||
| style="background: #076b8d;" | '''''command''''' | |||
| style="background: #076b8d;" | '''''description''''' | |||
|- | |||
|valign="top"| <tt>bootloader</tt> || update the bootloader | |||
: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. | |||
#:: | |- | ||
|| <tt>script</tt> || bootloader executes the provided bootloader script e.g. to customize bootloader environment variables | |||
|- | |||
|| <tt>eeprom</tt> || update the display timings stored in the display adapter EEPROM | |||
|- | |||
|| <tt>reset</tt> || reboot system after a successful update. A reset can only be the last item in a DHupdate.ini file. | |||
:Warning: risk of a infinite update loop. | |||
|- | |||
|} | |||
::The [filename] parameter could be used to specify a non default filename. The default filenames are: | |||
:::{| class="wikitable" | style="width: 20%; color: #000000; background: #f3f3f3;" valign="top" | | |||
|- | |||
| style="background: #076b8d;" | '''''command''''' | |||
| style="background: #076b8d;" | '''''default filename''''' | |||
|- | |||
|| <tt>bootloader</tt> || default file name is u-boot.imx | |||
|- | |||
|| <tt>script</tt> || default file name is script.bin | |||
|- | |||
|| <tt>eeprom</tt> || default file name is eeprom.bin | |||
|- | |||
|| <tt>reset</tt> || no file to specify | |||
|- | |||
|} | |||
= DHupdate.ini file = | = DHupdate.ini file = |
Revision as of 11:39, 17 July 2015
The DHCOM Update Mechanism for the i.MX6 Module can be used to flash a complete system image or to replace on some parts (e.g. linux kernel) of the system. It is not necessary to have a running os. The only requirement is a running bootloader.
Overview
The following updates and commands are supported by the mechanism:
command | description |
bootloader | update the bootloader |
script | bootloader executes the provided bootloader script e.g. to customize bootloader environment variables |
splash | write a new *.bmp to display a bootloader splashscreen |
settings | DHCOM bootloader settings |
copy | copy a file e. g. uLinuxEnv.txt into the boot partition |
linux | update the linux kernel binary e. g. zImage |
devicetree | update the devicetree blob |
rootfs | write a new rootfilesystem to the target |
finetuning | run a provided script to do some finetuning on our installation (warning: experts only) |
eeprom | update the display timings stored in the display adapter EEPROM |
reset | reboot system after a successful update (warning: risk of a infinite update loop) |
How does it work?
- The update mechanism has to be started with the bootloader command "update".
- The updates "bootloader", "script", and "eeprom" are processed by the bootloader. They can be started directly with "update <command> <imagefile>" for example "update bootloader u-boot_imx6dl-dhcom2_1G.imx"
- For the remaining updates you need a "update kernel". The "update kernel" is a file which contains the linux kernel binary (zImage), a busybox rootfilesystem with shell scripts (*.cpio), and a devicetree blob (*.dtb). This implies that the update kernel has to mach your board configuration like the bootloader, linux kernel, and devicetree concerning CPU Type, CPU Cores, RAM and NAND or eMMC memory.
- To control the processing of the updates you need to provide a "DHupdate.ini" file to the update kernel.
- For further Details see the following chapters.
Execution Modes
Automatic Mode
- To use the "automatic mode" the command "update auto" has to be called within the bootloader environment variable bootcmd. The functionality does search a DHupdate.ini file on the specified storage devices e. g. update devices. The update devices must be defined at the DHCOM settings block (Please have a look at DHCOM settings). The content of the DHupdate.ini file controls which updates have to be processed and which images have to be written to the storage device (eMMC or NAND) of the DHCOM computer on module system.
Commandline Mode
- 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.
- Instruction: "update <command> [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 following <command> parameters are possible from command line:
command description bootloader update the bootloader - 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.
script bootloader executes the provided bootloader script e.g. to customize bootloader environment variables eeprom update the display timings stored in the display adapter EEPROM reset reboot system after a successful update. A reset can only be the last item in a DHupdate.ini file. - Warning: risk of a infinite update loop.
- The [filename] parameter could be used to specify a non default filename. The default filenames are:
command default filename bootloader default file name is u-boot.imx script default file name is script.bin eeprom default file name is 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.
- The <type> parameter could be specified as follows:
- linux = Linux image update
- rootfs = Create or replace the linux root-filesystem which is stored in the 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 - bootloader = Bootloader update
- splash = Bootbitmap update
- settings = DHCOM 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.
- script = Run bootloader script file
- refresh = Refresh Display parameter before display update bitmaps.
- Note: 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. The bootloader loads the new settings and calls the update kernel with the new parameters. The update kernel displays the bitmaps which are specified in the
display
section. Example:
[update] settings 00_PV.bin refresh splash DH_800x480.bmp ... [end]
- The following updates are done by the bootloader:
- bootloader (only in case of command line update)
- eeprom
- script
- The following updates are done by the update kernel:
- For this updates u-boot loads a minimal linux kernel which does the work. We call this tiny kernel in the further description "Update Kernel". The update kernel is loaded via the env variable "load_update_kernel". These variable needs to be set before. This could be done with the update script functionality.
- Before the bootloader loads the update kernel the variables "dev" and "part" will be set with the current update medium. So this variable could be used in "load_update_kernel" as placeholder for loading the update kernel from the current update device.
- bootloader (only in case of DHupdate.ini File update)
- linux
- rootfs
- settings
- splash
- 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
- script = default file name script.bin
- For DHupdate.ini File Example, please have a look at the Please have a look at Download area iMX25 or Download area AM35x.
- Notes:
- 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.
.*If you use "refresh" command, please ensure that settings bin update is listed in DHupdate.ini file before "refresh" command.
- 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
- 7 LED blinking interval = Can't load update kernel