{
 "flash" :  {
  "commands" : [
   {
    "description" : "Init",
    "duration" : 42000,
    "restrict" : null,
    "source" : "${helperFile}",
    "tool" : "notifier"
   },
   {
    "description" : "Waiting for device",
    "restrict" : null,
    "state" : "dnx_fw",
    "timeout" : 42000,
    "tool" : "waitForDevice"
   },
   {
    "description" : "Notify",
    "duration" : 5000,
    "restrict" : null,
    "source" : "Edison board plugged",
    "tool" : "notifier"
   },
   {
    "description" : "flash fw",
    "gpflag" : "${gpflag}",
    "ifwi" : "${ifwi_file}",
    "ifwi_dnx" : "${fw_dnx_file}",
    "os" : "${os_file}",
    "os_dnx" : "${os_dnx_file}",
    "restrict" : null,
    "tool" : "xfstkDownloader"
   },
   {
    "description" : "Sleep",
    "duration" : 5000,
    "restrict" : null,
    "tool" : "sleep"
   },
   {
    "description" : "Waiting for device",
    "restrict" : null,
    "state" : "pos",
    "timeout" : 120000,
    "tool" : "waitForDevice"
   },
   {
    "args" : "\"--alt\" \"u-boot0\" \"-D\" \"${u-boot_file}\" \"-t\" \"4096\"",
    "description" : "Flashing u-boot0",
    "mandatory" : true,
    "restrict" : null,
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "args" : "\"--alt\" \"u-boot-env0\" \"-D\" \"${u-boot-env_file_rndis}\" \"-t\" \"4096\"",
    "description" : "Flashing u-boot-env0",
    "mandatory" : true,
    "restrict" : [
      "rndis_env"
    ],
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "args" : "\"--alt\" \"u-boot-env0\" \"-D\" \"${u-boot-env_file_cdc}\" \"-t\" \"4096\"",
    "description" : "Flashing u-boot-env0",
    "mandatory" : true,
    "restrict" : [
      "cdc_env"
    ],
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "args" : "\"--alt\" \"u-boot-env1\" \"-D\" \"${u-boot-env_file_rndis}\" \"-t\" \"4096\" \"-R\"",
    "description" : "Flashing u-boot-env1",
    "mandatory" : true,
    "restrict" : [
      "rndis_env"
    ],
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "args" : "\"--alt\" \"u-boot-env1\" \"-D\" \"${u-boot-env_file_cdc}\" \"-t\" \"4096\" \"-R\"",
    "description" : "Flashing u-boot-env1",
    "mandatory" : true,
    "restrict" : [
      "cdc_env"
    ],
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "description" : "Sleep",
    "duration" : 5000,
    "restrict" : null,
    "tool" : "sleep"
   },
   {
    "description" : "Waiting for device",
    "restrict" : null,
    "state" : "pos",
    "timeout" : 100000,
    "tool" : "waitForDevice"
   },
   {
    "args" : "\"--alt\" \"boot\" \"-D\" \"${boot_file}\" \"-t\" \"4096\"",
    "description" : "Flashing boot",
    "mandatory" : true,
    "restrict" : null,
    "retry" : 2,
    "timeout" : 60000,
    "tool" : "dfuDownloader"
   },
   {
    "args" : "\"--alt\" \"rootfs\" \"-D\" \"${rootfs_file}\" \"-t\" \"4096\" \"-R\"",
    "description" : "Flashing rootfs",
    "mandatory" : true,
    "restrict" : null,
    "retry" : 2,
    "timeout" : 1200000,
    "tool" : "dfuDownloader"
   },
   {
    "description" : "Waiting for device",
    "duration" : 60000,
    "restrict" : null,
    "source" : "Edison board needs to reboot<br />
                Please do not unplug it for 2 minutes<br /><br />
                On Arduino board, led will stop blinking at boot completed<br /><br />
                <img src='images/Edison-arduino-blink-led.png' width='390' />",
    "tool" : "notifier"
   }
  ],
  "configurations" :   {
   "cdc_env" :    {
    "brief" : "CDC USB driver (for Mac Osx & Linux)",
    "default" : false,
    "description" : "U-Boot CDC environment",
    "documentation" : "",
    "groupsState" :     {
    },
    "name" : "Linux or Mac OS",
    "parameters" :     {
    },
    "startState" : "dnx_fw"
   },
   "rndis_env" :    {
    "brief" : "RNDIS USB driver (for Windows)",
    "default" : true,
    "description" : "U-Boot RNDIS environment",
    "documentation" : "",
    "groupsState" :     {
    },
    "name" : "Windows",
    "parameters" :     {
    },
    "startState" : "dnx_fw"
   }
  },
  "groups" :   {
  },
  "osplatform" : "android",
  "parameters" :   {
   "boot_file" :    {
    "description" : "Boot partition",
    "name" : "Boot partition",
    "type" : "file",
    "value" : "edison-image-edison.hddimg"
   },
   "fw_dnx_file" :    {
    "description" : "Firmware DnX",
    "name" : "Firmware DnX",
    "type" : "file",
    "value" : "edison_dnx_fwr.bin"
   },
   "gpflag" :    {
    "description" : "GP flag",
    "name" : "GP flag",
    "type" : "string",
    "value" : "0x80000007"
   },
   "helperFile" :    {
    "description" : "helperFile",
    "name" : "helperFile",
    "type" : "file",
    "value" : "helper/helper.html"
   },
   "ifwi_file" :    {
    "description" : "Firmware",
    "name" : "Firmware",
    "type" : "file",
    "value" : "edison_ifwi-dbg-00.bin"
   },
   "os_dnx_file" :    {
    "description" : "OS DnX",
    "name" : "OS DnX",
    "type" : "file",
    "value" : "edison_dnx_osr.bin"
   },
   "os_file" :    {
    "description" : "OS",
    "name" : "OS",
    "type" : "file",
    "value" : "u-boot-edison.img"
   },
   "rootfs_file" :    {
    "description" : "Rootfs",
    "name" : "Rootfs",
    "type" : "file",
    "value" : "edison-image-edison.ext4"
   },
   "u-boot-env_file_cdc" :    {
    "description" : "U-Boot CDC environment",
    "name" : "U-Boot CDC environment",
    "type" : "file",
    "value" : "u-boot-envs/edison-blankcdc.bin"
   },
   "u-boot-env_file_rndis" :    {
    "description" : "U-Boot RNDIS environment",
    "name" : "U-Boot RNDIS environment",
    "type" : "file",
    "value" : "u-boot-envs/edison-blankrndis.bin"
   },
   "u-boot_file" :    {
    "description" : "U-Boot",
    "name" : "U-Boot primary",
    "type" : "file",
    "value" : "u-boot-edison.bin"
   }
  },
  "version" : "2.2"
 }
}
