7 Replies Latest reply on Jul 23, 2015 8:00 PM by VincentR

    flashall.sh reporting a successful flash but clearly not flashing the image

    ryansturmer

      I am building a custom image with the edison-src package, and attempting to flash it with flashall.sh under Ubuntu 14.04.2 - the output of flashall.sh looks correct, dfu-util recognizes my device, and it claims to have flashed the board, but It's clear from the amount of time everything takes to run that no actual flashing takes place.  I get:

       

      Flashing IFWI

      Flashing U-Boot

      Flashing U-Boot Environment

      Flashing U-Boot Environment Backup

      Rebooting to apply partition changes

      Now waiting for dfu device 8087:0a99

      Flashing boot partition (kernel)

      Flashing rootfs, (it can take up to 5 minutes... Please be patient)

      Rebooting

       

      All more or less instantly, without any pause for any step in the process (where I would normally expect some time to elapse to download the image).  During this process, I can see on the UART that the image that's already on the edison is booting as normal - no indication that a flash operation is taking place.  - Has anyone experienced this problem?  This is not a customized image at all yet, I'm just building the stock yocto from the intel-supplied makefile and attempting to flash it just to kick the tires.

       

      Thanks!

        • 1. Re: flashall.sh reporting a successful flash but clearly not flashing the image
          primiano

          Yeah I did get the same. My impression is that flashall just waits for the device to fall in the dfu mode but doesn't realize if the system than boots and leaves, and ignores whether dfu_util  further fails.

          What happened in my case is that:

          - your system already has an image

          - You run flashall and reboot the system

          - Uboot puts the system in dfu mode, but if the host doesn't react timely, just boots the system.

          - At this point flashall is convinced that the system is still in dfu mode and pretends to flash it.

           

          The solution for me has been:

          - Reboot the board having the uart connected

          - When you see the Uboot messages coming up, press enter repeatedly until you see that the boot is interrupted and you are in the uboot menu (uboot>)

          - At this point type: "run do_flash" (without quotes), the system will go into dfu mode (without booting)

          - Run flashall now

          • 2. Re: flashall.sh reporting a successful flash but clearly not flashing the image
            ryansturmer

            This turned out to be a permissions issue in dfu-util.  Observe the output of dfu-util on the edison when run without administrator permissions:


            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=0, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=1, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=2, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=3, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=4, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=5, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=6, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=7, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=8, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=9, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=10, name="UNDEFINED"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=11, name="UNDEFINED"

             

            versus running with 'sudo'

             

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=0, name="ifwi00"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=1, name="ifwib00"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=2, name="u-boot0"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=3, name="u-boot-env0"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=4, name="u-boot1"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=5, name="u-boot-env1"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=6, name="boot"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=7, name="rootfs"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=8, name="update"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=9, name="home"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=10, name="vmlinuz"

            Found DFU: [8087:0a99] devnum=0, cfg=1, intf=0, alt=11, name="initrd"

             

            Re-running the flash script with sudo fixed it.  This error is swallowed sort of unceremoniously - it would make sense to include a check in flashall.sh that runs a dfu -l and checks for sane endpoints before attempting the flash operation.

             

            Found a clue here:

            Dfu-util can't list address - Particle (formerly Spark)

            • 3. Re: flashall.sh reporting a successful flash but clearly not flashing the image
              Alen_Chen

              Hi,

               

              Which version of the edison-src package are you using?

               

              Regards,

              Alen Chen

              • 4. Re: flashall.sh reporting a successful flash but clearly not flashing the image
                ryansturmer

                The only thing I can find at a glance in the edison-src pakcage in the way of a version number is in the tarball filename: edison-src-ww18-15.tgz

                • 5. Re: flashall.sh reporting a successful flash but clearly not flashing the image
                  Alen_Chen

                  Hi,

                   

                  The ww18-15 version is already the latest one.

                   

                  Software Release v2 includes changes to the flash partitioning, which will increase the default size of the root file system and should reduce miscellaneous failures that are caused by the lack of free space. To take advantage of this improvement, you must flash the latest Intel® Edison software image to the device using the Flash Tool Lite software, a new GUI-based flashing utility.

                   

                  So, please use the Flash Tool Lite  to have a try.

                   

                  Here is the link.   Intel® Edison Board Download | Intel® Developer Zone

                   

                  Regards,

                  Alen Chen

                  • 6. Re: flashall.sh reporting a successful flash but clearly not flashing the image
                    CMata_Intel

                    Hi ryansturmer,

                     

                    Did you try with the Flash Tool Lite? Do you have updates in this?

                     

                    Regards,

                    Charlie

                    • 7. Re: flashall.sh reporting a successful flash but clearly not flashing the image
                      VincentR

                      Hi,

                       

                      Thanks for pointing this out, this was the solution for me too. I am using flashall.sh to update to the ww25.5-15 image and 'reboot ota' does not work (as pointed out at https://communities.intel.com/message/316168 , I encountered the same issue). Running flashall.sh as advised on https://software.intel.com/en-us/flashing-firmware-on-your-intel-edison-board-linux (that is without sudo) just indeed reboots the board. Running with sudo worked fine. Here is how it looks when it worked for me :

                      $ sudo ./flashall.sh

                      Using U-Boot target: edison-blankcdc

                      Now waiting for dfu device 8087:0a99

                      Please plug and reboot the board

                      Flashing IFWI

                      ##################################################] finished!

                      ##################################################] finished!

                      Flashing U-Boot

                      ##################################################] finished!

                      Flashing U-Boot Environment

                      ##################################################] finished!

                      Flashing U-Boot Environment Backup

                      ##################################################] finished!

                      Rebooting to apply partition changes

                      Now waiting for dfu device 8087:0a99

                      Flashing boot partition (kernel)

                      ##################################################] finished!

                      Flashing rootfs, (it can take up to 5 minutes... Please be patient)

                      ##################################################] finished!

                      Rebooting

                      U-boot & Kernel System Flash Success...

                      Your board needs to reboot to complete the flashing procedure, please do not unplug it for 2 minutes.

                       

                      Vincent