11 Replies Latest reply on Apr 12, 2016 2:27 PM by CMata_Intel

    flashall.sh log files on Edison

    Bill.

      Hi,

       

      I went to the following page:

      https://software.intel.com/en-us/iot/hardware/edison/downloads

       

      and downloaded and unzipped the Firmware Software Release 2.1:

      http://downloadmirror.intel.com/25384/eng/edison-iotdk-image-280915.zip

       

      I followed the steps for Linux on this post, but it did not work:

      https://communities.intel.com/docs/DOC-25154

       

      At the prompt for the cables,  I plugged in both micro USB B cables.

       

      And then saw the prompt about Edison needing to be reboot.

       

      DOC-25154 said I should reboot it, versus Edison doing it automatically. Therefore I waited a few minutes longer and then pressed the power button for a few seconds to cause Edison to power down, and then pressed the power button momentarily to cause Edison to power up.

       

      I eventually used "screen /dev/ttyUSB0 115200" to open a terminal session on Edison and logged in and ran the following commands:

       

      uname -a showed:

       

      Linux edison 3.10.17-poky-edison+ #1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015 i686 GNU/Linux

       

      cat /etc/version showed:

      weekly-159

       

      which was the same version before I started, therefore flashall.sh didn't do anything or much.

       

      Question: on Edison, is there anything I can look at to see if flashall.sh did anything? I.e. are there any log files?

        • 1. Re: flashall.sh log files on Edison
          CMata_Intel

          Hi Bill,

           

          Yes, the document says that it needs a reboot; in case you are using a power supply you will need to reboot it by yourself; but as you said, in the moment you connect both USB cables the board will boot.

          When you run the flashall script, it waits for a pulse in the USB client and then a reboot from the board. If you are only using the USB cables (without a power supply) you can connect both USB cables and when the prompt asks for plugging and rebooting the board you can just change the position of the switch two times, this will generate the pulse in the USB client and also will reboot the board at the same time (If I do not have a power supply available, I do this)

           

          You can use screen /dev/ttyUSB0 115200 on another Terminal session and you will see the progress of the flashing process.

           

          Did you receive error messages while running the script?

          The flashall log is available on the folder where all the files of the image are located in your PC with the name flash.log. This log is not available on the Edison.

           

          Regards,

          Charlie

          • 2. Re: flashall.sh log files on Edison
            Bill.

            Hi Charlie,

             

            Thanks for the response.

             

            Though I am not using the power supply, your comments about using it and flipping the switch are interesting.

             

             

            Regarding: "needs a reboot"

             

            Question: are we talking about Edison booting twice? I.e. with Edison powered off:

             

                 boot #1:   flashall says: "Please plug and reboot the board" and Edison boots automatically.

             

                 boot #2:   at the end of flashall it says: "Your board needs to reboot to complete the flashing procedure".


            Question: For boot #2, does "needs to reboot" mean Edison will cause the reboot or a human has to cause the reboot?

             

             

            Regarding: "you can connect both USB cables and when the prompt asks for plugging and rebooting the board"

             

            Question: are you saying that instead of waiting for the "Please plug and reboot the board" prompt, I can leave the cables plugged in all the time, and when I see this flashall prompt, "Please plug and reboot the board", I just have to move the switch two times and that accomplishes the same thing?

             

             

            Regarding: "You can use screen /dev/ttyUSB0 115200 on another Terminal session"

             

            Question: by saying "another" will I have 2 terminal sessions or should I just use screen to open a single terminal session?

             

             

            Regarding: "Did you receive error messages while running the script?"

             

            Answer: I saw nothing abnormal in flash.log. flashall.sh ends by displaying:

                      "Your board needs to reboot to complete the flashing procedure"

             

            I did some more debugging to see if flashall.sh was detecting that the cable was plugged into j16.

             

            flash.log contains repeated occurrences of the following messages the USB cable is plugged into j16:

             

                      dfu-util 0.5

             

                      (C) 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.

                      (C) 2010-2011 Tormod Volden (DfuSe support)

                      This program is Free Software and has ABSOLUTELY NO WARRANTY

             

                      dfu-util does currently only support DFU version 1.0

             

                      Filter on vendor = 0x8087 product = 0x0a99

                     

            They appear to be issued by the dfu-util command. It is located in the flashall.sh function named dfu-wait.

            • dfu-wait issues the "Please plug and reboot the board".
            • In dfu-wait, the dfu-util program is executed in a loop checking to see if the USB cable is plugged into j16.
            • dfu-wait sleeps for a second and then executes dfu-util again to see if the cable has been plugged in.
            • Every time it is executed those messages are generated.
            • When the USB cable is plugged in and detected, dfu-util also returns 12 additional lines like the following numbered alt=0 to alt=11, which I guess signifies that the cable has been detected, and the loop ends:

             

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

             

             

            flashall.sh proceeds to do a lot of "flashing" and then ends with:

                

                 "Your board needs to reboot to complete the flashing procedure"

             

            And when I login to Edison I still see which is what I saw before I attempted to flash the firmware:

             

                 cat /etc/version showed:

                 weekly-159

             

            That Indicates that nothing happened, or not a lot happened.

             

            Question: To check for errors on Edison, when I use screen to open that serial terminal on Edison, is there a way to capture all the text that flies by?

             

            Regards,

            Bill

            • 3. Re: flashall.sh log files on Edison
              CMata_Intel

              Hi Bill,

               

              Regarding: "needs a reboot"

              A: On boot #1 it shouldn’t boot automatically, there could be a problem in the USB port you are using that is triggering an automatic reboot

              A: For boot #2, the Edison boots automatically, once the flashall script ends, it reboots the board.

               

              Regarding: "you can connect both USB cables and when the prompt asks for plugging and rebooting the board"

              A: Yes, moving the switch twice it will generate the flag needed for the script. Have you tried this? or does the board always reboots automatically?

               

              Regarding: "You can use screen /dev/ttyUSB0 115200 on another Terminal session"

              You will have two Terminal sessions, in the first one you will be running the flashall script and in the second one you will be running screen.

               

              Regarding: "Did you receive error messages while running the script?"

              Yes, dfu-util is the package required for run this script.

               

              Regarding your last question; no, there isn’t a way to capture all the text that appears on screen while flashing the board.

               

              It is really weird the behavior you are having, let’s try the following:

              1. Download again the files for the 159-devkit image: http://downloadmirror.intel.com/25384/eng/edison-iotdk-image-280915.zip

              2. Try with the Flash Tool Lite: IoT - Flash Tool Lite User Manual | Intel® Developer Zone

              3. Try with a power supply connected to the board. The problem may be related with the USB port of the PC, also with different USB cables.

              Also, is there a way you could flash the board using another PC?

              Have you tried to flash a older version? Maybe the 146 image version: Intel Edison Software Release 2.1

               

              Please let me know if one of the suggestions above works for you.

               

              Regards,

              Charlie

              • 4. Re: flashall.sh log files on Edison
                CMata_Intel

                Hi Bill,

                 

                Have you been able to flash the board with the devkit image?

                 

                Regards,

                Charlie

                • 5. Re: flashall.sh log files on Edison
                  Bill.

                  Hi Charlie,

                   

                  I haven't spent any time on poor Edison in the last few days, but I will get back to it.

                   

                  Stay tuned.

                   

                  Regards,

                  Bill

                  • 6. Re: flashall.sh log files on Edison
                    Bill.

                    Hi Charlie,

                     

                    Regarding this previous question:

                         Question: are we talking about Edison booting twice? I.e. with Edison powered off:

                         boot #1:   flashall says: "Please plug and reboot the board" and Edison boots automatically.

                     

                    You thought: On boot #1 it shouldn’t boot automatically, there could be a problem in the USB port you are using that is triggering an automatic reboot.

                     

                    Every time I plug a micro USB B cable into J16, LED DS2 immediately lites, then eventually DS1 and soon after that Ubuntu pops up a new window showing, I guess, the USB accessibly storage on Edison. Therefore I thought it was natural tor Edison to boot automatically when the USB cable is plugged into J16. And that is what this tutorial indicates: Intel® Edison Kit for Arduino | Intel® Developer Zone

                     

                    Question: therefore, for "boot #1" when flashall says "Please plug and reboot the board" and Edison boots automatically", how do I prevent it from booting automatically, which it seems to want to do normally?

                     

                    Regards,

                    Bill

                    • 7. Re: flashall.sh log files on Edison
                      CMata_Intel

                      Hi Bill,

                       

                      I was talking about the boots while running the flashall script; the flashall script prints on console:

                      Please plug and reboot the board – This is the first boot

                      In this moment the board shouldn’t reboot automatically, if the board wasn’t connected before this moment connecting the board should be enough. If the board was already connected to the PC you need to unplug and plug the USB board and also reboot it (if the board is being powered by a power supply; if it is being powered by the USB, at the moment you unplug and plug the board this reboots the board).

                      Your board needs to reboot to complete the flashing procedure, please do not unplug it for 2 minutes. – This is the second boot

                      This is done automatically by the script.

                       

                      Have you been able to flash the board successfully? I would like to know which image version you have right now.

                       

                      Regards,

                      Charlie

                      • 8. Re: flashall.sh log files on Edison
                        Bill.

                        Hi Charlie,

                         

                        Thanks for the clarification.

                         

                        I did the following ...

                         

                        No USB cables plugged into Edison

                         

                        On my Ubuntu PC I executed:  ./flashall.sh

                         

                        At the prompt "Please plug and reboot the board"

                        I plugged the micro USB B cable into J16

                         

                        the DS2 led immediately turned on.

                         

                        at about +12 seconds from the time I plugged in the USB cable DS2 turned off and DS1 turned on

                         

                        About this time on the Ubuntu PC, the "Your board needs to reboot" message appears

                         

                        at about +22 seconds a window named Edison popped up on my Ubunto PC showing, I guess, some storage on Edison of about 800 MB.

                         

                        at about 25 seconds DS1 remained on and DS2 began to flicker

                         

                        I watched the LEDs for a total of 5 minutes.

                         

                        Question: Given the above clues for the on/off for the DS1 & DS2 leds versus when the Flashall messages were displayed, do you think Edison rebooted after the "Your board needs to reboot" message? I think it DID NOT!

                         

                        For an experiment, I executed "shutdown -r" on Edison and watched the LEds. They definitely turned off and on, and I think in the same order as I mentioned above.

                         

                        I had a "screen" window open on Edison and saw the shutdown and restart messages.

                         

                        I saw one that said something like "Flashing already done".

                         

                        On Edison

                         

                            configure_edison --version

                         

                            response = 159

                         

                            /etc/version = weekly-159

                         

                        After the reboot, in the "screen" that I was open during the entire process, it says:

                         

                            Poky (Yocto Project Reference Distro) 1.7.2 edison ttyMDF2

                         

                        Question: regarding the "Flashing already done" message that I briefly saw, what can I look at to see why it thinks the flashing as already done.

                         

                         

                        Regards,

                        Bill Fosbury

                        • 9. Re: flashall.sh log files on Edison
                          CMata_Intel

                          Hi Bill,

                           

                          I apologize for the delay in my response.

                          I would like to know if you have been able to flash the board.

                          Regarding if the board rebooted after the message, the behavior of the LEDs may indicate that it has rebooted. But, in order to be sure about this I suggest you to open a screen session so you could see what is happening.

                          You can check the flash.log file that is located on the folder where the flashall.sh script is.

                           

                          Also, try with the latest image from:  https://software.intel.com/en-us/iot/hardware/edison/downloads

                           

                          Regards,

                          Charlie

                          • 10. Re: flashall.sh log files on Edison
                            Bill.

                            Hi Charlie,

                             

                            Good news. The short story is: after flashing Yocto Release 3.0, Edison's /etc/version now shows 201603141535

                             

                            Long story:

                             

                            I downloaded the newest version Yocto

                                starting at: https://software.intel.com/en-us/iot/hardware/edison/downloads

                                I clicked on: Release 3.0 Yocto* complete image

                                and downloaded https://downloadmirror.intel.com/25871/eng/iot-devkit-prof-dev-image-edison-20160315.zip

                                and then unzipped it

                             

                            First I executed ./flashall.sh and it timed out because it couldn't detect the USB cable I had plugged in to J16.

                             

                            That was weird because the board did have power via that cable and once Edison was booted a Ubuntu window popped up showing the storage on Edison.

                             

                            I then tried again with:  sudo ./flashall.sh

                             

                            sudo resulted in the flashing working.

                             

                            Question: look at this page:

                             

                            https://software.intel.com/en-us/flashing-firmware-on-your-intel-edison-board-linux

                             

                            Am I correct that step 4 should be changed to:

                             

                                To flash your board, enter the command:

                             

                                sudo ./flashall.sh

                             

                            Regards,

                            Bill

                            • 11. Re: flashall.sh log files on Edison
                              CMata_Intel

                              Hi Bill,

                               

                              I’m glad to hear that you have been able to flash the board. In some cases the sudo command is not required; fortunately for you it did the trick.

                              I will suggest to the proper team to add the sudo command in the link you posted I think it will help other makers in the future, thanks for the feedback

                               

                              Regards,

                              Charlie