4 Replies Latest reply on Apr 15, 2015 1:12 PM by nniles

    Flashing Edison does not work

    SLK

      I am trying to flash a new firmware on Intel Edison but somehow it does not work. I am able to build a new image, create flash version of it but the final flashing on the device reports to work, takes only a second or two to complete and unfortunately I am still having the old on the device. Any idea what can be the reason? Below is a bit more information about the steps that I am doing.


      I am compiling the new image using the following steps

       

      source poky/oe-init-build-env

      bitbake virtual/kernel -c menuconfig # I am adding here support for USB Media devices

      cp edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTO*/linux-edison-standard-build/.config edison-src/device-software/meta-edison/recipes-kernel/linux/files/defconfig

      bitbake edison-image

       

      After that creating the flash image seems to work but I am getting the following:

       

      ./device-software/utils/flash/postBuild.sh

      ...

      4194304 bytes (4,2 MB) copied, 0,00489256 s, 857 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00516392 s, 812 MB/s

      cp: cannot stat ‘/media/<...>/edison-src/build/tmp/deploy/images/edison/vmlinux’: No such file or directory

      Image Name:  Edison Updater script

      Created:      Wed Oct 22 17:59:28 2014

      Image Type:  PowerPC Linux Script (uncompressed)

      Data Size:    14686 Bytes = 14.34 kB = 0.01 MB

      Load Address: 00010000

      Entry Point:  00010000

      Contents:

        Image 0: 14678 Bytes = 14.33 kB = 0.01 MB

      **** Done ***

      Files ready to flash in /media/<..>/edison-src/build/toFlash/

      Run the flashall script there to start flashing.

      *************


      In the toFlash directory I can see that there are newly created files:

      -rw-r--r-- 1 slavey slavey  96K Okt 22 17:59 dnx_fwr_saltbay_pr2.bin

      -rw-r--r-- 1 slavey slavey 146K Okt 22 17:59 dnx_osr_saltbay_pr2.bin

      -rw-r--r-- 1 slavey slavey  96K Okt 22 17:59 edison_dnx_fwr.bin

      -rw-r--r-- 1 slavey slavey 146K Okt 22 17:59 edison_dnx_osr.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-00.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-00-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-01.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-01-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-02.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-02-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-03.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-03-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-04.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-04-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-05.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-05-dfu.bin

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 edison_ifwi-dbg-06.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 edison_ifwi-dbg-06-dfu.bin

      -rw-r--r-- 1 slavey slavey 512M Okt 22 17:59 edison-image-edison.ext4

      -rw-r--r-- 1 slavey slavey 5,6M Okt 22 17:59 edison-image-edison.hddimg

      -rw-r--r-- 1 slavey slavey  780 Okt 22 17:59 filter-dfu-out.js

      -rw-r--r-- 1 slavey slavey 8,5K Okt 22 17:59 flashall.bat

      -rwxr-xr-x 1 slavey slavey 7,1K Okt 22 17:59 flashall.sh

      -rw-rw-r-- 1 slavey slavey 3,4K Okt 22 18:10 flash.log

      -rw-r--r-- 1 slavey slavey 4,1M Okt 22 17:59 ifwi_saltbay_pr2.bin

      -rw-rw-r-- 1 slavey slavey 4,0M Okt 22 17:59 ifwi_saltbay_pr2-dfu.bin

      -rw-rw-r-- 1 slavey slavey  15K Okt 22 17:59 ota_update.scr

      -rw-rw-r-- 1 slavey slavey  11K Okt 22 17:59 package-list.txt

      -rw-r--r-- 1 slavey slavey  712 Okt 22 17:59 pft-config-edison.xml

      -rw-r--r-- 1 slavey slavey  729 Okt 22 17:59 pft-config-mcg_sku.xml

      -rwxr-xr-x 1 slavey slavey 240K Okt 22 17:59 u-boot-edison.bin

      -rwxr-xr-x 1 slavey slavey 6,1M Okt 22 17:59 u-boot-edison.img

      drwxr-xr-x 2 slavey slavey 4,0K Okt 22 17:59 u-boot-envs

       

      But the final flashing definitely does not work. Running the flashall.sh command takes only a  second to complete and when I check the device after 5 minutes I still have the old version of the kernel compiled on the 8th of September.

      cd <newly-created-dir>/flashall.sh

      Using U-Boot target: edison-blank

      Now waiting for dfu device 8087:0a99

      Please plug and reboot the board

      Flashing IFWI

      Flashing U-Boot

      Flashing U-Boot Environment

      Flashing U-Boot Environment Backup

      Flashing boot partition (kernel)

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

      Rebooting

      U-boot & Kernel System Flash Success...

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

       

      So my question is what I am doing wrong?  Can it be the free space on the device? Is there a log file that reports more information about the flashing?

      /dev/root               463.9M    379.2M     48.9M  89% /

      devtmpfs                480.2M         0    480.2M   0% /dev

      tmpfs                   480.5M         0    480.5M   0% /dev/shm

      tmpfs                   480.5M    492.0K    480.0M   0% /run

      tmpfs                   480.5M         0    480.5M   0% /sys/fs/cgroup

      tmpfs                   480.5M    492.0K    480.0M   0% /etc/machine-id

      systemd-1                 5.5M      5.1M    456.0K  92% /boot

      systemd-1                 2.2G    683.2M      1.5G  30% /home

      tmpfs                   480.5M     36.0K    480.5M   0% /tmp

      tmpfs                   480.5M         0    480.5M   0% /var/volatile

      /dev/mmcblk0p5         1003.0K     21.0K    911.0K   2% /factory

      /dev/loop0              766.5M      8.0K    766.5M   0% /media/storage

      /dev/mmcblk0p10           2.2G    683.2M      1.5G  30% /home

      /dev/mmcblk0p7            5.5M      5.1M    456.0K  92% /boot


      Thanks in advance for your suggestions and help.

        • 1. Re: Flashing Edison does not work
          David_J_Hunt

          Are you running the flashall.sh script as root?

          • 2. Re: Flashing Edison does not work
            SLK

            Hi David,

              And thanks for your help. I wasn't running the flashall.sh as a root. Running it as root seems to be the right thing!

             

            sudo ./flashall.sh --keep-data

            [sudo] password for slavey:

            Using U-Boot target: edison-default

            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!

            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...

             

            It would be nice if Intel can add this to their scripts or to the PDF manual.

            • 3. Re: Flashing Edison does not work
              toddklaus

              I just ran into the same problem and this post saved me, thanks David & SLK.

               

              It would be nice if the flashall script failed with a descriptive error when there is a permissions problem rather than just reporting success and exiting!

              • 4. Re: Flashing Edison does not work
                nniles

                toddklaus,

                 

                It has been suggested multiple times, but they don't seem to believe us: Re: Suggestion for small improvement to flashall.sh

                 

                Thanks,