2 Replies Latest reply on Aug 4, 2015 12:29 PM by IntelAnonymous

    postBuild.sh fails with latest linux sources (2.1)

    IntelAnonymous

      Here is what I did:

       

      1. Downloaded latest linux sources (2.1): IoT - Intel® Edison Board Download | Intel® Developer Zone
      2. Called setup.sh: ./meta-intel-edison/setup.sh --dl_dir=/.../edison-src/bitbake_download_dir --sstate_dir=/.../edison-src/bitbake_sstate_dir
      3. Called source poky/oe-init-build-env from "edison-src/out/linux64"
      4. Called bitbake edison-image

       

      Built finished without errors. However, calling ./meta-intel-edison/utils/flash/postBuild.sh shows the following output:

       

      user@user-VirtualBox:~/development/edison-src$ ./meta-intel-edison/utils/flash/postBuild.sh

      stat: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.ext4’: No such file or directory

      ./meta-intel-edison/utils/flash/postBuild.sh: line 30: / 1048576: syntax error: operand expected (error token is "/ 1048576")

      EDISON_ROOTFS_MB = 1536, IMAGE_SIZE_MB =

      ./meta-intel-edison/utils/flash/postBuild.sh: line 35: [: 1536: unary operator expected

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.hddimg’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.img’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.bin’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-envs’: No such file or directory

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0058462 s, 717 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0137583 s, 305 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0150803 s, 278 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0140211 s, 299 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0143172 s, 293 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,0100239 s, 418 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00828585 s, 506 MB/s

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.ext4’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.bin’: No such file or directory

      find: `/home/user/development/edison-src/build/tmp/work/edison-poky-linux/u-boot': No such file or directory

      Error : ota_update.scr creation failed, mkimage tool not found

       

      Okay, several problems here. Among others "mkimage" is not being found. Therefore I did this:

       

      (in edison-src)

      • mkdir u-boot
      • cd u-boot
      • ln -s /usr/bin/mkimage mkimage

       

      Next try:

       

      user@user-VirtualBox:~/development/edison-src$ ./meta-intel-edison/utils/flash/postBuild.sh

      stat: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.ext4’: No such file or directory

      ./meta-intel-edison/utils/flash/postBuild.sh: line 30: / 1048576: syntax error: operand expected (error token is "/ 1048576")

      EDISON_ROOTFS_MB = 1536, IMAGE_SIZE_MB =

      ./meta-intel-edison/utils/flash/postBuild.sh: line 35: [: 1536: unary operator expected

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.hddimg’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.img’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.bin’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-envs’: No such file or directory

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00641745 s, 654 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00511121 s, 821 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00514335 s, 815 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00476682 s, 880 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00445349 s, 942 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00535483 s, 783 MB/s

      1+0 records in

      1+0 records out

      4194304 bytes (4,2 MB) copied, 0,00663646 s, 632 MB/s

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.ext4’: No such file or directory

      cp: cannot stat ‘/home/user/development/edison-src/build/tmp/deploy/images/edison/u-boot-edison.bin’: No such file or directory

      Image Name:  Edison Updater script

      Created:      Mon Aug  3 21:29:10 2015

      Image Type:  PowerPC Linux Script (uncompressed)

      Data Size:    14651 Bytes = 14.31 kB = 0.01 MB

      Load Address: 00010000

      Entry Point:  00010000

      Contents:

        Image 0: 14643 Bytes = 14.30 kB = 0.01 MB

      awk: fatal: cannot open file `/home/user/development/edison-src/build/tmp/deploy/images/edison/edison-image-edison.manifest' for reading (No such file or directory)

      **** Done ***

      Files ready to flash in /home/user/development/edison-src/build/toFlash/

      Run the flashall script there to start flashing.

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

      user@user-VirtualBox:~/development/edison-src$

       

       

      In summary several problems exist! I want to mention that I haven't had problems building earlier versions of that image. But after the whole structure of the folders changed, it does not work for me anymore.

      Any help is appreciated


      // EDIT ------------------------------------------------------------------------------------

      Problem seems to be solved. After analyzing Section 3 "build image with make" I figure out that the last step after 5. in Section 2 (build using bitbake) is unclear written. You have to pass the path to the build-folder:


      Wrong:

      ./meta-intel-edison/utils/flash/postBuild.sh

      Correct:

      ./meta-intel-edison/utils/flash/postBuild.sh /home/user/development/edison-source/out/current/build



      // Second EDIT ---------------------------------------------------------------------------

      Seems to me that the bitbake and the make approaches are not independent. I have to do further research because the problem is only partially solved :/

        • 1. Re: postBuild.sh fails with latest linux sources (2.1)
          Vincenze

          I described my recompilation experience here: http://hobby.farit.ru/building-yocto-linux-for-intel-edison/

           

          >2. Called setup.sh: ./meta-intel-edison/setup.sh --dl_dir=/.../edison-src/bitbake_download_dir --sstate_dir=/.../edison-src/bitbake_sstate_dir

          You should add the build_dir option with the path to the default build directory: --build_dir=/../edison-src/

          • 2. Re: postBuild.sh fails with latest linux sources (2.1)
            IntelAnonymous

            I thank you very very much, the "build_dir" option was indeed missing! Now my image, even with my own layer, is building fine from scratch.

             

            You described the steps very well within your documentation. I also made some notes. Intel (@CMata_Intel @intel_jorge ?)  should include the following information within the user guide:

             

            1.) git name and email

            Have to be added before starting the build process or the build process may be interrupted at some point

             

            • git config --global user.name "YOUR NAME"
            • git config --global user.email "YOUR EMAIL ADDRESS"

             

            2.) Section 2.3

            The --build_dir option should be mentioned here

             

            3.) Section 2.4

            As far as I remember you have to change manually to the build-folder. But after configure the needed path is being shown.

             

            4.) Section 4.3

            You never ever specify "meta-openembedded" directly in bblayers.conf. You specify a layer of meta-openembedded, e.g. "meta-openembedded/meta-oe". Otherwise bitbake will fail.

             

            These are just examples. Someone should revise the user guide 006 soon.