12 Replies Latest reply on Apr 15, 2016 11:42 AM by ttc7152

    OTA/embedded system update


      What possibilities are there to update the system of an Intel Edison once it is embedded into a product.


      Assume that

      1. The update is already downloaded and stored as a file(whatever format needed) on the module.
      2. No internet access(see 1)
      3. The update must be triggered by my software having root access.
      4. Unattended upgrade without any user interaction.
      5. Atomic update
      6. Full system update must be possible, kernel and all.
      7. The current system, the full download and the new system all fits at the same time in the embeddded storage.


      Are there any recommended method?


      I'm thinking of having multiple partitions one for each version and then somehow modify the boot process to switch which system, but I have not found any description of how this can be done.


      Downloading and installing opkg packages could be a short term solution but I'm looking for solutions to get a new clean image onto the module.

        • 1. Re: OTA/embedded system update

          we are also interested in investigating the possibility of this solution, however i believe its going to be complicated.  the last few image updates from Intel are larger than the /update partition thus the OTA won't work.


          see this discussion here: https://communities.intel.com/message/383623#383623


          if your image will fit, then it should be easy to download the compressed image, extract it onto /update then run the 'reboot ota' command. 


          however, assuming its larger, then i think it would require an already expanded /update partition.  i believe to accommodate a custom partition size, you would need to design that as part of a custom image, but not 100% sure.


          also unless i'm missing something, by expanding the /update partition, you are going to eat into your ~1.3GB of storage on the /home partition.


          happy to collaborate on this and share ideas ...

          • 2. Re: OTA/embedded system update
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hi Peter-H,

            In order to update the Edison system, you have to flash the Edison module with a new image. However, the only way to flash the Edison is through the Flash Tool Lite. You cannot store the update file on the Edison’s memory in order to trigger the update process later, this process has to be done through the Flash Tool Lite. You can download the Flash Tool Lite in the following site: https://software.intel.com/en-us/iot/hardware/edison/downloads


            • 3. Re: OTA/embedded system update

              Diego, just to clarify, I think the idea here is we are discussing an alternative way to using the Flash Tool Lite --  the "reboot ota" method used to work.



              • 4. Re: OTA/embedded system update

                Hi Diego,


                I was hoping the Intel Edison could be a component in a commercial product.


                Your suggestion works for hobby projects where one can pull out the module and tinker with it at home.


                I'm looking for an update path when the module is part of a larger product that is spread out among many customer sites.

                I rather not have each customer replace the module themselves.

                • 5. Re: OTA/embedded system update

                  This looks promising.


                  I've already considered making a custom smaller image that would probably fit.


                  Do you know of any official documentation about "reboot ota" feature?

                  • 6. Re: OTA/embedded system update

                    Crazy idea, we could embed two intel edison modules in each product where the first one is the product and the other is used to flash the first one with new updates.

                    • 7. Re: OTA/embedded system update
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi Peter-H,

                      I understand your point, however, the flashing process has to be done through the Flash Tool Lite. Actually, a similar question was posted some time ago. In case you want to check it, this is the link to the thread: https://communities.intel.com/thread/99578

                      As ttc7152 mentioned, there was another method to flash the Yocto image. This method consisted in copying the image files in the Edison's drive and then running the command reboot ota in the Edison's console.  This method is no longer used because the latest image versions are larger than the Edison's partition, that's why we use the Flash Tool Lite now. In case you are interested on this method, I recommend you to check the following guide: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005795.html. This guide explains how to flash the Edison using the “reboot ota” method.


                      • 8. Re: OTA/embedded system update

                        yes, i think we are all in agreement that the current image is too large, thus the reboot ota method doesn't work. 


                        so it leaves us with a few options to explore, assuming we are motivated to find a way to do this over-the-air and not throw in the towel and just say "it doesn't work anymore."

                        1 - custom image which is small enough to fit onto the partition -- 'reboot ota' still works in this scenario;

                        2 - resizing the partition with custom image (this would have to be done first) to allow future OTA upgrades.  ?? this gets tricky, as each future release has to be "re-customized" to support different partition table, i think??

                        3 - is there a possibility of using SD card in lieu of /update partition to load the latest, "large-sized image?"  * this gets into the weeds, as i'm not familiar enough with drivers for SD Card and when those are loaded, or if they could be loaded earlier with 'DFU mode' which would allow this to work?


                        i think in the long run, as a community, we should probably request that Intel keep this on their radar screens, and strive to find a well supported, official OTA method (even if it requires use of SD Card).



                        • 9. Re: OTA/embedded system update

                          I see no problem with custom build as I expect every update to our product will be one.

                          Looking inside the module I have I can't find /update. I've noted that / and /home is 1.4GB and 1.3GB respectively. Perhaps they have removed the infrastructure for OTA completely.

                          • 10. Re: OTA/embedded system update

                            you have to enable/disable a few things that have to do with the mode of the USB device.


                            try this:

                            mmod g_multi
                            mkdir /update
                            losetup -o 8192 /dev/loop0 /dev/disk/by-partlabel/update

                            mount /dev/loop0 /update

                            How do I prevent someone from copying my software off of the Edision module by plugging it into a computer?

                            also, i think (but not sure) new edison image 3.0 has /update partition mounted by default ...  

                            • 11. Re: OTA/embedded system update
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation


                              The OTA is at the U-Boot level, if you interrupt the boot, you can enter into the U-Boot command shell. Typing "help" will show you all the available commands. Also, from Linux, you can access printenv and setenv with the commands fw_printenv and fw_setenv. I printed all the U-Boot variables related to OTA:

                              do_ota=run do_ota_init ; run do_load_ota_scr ; run do_source_ota_scr ; run do_ota_clean
                              do_ota_init=setenv ota_status 1 ; env delete -f bootargs_mode
                              do_load_ota_scr=if fatload mmc 0:9 $ota_script_addr ota_update.scr ; then setenv ota_status 0 ; else setenv ota_status 1 ; fi
                              do_source_ota_scr=if test $ota_status -eq 0 ; then if source $ota_script_addr ; then setenv ota_status 0 ; else setenv ota_status 2 ; fi ; fi
                              do_ota_clean=saveenv ; reset

                              "do_ota" is the entry point and it calls other variables. Notice the mmc 0:9 is the built-in flash memory partition 9. You can try mmc 1 for SD card.


                              • 12. Re: OTA/embedded system update

                                this is very promising -- this might be a simple way to handle the OTA updates without worrying about the size of the images anymore ...


                                i'll try to test in the near future and see if this works ...