1 2 Previous Next 22 Replies Latest reply on Jan 11, 2015 1:17 AM by peepo

    Custom Linux Image -- no ota_update.scr?

    lrosenman

      How does the "magic" ota_update.scr file get generated for a custom image?

       

      Also, I did a bitbake with a custom image, and can't seem to get it to flash.....

       

      It seems to think it's already flashed, and if I clear the environment variables it uses, it just hangs

       

      root@LER-Edison:/update# ls -l

      -rwxr-xr-x    1 root     root          4096 Sep 27 03:33 dnx_fwr_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root          4096 Sep 27 03:33 dnx_osr_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root     536870912 Sep 27 03:51 edison-image-edison.ext4

      -rwxr-xr-x    1 root     root       5816320 Sep 27 03:51 edison-image-edison.hddimg

      -rwxr-xr-x    1 root     root         98196 Sep 27 03:33 edison_dnx_fwr.bin

      -rwxr-xr-x    1 root     root             0 Sep 27 03:33 edison_dnx_osr.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-00-dfu.bin

      -rwxr-xr-x    1 root     root             0 Sep 27 03:34 edison_ifwi-dbg-00.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-01-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-01.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-02-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-02.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-03-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-03.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-04-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-04.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-05-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-05.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-06-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-06.bin

      -rwxr-xr-x    1 root     root           780 Sep 27 03:51 filter-dfu-out.js

      -rwxr-xr-x    1 root     root          8618 Sep 27 03:51 flashall.bat

      -rwxr-xr-x    1 root     root          7212 Sep 27 03:51 flashall.sh

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:51 ifwi_saltbay_pr2-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:51 ifwi_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root         14750 Sep 26 21:47 ota_update.scr

      -rwxr-xr-x    1 root     root          9456 Sep 27 03:51 package-list.txt

      -rwxr-xr-x    1 root     root           712 Sep 27 03:51 pft-config-edison.xml

      -rwxr-xr-x    1 root     root           729 Sep 27 03:51 pft-config-mcg_sku.xml

      -rwxr-xr-x    1 root     root        245760 Sep 27 03:51 u-boot-edison.bin

      -rwxr-xr-x    1 root     root       6291968 Sep 27 04:04 u-boot-edison.img

      drwxr-xr-x    2 root     root          4096 Sep 27 04:04 u-boot-envs

      root@LER-Edison:/update# ls -la

      drwxr-xr-x    3 root     root          4096 Sep 27 04:05 .

      drwxr-xr-x   23 root     root          4096 Sep 27 03:05 ..

      -rwxr-xr-x    1 root     root          4096 Sep 27 03:33 dnx_fwr_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root          4096 Sep 27 03:33 dnx_osr_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root     536870912 Sep 27 03:51 edison-image-edison.ext4

      -rwxr-xr-x    1 root     root       5816320 Sep 27 03:51 edison-image-edison.hddimg

      -rwxr-xr-x    1 root     root         98196 Sep 27 03:33 edison_dnx_fwr.bin

      -rwxr-xr-x    1 root     root             0 Sep 27 03:33 edison_dnx_osr.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-00-dfu.bin

      -rwxr-xr-x    1 root     root             0 Sep 27 03:34 edison_ifwi-dbg-00.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-01-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-01.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-02-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-02.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-03-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-03.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-04-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-04.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-05-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-05.bin

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:34 edison_ifwi-dbg-06-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:34 edison_ifwi-dbg-06.bin

      -rwxr-xr-x    1 root     root           780 Sep 27 03:51 filter-dfu-out.js

      -rwxr-xr-x    1 root     root          8618 Sep 27 03:51 flashall.bat

      -rwxr-xr-x    1 root     root          7212 Sep 27 03:51 flashall.sh

      -rwxr-xr-x    1 root     root       4194304 Sep 27 03:51 ifwi_saltbay_pr2-dfu.bin

      -rwxr-xr-x    1 root     root       4194468 Sep 27 03:51 ifwi_saltbay_pr2.bin

      -rwxr-xr-x    1 root     root         14750 Sep 26 21:47 ota_update.scr

      -rwxr-xr-x    1 root     root          9456 Sep 27 03:51 package-list.txt

      -rwxr-xr-x    1 root     root           712 Sep 27 03:51 pft-config-edison.xml

      -rwxr-xr-x    1 root     root           729 Sep 27 03:51 pft-config-mcg_sku.xml

      -rwxr-xr-x    1 root     root        245760 Sep 27 03:51 u-boot-edison.bin

      -rwxr-xr-x    1 root     root       6291968 Sep 27 04:04 u-boot-edison.img

      drwxr-xr-x    2 root     root          4096 Sep 27 04:04 u-boot-envs

      root@LER-Edison:/update# strings ota_update.scr |more

      uG?T

      Edison Updater script

      echo === OTA update script ===

      # Global configuration

      setenv ota_done 0

      setenv ota_abort 0

      setenv ota_verbose 1

      # Remove ota_abort_reason which is used to report error in case of failure

      env delete ota_abort_reason

      # Define some u-boot functions

      # before running theses functions check for ota_abort var

      # in case of failure theses functions set ota_abort and ota_abort_reason var

      # the function verbosity is controlled by ota_verbose var

      # function ota_conv_sizes

      # Convert a bytes size to a block size

      # input bytesize : size in bytes to convert

      # input blksize : size of a block in bytes

      # output numblk : converted size in blocks

      setenv ota_conv_sizes 'setexpr num_blk $bytesize / $blksize ; setexpr mod_blk $bytesize % $blksize ; if itest $mod_blk > 0 ; then setexpr num_blk $num_blk + 1; fi;'

      # function ota_mmc_write

      # Write a memory buffer to mmc drive

      # input floadaddr     : address of buffer to write

      # input u_part_start : block start in mmc

      # input num_blk      : number of block to write

      setenv ota_mmc_write 'if itest $ota_verbose == 1 ; then echo "mmc write ${floadaddr} ${u_part_start} ${num_blk};"; fi; mmc write $floadaddr $u_part_start $num_blk; ret=$?; if itest $ret != 0 ; then setenv ota_abort_reason "mmc write ${floadaddr} ${u_part_start} ${num_blk} failed"; setenv ota_abort 1; fi;'

      # function ota_load_image

      # Load partition binary image from update partition to memory

      # input  ota_drive      : ota drive name

      # input  ota_image_name : filename of image to load

      # input  floadaddr       : memory address destination

      # output filesize       : size of image in bytes

      setenv ota_load_image 'if itest $ota_verbose == 1 ; then echo "fatload ${ota_drive} ${floadaddr} ${ota_image_name};"; fi; fatload ${ota_drive} ${floadaddr} ${ota_image_name};ret=$?; if itest $ret != 0 ; then setenv ota_abort_reason "fatload ${ota_drive} ${floadaddr} ${ota_image_name} failed: ${ret}"; setenv ota_abort 1; fi;'

      # function ota_compute_hash

      # Compute Sha1 of a Loaded image in memory

      # input  floadaddr : memory address destination

      # input  filesize  : size of image in bytes

      # output sha1_sum  : sha1 sum  of loaded file

      setenv ota_compute_hash 'if itest $ota_verbose == 1 ; then echo "hash sha1 $floadaddr $filesize sha1_sum;"; fi; hash sha1 $floadaddr $filesize sha1_sum;ret=$?; if itest $ret != 0 ; then setenv ota_abort_reason "hash sha1 $floadaddr $filesize sha1_sum failed: ${ret}"; setenv ota_abort 1; fi;'

      # function ota_test_image_and_partition_sizes

      # Test if image fit partition

      # input num_blk : image size in blocks

      # input u_part_sz : partition size in blocks

      setenv ota_test_image_and_partition_sizes 'if itest $num_blk > $u_part_sz ; then setenv ota_abort_reason "Partition ${u_part_lbl} too small for ${ota_image_name}"; setenv ota_abort 1; fi;'

      # function ota_find_partition

      # Find a partition by label

      # input u_part_lbl : partition label

      # output u_part_num : partition number

      setenv ota_find_partition 'if itest $ota_verbose == 1 ; then echo "part find mmc 0 label:${u_part_lbl} u_part_num;"; fi; part find mmc 0 label:${u_part_lbl} u_part_num;ret=$?; if itest $ret != 0 ; then setenv ota_abort_reason "part find mmc 0 label:${u_part_lbl} u_part_num failed: ${ret}"; setenv ota_abort 1; fi;'

      # function ota_get_partition_attributes

      # Retrieve partition attribute

      # input  u_part_num   : partition number

      # output u_part_start : partition start block number

      # output u_part_sz    : partition size in blocks

      # output u_part_blksz : partition block size in bytes

      setenv ota_get_partition_attributes 'if itest $ota_verbose == 1 ; then echo "part info mmc 0:${u_part_num} u_part_start u_part_sz u_part_blksz;"; fi; part info mmc 0:${u_part_num} u_part_start u_part_sz u_part_blksz;ret=$?; if itest $ret != 0 ; then setenv ota_abort_reason "part info mmc 0:${u_part_num} u_part_start u_part_sz u_part_blksz failed: ${ret}"; setenv ota_abort 1; fi;'

      # function ota_exec_verbose_cmd

      # Execute a command when verbosity is set

      # input vb_cmd : contains code to run verbosily

      setenv ota_exec_verbose_cmd 'if itest $ota_verbose == 1 ; then run vb_cmd ; fi;'

      # function ota_cleans_script

      # remove from environment all variables and functions in this script

      setenv ota_cleans_script 'env delete -f sha1_sum sha1_sum_ref; env delete -f u_part_blksz u_part_lbl u_part_num u_part_start u_part_sz updt_part_num ota_drive; env delete -f mod_blk num_blk filesize bytesize blksize floadaddr vb_cmd; env delete -f floadaddr; env delete -f ota_conv_sizes ota_mmc_write ota_load_image ota_compute_hash; env delete -f ota_test_image_and_partition_sizes ota_find_partition ota_get_partition_attributes ota_exec_verbose_cmd ota_cleans_script;'

      # handle two pass validation of script

      if env exist ota_checked ; then if itest $ota_checked == 0; then echo "Ota previously failed retry"; fi; else setenv ota_checked 0; fi;

      essing Ota update"; fi;= 0; then echo "Validating Ota package" ; else echo "Proc--More--

      setenv floadaddr 0x6400000

      # Find update partition on emmc drive

      setenv u_part_lbl update;

      run ota_find_partition ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      setenv ota_drive mmc 0:${u_part_num}

      if itest $ota_verbose == 1 ; then echo "ota drive is $ota_drive"; fi

      # Start update of edison_ifwi-dbg-dfu.bin on ifwi 1 and 2

      setenv ota_image_name edison_ifwi-dbg-${hardware_id}-dfu.bin ;

      # Tell user what's going on

      echo " "

      if itest $ota_checked == 1 ; then

      echo "Update IFWI on boot0 and boot1 partitions";

      else

      echo "Validating ${ota_image_name} hash for boot0 and boot1 partitions";

      echo " "

      # Load binary image from update partition to memory

      run ota_load_image;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      if itest $ota_checked == 0 ; then

          # Select sha1_sum_ref according to corresponding hardware_id

      4c6b8328a017264bf30607f82 ; fi;= "00" ; then setenv sha1_sum_ref 7238ee6962289f2--More--

          if itest.s ${hardware_id} == "01" ; then setenv sha1_sum_ref 1354949b7321bd4497d6808eac37bdab269d51e2 ; fi;

          if itest.s ${hardware_id} == "02" ; then setenv sha1_sum_ref e1ab13a598ca43ef3b80271a7791c242ca3119c8 ; fi;

          if itest.s ${hardware_id} == "03" ; then setenv sha1_sum_ref a0d93a5d39e53cefb6b52380a6f2ba1083d7ee64 ; fi;

          if itest.s ${hardware_id} == "04" ; then setenv sha1_sum_ref f4cc95e80fcf16f32ae852c1d72da6b39bd3bbcc ; fi;

          if itest.s ${hardware_id} == "05" ; then setenv sha1_sum_ref 682fc4c1c55c61f3408fbd04d93399df17af6ed8 ; fi;

          if itest.s ${hardware_id} == "06" ; then setenv sha1_sum_ref f610c73b1182092371a50d08d05805f2b4bd6ef5 ; fi;

          # Verify data integrity

          run ota_compute_hash;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          if itest.s $sha1_sum_ref != $sha1_sum ; then setenv ota_abort_reason "${ota_image_name} hash mismatch ($sha1_sum / $sha1_sum_ref)"; setenv ota_abort 1; fi;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Convert file size in byte to block, for ifwi used hardcoded values

      setenv bytesize $filesize ;

      setenv blksize 0x200 ;

      run ota_conv_sizes ;

      setenv vb_cmd 'echo "${ota_image_name} size is 0x$filesize bytes and 0x$num_blk block";'

      run ota_exec_verbose_cmd ;

      # Test if image fit partition

      if itest $num_blk > 0x2000 ; then echo "${ota_image_name} Shrinked to fit partition ifwi "; setenv num_blk 2000 ; fi;

      if itest $ota_checked == 1 ; then

      # Set MMC ifwi partition to 1

          if itest $ota_verbose == 1 ; then echo "mmc dev 0 1;"; fi;

          mmc dev 0 1 ; ret=$?

          if itest $ret != 0 ; then setenv ota_abort_reason "mmc dev 0 1 failed: $ret"; setenv ota_abort 1; run ota_cleans_script; exit; fi;

          # Write image to partition

          setenv u_part_start 0x0;

          run ota_mmc_write;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Set MMC ifwi partition to 2

          if itest $ota_verbose == 1 ; then echo "mmc dev 0 2;"; fi;

          mmc dev 0 2 ; ret=$?

          if itest $ret != 0 ; then setenv ota_abort_reason "mmc dev 0 2 failed: $ret"; setenv ota_abort 1; run ota_cleans_script; exit; fi;

          # Write image to partition

          setenv u_part_start 0x00;

          run ota_mmc_write;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Set back MMC partition 0

          mmc dev 0 0 ;

          # Tell user about the status

          echo " "

          echo "Update of ${ota_image_name} to boot0 and boot1 partitions Done";

      # Start update of u-boot-edison.bin on u-boot0

      setenv ota_image_name u-boot-edison.bin

      setenv u_part_lbl u-boot0

      setenv sha1_sum_ref 9b51387e9145ebd3d5165aadf8c649df3f0f6116

      # Tell user what's going on

      echo " "

      if itest $ota_checked == 1 ; then

      echo "Update of ${ota_image_name} to ${u_part_lbl} partition";

      else

      echo "Validating ${ota_image_name} hash for ${u_part_lbl} partition";

      echo " "

      # Load partition binary image from update partition to memory

      run ota_load_image;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Find partition u-boot0

      run ota_find_partition ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Retrieve partition attribute

      run ota_get_partition_attributes ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Convert file size in byte to block

      setenv bytesize $filesize ;

      setenv blksize $u_part_blksz ;

      run ota_conv_sizes ;

      setenv vb_cmd 'echo "Partition ${u_part_lbl} Start:0x${u_part_start} Size:0x${u_part_sz} BlockSize:0x${u_part_blksz}"; echo "${ota_image_name} size is 0x${filesize} bytes and 0x${num_blk} block"; echo " ";'

      run ota_exec_verbose_cmd ;

      if itest $ota_checked == 0 ; then

          # Test if image fit partition

          run ota_test_image_and_partition_sizes ;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Verify data integrity

          run ota_compute_hash;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          if itest.s $sha1_sum_ref != $sha1_sum ; then setenv ota_abort_reason "${ota_image_name} hash mismatch ($sha1_sum / $sha1_sum_ref)"; setenv ota_abort 1; fi;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      else

          # Write image to partition

          run ota_mmc_write;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Tell user about the status

          echo " "

          echo "Update of ${ota_image_name} to ${u_part_lbl} partition  Done";

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Start update of edison-image-edison.hddimg on boot

      setenv ota_image_name edison-image-edison.hddimg

      setenv u_part_lbl boot

      setenv sha1_sum_ref b6665f17e60bb093300f6f39169e69e2bedd10cb

      # Tell user what's going on

      echo " "

      if itest $ota_checked == 1 ; then

      echo "Update of ${ota_image_name} to ${u_part_lbl} partition";

      else

      echo "Validating ${ota_image_name} hash for ${u_part_lbl} partition";

      # Load partition binary image from update partition to memory

      run ota_load_image ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Find partition boot

      run ota_find_partition ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Retrieve partition attribute

      run ota_get_partition_attributes ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Convert file size in byte to block

      setenv bytesize $filesize ;

      setenv blksize $u_part_blksz ;

      run ota_conv_sizes ;

      setenv vb_cmd 'echo "Partition ${u_part_lbl} Start:0x${u_part_start} Size:0x${u_part_sz} BlockSize:0x${u_part_blksz}"; echo "${ota_image_name} size is 0x${filesize} bytes and 0x${num_blk} block"; echo " ";'

      run ota_exec_verbose_cmd ;

      if itest $ota_checked == 0 ; then

          # Test if image fit partition

          run ota_test_image_and_partition_sizes ;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Verify data integrity

          run ota_compute_hash;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          if itest.s $sha1_sum_ref != $sha1_sum ; then setenv ota_abort_reason "${ota_image_name} hash mismatch ($sha1_sum / $sha1_sum_ref)"; setenv ota_abort 1; fi;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      else

          # Write image to partition

          run ota_mmc_write;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Tell user about the status

          echo " "

          echo "Update of ${ota_image_name} to ${u_part_lbl} partition  Done";

      # Start update of edison-image-edison.ext4 on rootfs

      setenv ota_image_name edison-image-edison.ext4

      setenv u_part_lbl rootfs

      setenv sha1_sum_ref fc7c6c828950b46bd5c256ce53c6675a98b8fef1

      # Tell user what's going on

      echo " "

      if itest $ota_checked == 1 ; then

      echo "Update of ${ota_image_name} to ${u_part_lbl} partition";

      else

      echo "Validating ${ota_image_name} hash for ${u_part_lbl} partition";

      echo " "

      # Load partition binary image from update partition to memory

      run ota_load_image;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Find partition rootfs

      run ota_find_partition ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Retrieve partition attribute

      run ota_get_partition_attributes ;

      if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      # Convert file size in byte to block

      setenv bytesize $filesize ;

      setenv blksize $u_part_blksz ;

      run ota_conv_sizes ;

      setenv vb_cmd 'echo "Partition ${u_part_lbl} Start:0x${u_part_start} Size:0x${u_part_sz} BlockSize:0x${u_part_blksz}"; echo "${ota_image_name} size is 0x${filesize} bytes and 0x${num_blk} block"; echo " ";'

      run ota_exec_verbose_cmd ;

      if itest $ota_checked == 0; then

          # Test if image fit partition

          run ota_test_image_and_partition_sizes ;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Verify data integrity

          run ota_compute_hash;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          if itest.s $sha1_sum_ref != $sha1_sum ; then setenv ota_abort_reason "$ota_image_name bad hash $sha1_sum != $sha1_sum_ref"; setenv ota_abort 1; fi;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

      else

          # Write image to partition

          run ota_mmc_write;

          if itest $ota_abort == 1 ; then run ota_cleans_script; exit ; fi;

          # Tell user about the status

          echo " "

          echo "Update of ${ota_image_name} to ${u_part_lbl} partition  Done";

      run ota_cleans_script;

      echo " "

      if itest $ota_checked == 0; then

          echo "Ota Pakage validated going to process it";

          setenv ota_checked 1;

          source $ota_script_addr;

      else

          # Overall sumup and end of update cycle

          echo " "

          echo "Ota Success going to reboot";

          setenv ota_done 1 ;

          env delete -f ota_checked;

          setenv bootargs_target first-install

          saveenv

          exit;

      root@LER-Edison:/update#

      root@LER-Edison:/update#

      root@LER-Edison:/update# ls

      dnx_fwr_saltbay_pr2.bin     edison_ifwi-dbg-05-dfu.bin

      dnx_osr_saltbay_pr2.bin     edison_ifwi-dbg-05.bin

      edison-image-edison.ext4    edison_ifwi-dbg-06-dfu.bin

      edison-image-edison.hddimg  edison_ifwi-dbg-06.bin

      edison_dnx_fwr.bin          filter-dfu-out.js

      edison_dnx_osr.bin          flashall.bat

      edison_ifwi-dbg-00-dfu.bin  flashall.sh

      edison_ifwi-dbg-00.bin      ifwi_saltbay_pr2-dfu.bin

      edison_ifwi-dbg-01-dfu.bin  ifwi_saltbay_pr2.bin

      edison_ifwi-dbg-01.bin      ota_update.scr

      edison_ifwi-dbg-02-dfu.bin  package-list.txt

      edison_ifwi-dbg-02.bin      pft-config-edison.xml

      edison_ifwi-dbg-03-dfu.bin  pft-config-mcg_sku.xml

      edison_ifwi-dbg-03.bin      u-boot-edison.bin

      edison_ifwi-dbg-04-dfu.bin  u-boot-edison.img

      edison_ifwi-dbg-04.bin      u-boot-envs

      root@LER-Edison:/update# cd

      root@LER-Edison:~# cd -

      /update

      root@LER-Edison:/update# md5

      -sh: md5: not found

      root@LER-Edison:/update# openssl

      OpenSSL> root@LER-Edison:/update#

      root@LER-Edison:/update# openssl md5 edison-image-edison.ext4

      MD5(edison-image-edison.ext4)= 6ee8db3d1b73d29b0cada70370bdb332

      root@LER-Edison:/update# openssl sha1 edison-image-edison.ext4

      SHA1(edison-image-edison.ext4)= dcff3a56be6bed4107b64d679d0952db45843910

      root@LER-Edison:/u

        • 1. Re: Custom Linux Image -- no ota_update.scr?
          lrosenman

          Ok, the bitbake did **NOT** make u-boot/tools/mkimage

           

          SO, how do we get that binary?

           

          I'm on a Fedora 20 Machine.

          • 2. Re: Custom Linux Image -- no ota_update.scr?
            lrosenman

            [ler@LER-fedora-w520 build]$ bitbake u-boot-tools

            Loading cache: 100% |###########################################| ETA:  00:00:00

            Loaded 1787 entries from dependency cache.

            NOTE: Resolving any missing task queue dependencies

             

             

            Build Configuration:

            BB_VERSION        = "1.22.0"

            BUILD_SYS         = "x86_64-linux"

            NATIVELSBSTRING   = "Fedora-20"

            TARGET_SYS        = "i586-poky-linux"

            MACHINE           = "edison"

            DISTRO            = "poky-edison"

            DISTRO_VERSION    = "1.6"

            TUNE_FEATURES     = "m32 core2"

            TARGET_FPU        = ""

            meta

            meta-yocto

            meta-yocto-bsp

            meta-edison

            meta-edison-distro

            meta-edison-middleware

            meta-edison-arduino = "<unknown>:<unknown>"

            meta-oe           = "daisy:662cf409c1175450699d498085f3c894e0fe81d0"

            NOTE: Preparing runqueue

            NOTE: Executing SetScene Tasks

            NOTE: Executing RunQueue Tasks

            ERROR: Function failed: do_compile (log file is located at /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/log.do_compile.7109)

            ERROR: Logfile of failure stored in: /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/log.do_compile.7109

            Log data follows:

            | DEBUG: Executing shell function do_compile

            | NOTE: make -j 4 HOSTCC=i586-poky-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/home/ler/edison-src/build/tmp/sysroots/edison HOSTLD=i586-poky-linux-ld --sysroot=/home/ler/edison-src/build/tmp/sysroots/edison   HOSTLDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed HOSTSTRIP=true tools

            | Makefile:479: *** "System not configured - see README".  Stop.

            | ERROR: oe_runmake failed

            | WARNING: /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/run.do_compile.7109:1 exit 1 from

            |   exit 1

            | ERROR: Function failed: do_compile (log file is located at /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/log.do_compile.7109)

            ERROR: Task 6 (/home/ler/edison-src/device-software/meta-edison-distro/recipes-b:

            Log data follows:

            | DEBUG: Executing shell function do_compile

            | NOTE: make -j 4 HOSTCC=i586-poky-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/home/ler/edison-src/build/tmp/sysroots/edison HOSTLD=i586-poky-linux-ld --sysroot=/home/ler/edison-src/build/tmp/sysroots/edison   HOSTLDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed HOSTSTRIP=true tools

            | Makefile:479: *** "System not configured - see README".  Stop.

            | ERROR: oe_runmake failed

            | WARNING: /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/run.do_compile.7109:1 exit 1 from

            |   exit 1

            | ERROR: Function failed: do_compile (log file is located at /home/ler/edison-src/build/tmp/work/edison-poky-linux/u-boot-tools/2014.04-1-r0/temp/log.do_compile.7109)

            ERROR: Task 6 (/home/ler/edison-src/device-software/meta-edison-distro/recipes-bsp/u-boot/u-boot-tools_2014.04.bb, do_compile) failed with exit code '1'

            NOTE: Tasks Summary: Attempted 366 tasks of which 365 didn't need to be rerun and 1 failed.

             

             

            so, Fedora20 can't build u-boot-tools, and therefore can't build a good image.

            • 3. Re: Custom Linux Image -- no ota_update.scr?
              lrosenman

              ok, I got around it by installing the fedora u-boot-tools

               

              and:

              cd /home/ler/edison-src

              mkdir -p u-boot/tools

              cd u-boot/tools

              ln -s /usr/bin/mkimage mkimage

               

              and then re-running the postBuild.sh script and got the magic file(s).

               

              now copying them to the magic update partition on the edison.

               

              We'll see.

              • 4. Re: Custom Linux Image -- no ota_update.scr?
                lrosenman

                and that works to flash.....

                 

                So, Intel folks -- we need to get mkimage into the edison-src stuff

                • 5. Re: Custom Linux Image -- no ota_update.scr?
                  rkd

                  hi

                  This problem is fixed and will be pushed out to the community soon.

                  • 6. Re: Custom Linux Image -- no ota_update.scr?
                    IntelAnonymous

                    Hello lrosenman,

                     

                    I had exactly the same problem when trying to flash my custom image based on the intel documentation:

                     

                    boot > run do_ota

                    reading ota_update.src

                    ** Unable to read file ota_update.src **

                    Saving Environment to MMC...

                    Writing to MMC(0)... done

                    resetting ...

                     

                    Therefore I followed your instructions (using ubuntu). The missing file ota_update.src is indeed generated. However, my image is still not being flashed even though the message ** Unable to read file ota_update.src ** disappeared.

                     

                    Maybe I am missing an important step? Could you provide more information?

                    • 7. Re: Custom Linux Image -- no ota_update.scr?
                      AlexT_Intel

                      Nowadays you don't need that trick, the postBuild.sh script will use the mkimage built along with the u-boot stuff by Yocto/bitbake, if it doesn't find the OS mkimage. So the fix rkd was talking about seems to be there already.

                       

                      Now if you have further issues, it would be better if you start a new thread, decribing your specific symptoms ("my image is still not being flashed" is not enough to understand what's going on and sugest something).

                      • 8. Re: Custom Linux Image -- no ota_update.scr?
                        IntelAnonymous

                        Hello AlexT_Intel,

                         

                        I will start a new thread for my problem. However, I want to mention that the ota_update.src has definitely not been created in my case. Only after performing the steps described by lrosenman I was able to create that file! Therefore I am not sure about the mentioned fix?

                        • 9. Re: Custom Linux Image -- no ota_update.scr?
                          AlexT_Intel

                          Which BSP version are you using to build your image?

                          • 10. Re: Custom Linux Image -- no ota_update.scr?
                            mhahn

                            OTA isn't created by default due to some wrong links AFAIK. Needs some minor tweaking and it should work

                            • 11. Re: Custom Linux Image -- no ota_update.scr?
                              AlexT_Intel

                              That's why I'm asking - that was the case for the previous official firmware release, but I see it's fixed in a current, WW42, one. Now the script checks for the OS-wide mkimage and if it doesn't exist, it uses the one from u-boot package being built during the image build as a fallback. I've tested the fallback (had an Ubuntu package installed OS-wide before) and it works fine.

                              • 12. Re: Custom Linux Image -- no ota_update.scr?
                                IntelAnonymous

                                What do you mean with WW42? I downloaded and compiled everything again from scratch:

                                 

                                1. Went to Intel® Download Center and downloaded edison-sdk-linux32-weekly-68.zip
                                2. Build everything as described edison-bsp_ug_331188-001.pdf
                                3. Executed postBuild.sh
                                4. ota_update.scr is not available in folder "toFlash"

                                 

                                I am using Ubuntu 14.02 32-Bit. Do I understand the manuals wrong?

                                • 13. Re: Custom Linux Image -- no ota_update.scr?
                                  mhahn

                                  IntelAnonymous the version nomenclature is confusing. sometime you see ww, sometime version numbers (going up and down "randomly").

                                  You probably see some errors (3?) when running the "postBuild" script. Check those out. As far as I recall one of it is a non existing path;

                                  I don't recall the details of the fixes. But was something like just modifying (or symbolic linking in) so the script would be happy

                                  • 14. Re: Custom Linux Image -- no ota_update.scr?
                                    AlexT_Intel

                                    This file edison-sdk-linux32-weekly-68.zip is definitely not the one you should be using. That's an SDK for Linux hosts and it only contains a cross toolchain.

                                     

                                    This is the Downloads page with all the Edison-related software downloads in one place: Edison - Software Downloads

                                    You need this one: http://downloadmirror.intel.com/24389/eng/edison-src-rel1-maint-rel1-ww42-14.tgz

                                    It's called "Edison Linux source files" and as you can see it has WW42 in the name - that means it was released on work week 42 and that's what I was referring to.

                                     

                                    Please use this one to build the image. if that's what you actually used, please post the output of postBuild.sh script when you run it.

                                    1 2 Previous Next