Environment for running local DHCOM Update

From Wiki-DB
Revision as of 15:28, 25 January 2021 by Pzimmermann (talk | contribs) (First part of the site)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

If you want to make a update of your DHSOM system, without using an USB-stick or a SD-card, it is possible to alter the environment of U-Boot to start a local version of the DHCOM Update Mechanism.

Requirements

The DHSOM system requires the following things:

  • A spare partition on the eMMC (NAND-flash is usually too small) where the components of the update are stored.
  • U-Boot must be built with the setexpr-command included (This command is used for arithmetic expressions).
  • The Linux on the DHSOM-System needs the fw-tools for accessing the bootloader environment.

Setting up the Environment

Use the following commands as root (or prepend them with sudo) to set up the bootloader environment. If you are in the U-Boot console, you have to use setenv instead and after the last command you have to use saveenv to save the changed environment.

fw_setenv local_update false fw_setenv local_update_tries 0 fw_setenv local_update_max_tries 3 fw_setenv check_if_local_update 'if test "${local_update}" = "true" -a ${local_update_tries} -lt ${local_update_max_tries} ; then run do_local_update; fi' fw_setenv do_local_update 'setexpr local_update_tries ${local_update_tries} + 1; saveenv; load ${src_intf} ${src_dev_part} ${loadaddr} zImage_${dhcom}.update; run setupdateargs; bootz ${loadaddr}' fw_setenv bootcmd 'update auto; run check_if_local_update; mmc dev ${mmcdev}; if mmc rescan; then run bootlinux; else echo Boot failed, because mmc${mmcdev} not found!;fi;