Table of Contents

Autoupdate module description

Autoupdate module is for organization of firmware version automatic and handle updating via HTTP from URL.

By default autoupdate module works from manufacturer URL if the variable autoupdateURL is not specified!!!

Example of the variable:

autoupdateURL=http://example.com/update_list.txt

autoupdateURL - URL which should contain update_list.txt file

Stages of update process

  1. Verification environment variable autoupdate_cond, status «0» - autoupdate option, «1» - update with confirmation, «2» - autoupdate is disabled. If the variable is «0» or «1» than the necessaty of update initialized.
  2. File reading which contain the list of all available updates which are sorted by date from old to new (the last/new record in the end).
  3. Date comparing from the new/last record with image making date which is specified by stb.RDir(«ImageDate») function and returns environment variable Image_Date. In case if image making date is newest - autoupdate doesn't initialized.
  4. If the date in file update list is newest than the date of image making date in STB than - additive date checking initialized according to the image making date according to the URL which is pointed in update text file.
  5. If the additive update shows that update date is newest than current - checking of image type initialized. Autoupdate to alpha version doesn't initialized. Autoupdate to beta version initialized in case if the option in “Settings” is enabled. This option set the environment variable «betaupdate_cond». Status «1» - «update», «0» - «don't update». By default the satus is set to «don't update».
  6. If the version «release» or «beta» and set option «update on beta versions» & the date is newest then image making date of current, then autoupdate initialized.

Syntax of update_list.txt file, example:

[
{"name":"0.2.14-r3", "url":"http://example.com/250/imageupdate214r3", "type":"release", "date":"26 Nov 2012 23:22:19 GMT+0200", "descr":"Release"},
{"name":"0.2.14-r7", "url":"http://example.com/250/imageupdate214r7", "type":"release", "date":"30 Nov 2012 14:43:29 GMT+0200", "descr":"Release"}
]

where:

Disabling of Autoupdate module and control elements in user interface

services.html

/home/web/services.html

<tr>
    <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td>
    <td class="t18w" id="autoUpdateInputHolder"></td>
</tr>
<tr>
    <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td>
    <td class="t18w" id="alphaUpdateInputHolder"></td>
</tr>

Should be:

<tr style="display:none;">
    <td class="t20w pad10r tabs_center_title" id="autoUpdateHolder" align="right"></td>
    <td class="t18w" id="autoUpdateInputHolder"></td>
</tr>
<tr style="display:none;">
    <td class="t20w pad10r tabs_center_title" id="alphaUpdateHolder" align="right"></td>
    <td class="t18w" id="alphaUpdateInputHolder"></td>
</tr>

vars.js

/home/web/vars.js

settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())?
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"],
  ["update_button","update_button_s"]
 ]
]:
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["autoupdateSel"],["alphaupdateSel"],
  ["timeShiftSettings"],["update_button","update_button_s"]
 ],
 [
  ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"]
 ]
],

Should be: remove - autoupdateSel, alphaupdateSel, update_button

settings_objArr = new RegExp("MAG200").test(gSTB.GetDeviceModelExt())?
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["update_button_s"]
 ]
]:
[
 [
  ["languageAudiotrack"],["languageSubtitle"],["frontPanelSel"],["screenClockSel"],
  ["ssdelay_select"],["videoClockSel"],["timeShiftSettings"],["update_button_s"]
 ],
 [
  ["tsOn"],["tsIco"],["tsPath"],["tsTime"],["tsEndType"],["tsExitType"],["tsLag"],["tsBack"]
 ]
],

Set the variables

Making the image in env.txt

Example env.txt:

autoupdate_cond=2
betaupdate_cond=0