1 2 3 Previous Next 31 Replies Latest reply on Apr 16, 2015 8:23 PM by metalhouse

    Building Linux image for Galileo Gen 2 in Ubuntu 14.04

    Thuy

      Hi,

       

      I'm new in this area so forgive me if I ask silly questions.

       

      There are many instructions for building Linux image for Galileo, but all of them are for BSP v0.7.5.

      I have tried to build a new Linux image for Galileo in Ubuntu 14.04 many times but I always failed. What I have done is

      I downloaded the Board_Support_Package_for_Intel_Quark_v1.0.1 and edited the

      DISTRO ?= "clanton-full"

       

      and

      IMAGE_ROOTFS_SIZE = "3072000"

       

      then run

      $source poky/oe-init-build-env yocto_build

      $bitbake image-full

       

      And I failed.

       

      I'm not sure where it went wrong? I know someone suggested to use Ubuntu 12.04 but I'm wondering if there is any way to keep the work with Ubuntu 14.04?

      Thanks

        • 1. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
          mhahn

          why not taking a pre-built image?

           

          on your qu:

          hard to tell w/o any logs nor detailled info on what you changed. If you want an eglibc one you could also have a look at meta-intel-iot-devkit - Intel IoT Developer Kit metadata

          • 2. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
            JPMontero_Intel

            Hi Thuy,

             

            Please attach the full log of the error, so we can review what happened during the building.

             

            Regards,
            JPMontero_Intel

            • 3. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
              Thuy

              Another question,

              In the Build and User Guide v1.0.1, page 15, it says:

              --------------------------------

              To build an eglibc image, overwrite the default value of the DISTRO variable as follows:

              DISTRO="clanton-full" bitbake <image-name>

              --------------------------------

               

              It is in section 7, Building the Linux* cross compile toolchain using Yocto.

              If I want to build a Linux image(file systems and kernel with some dev tools) with eglibc, can I do the same as above (changing the DISTRO variable?) or I have to change somewhere else?

               

              Many thanks,

              Thuy

              • 4. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                Thuy

                I got this error when running bitbake, the only thing I changed was the DISTRO variable in the yocto_build/conf/local.conf

                DISTRO = "clanton-full"

                 

                I'm using tar (GNU tar) 1.27.1

                ---------------------------------------------

                thuy@S3-S440:meta-clanton_v1.0.1$ bitbake image-full-galileo

                Pseudo is not present but is required, building this first before the main build

                WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

                WARNING: Unable to get checksum for core-image-minimal-initramfs SRC_URI entry modules.conf: file could not be found

                Parsing recipes: 100% |#########################################| Time: 00:01:21

                Parsing of 1253 .bb files complete (0 cached, 1253 parsed). 1616 targets, 40 skipped, 0 masked, 0 errors.

                 

                 

                Build Configuration:

                BB_VERSION        = "1.18.0"

                BUILD_SYS         = "x86_64-linux"

                NATIVELSBSTRING   = "Ubuntu-14.04"

                TARGET_SYS        = "i586-poky-linux"

                MACHINE           = "clanton"

                DISTRO            = "clanton-full"

                DISTRO_VERSION    = "1.4.2"

                TUNE_FEATURES     = "m32 i586"

                TARGET_FPU        = ""

                meta             

                meta-yocto       

                meta-yocto-bsp    = "clanton:d734ab491a30078d43dee5440c03acce2d251425"

                meta-intel        = "clanton:048def7bae8e3e1a11c91f5071f99bdcf8e6dd16"

                meta-oe           = "clanton:13ae5105ee30410136beeae66ec41ee4a8a2e2b0"

                meta-clanton-distro

                meta-clanton-bsp  = "<unknown>:<unknown>"

                 

                 

                NOTE: Resolving any missing task queue dependencies

                NOTE: Preparing runqueue

                NOTE: Executing SetScene Tasks

                NOTE: Executing RunQueue Tasks

                ERROR: Function failed: sysroot_stage_all (see /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/quilt-native/0.60-r0/temp/log.do_populate_sysroot.31623 for further information)

                ERROR: Logfile of failure stored in: /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/quilt-native/0.60-r0/temp/log.do_populate_sysroot.31623

                Log data follows:

                | DEBUG: Executing python function sstate_task_prefunc

                | DEBUG: Python function sstate_task_prefunc finished

                | DEBUG: Executing python function do_populate_sysroot

                | DEBUG: Executing shell function sysroot_stage_all

                | tar: --same-order option cannot be used with -c

                | Try 'tar --help' or 'tar --usage' for more information.

                | tar: This does not look like a tar archive

                | tar: Exiting with failure status due to previous errors

                | DEBUG: Python function do_populate_sysroot finished

                | ERROR: Function failed: sysroot_stage_all (see /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/quilt-native/0.60-r0/temp/log.do_populate_sysroot.31623 for further information)

                ERROR: Task 10 (/tmp/meta-clanton_v1.0.1/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) failed with exit code '1'

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

                Waiting for 0 running tasks to finish:

                 

                 

                Summary: 1 task failed:

                  /tmp/meta-clanton_v1.0.1/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot

                Summary: There were 2 WARNING messages shown.

                Summary: There was 1 ERROR message shown, returning a non-zero exit code.

                • 5. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                  mhahn

                  seems to be an issue with the version of tar on your machine " tar: --same-order option cannot be used with -c"

                   

                  not sure - maybe some issues with your Yocto on your Ubuntu version ("WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. ")? Others seem to also have faced issues with 14.04 (e.g. Bitbake error)

                  you may check whether there is some more info in the log file mentioned in your output:

                  /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/quilt-native/0.60-r0/temp/log.do_populate_sysroot.31623

                   

                  in case you want to try the eglibc (+uclibc libs included to support Arduino IDE) on meta-intel-iot-devkit - Intel IoT Developer Kit metadata

                  you would have to run

                   

                  $ . ./iot-devkit-init-build-env !

                  $ bitbake iot-devkit-prof-dev-image

                   

                  but I suppose you would need to sort the tar issue as well.

                  • 6. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                    Thuy

                    Many thanks mhahn,

                     

                    I downgraded tar verion to tar 1.25 and that error was gone. However, I'm facing another error

                     

                    --------------------------------------------------------------------------

                    .....

                    | make[2]: Entering directory `/tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/build/src'

                    | rm -f libld_elf.a

                    | ar cru libld_elf.a

                    | ranlib libld_elf.a

                    | gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/tmp/meta-clanton_v1.0.1/yocto

                    ............

                     

                    | gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/share/locale"'  -DDEBUGPRED=0 -DSRCDIR=\"/tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r................

                    ............

                     

                    48-r11/elfutils-0.148/src/addr2line.c: In function 'handle_address':

                    | /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/elfutils-0.148/src/addr2line.c:450:7: error: format '%a' expects argument

                    of type 'float *', but argument 3 has type 'char **' [-Werror=format=]

                    |        if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2

                    |        ^

                    | /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/elfutils-0.148/src/addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]

                    |        switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))

                    |        ^

                    | cc1: all warnings being treated as errors

                    | make[2]: *** [addr2line.o] Error 1

                    | make[2]: *** Waiting for unfinished jobs....

                    | rm i386_ld.o

                    | make[2]: Leaving directory `/tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/build/src'

                    | make[1]: *** [all-recursive] Error 1

                    | make[1]: Leaving directory `/tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/build'

                    | make: *** [all] Error 2

                    | ERROR: oe_runmake failed

                    | ERROR: Function failed: do_compile (see /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/temp/log.do_compile.14854 for further information)

                    ERROR: Task 1207 (virtual:native:/tmp/meta-clanton_v1.0.1/poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb, do_compile) failed with exit code '1'

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

                    Waiting for 0 running tasks to finish:

                     

                    Summary: 1 task failed:

                      virtual:native:/tmp/meta-clanton_v1.0.1/poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb, do_compile

                    Summary: There were 2 WARNING messages shown.

                    Summary: There was 1 ERROR message shown, returning a non-zero exit code.

                    • 7. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                      mhahn

                      looks like an issue with your gcc version vs older versions. Maybe you could make your gcc compile in legacy mode.

                      Have a look at

                      /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/elfutils-0.148/src/addr2line.c:450:7: error: format '%a' expects argument

                      of type 'float *', but argument 3 has type 'char **' [-Werror=format=]

                      |        if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2

                      |        ^

                      | /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/elfutils-0.148/src/addr2line.c:453:7: error: format '%a' expects argument of type 'float *', but argument 3 has type 'char **' [-Werror=format=]

                      |        switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))

                       

                      i.e. all in addr2line


                      /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/x86_64-linux/elfutils-native/0.148-r11/elfutils-0.148/src/addr2line.c:

                       

                       

                      but well, you might face more of those errors and you might be mostly on your own (well, Yocto community might be happy if you fix issues for newer environments). Maybe you could setup a virtual machine with a supported Ubuntu version and build there?

                      • 8. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                        Thuy

                        Thanks mhahn for pointing out the problem. I downgraded gcc from 4.8 to gcc-4.6 and create a symblink gcc to gcc-4.6 and that error was gone. Now there is new error, but I guess I'm getting there.

                         

                        Ok, I'm trying to change the hash code according to this post https://communities.intel.com/docs/DOC-22917

                         

                        ------------------------------------------------------

                        thuy@S3-S440:meta-clanton_v1.0.1$ bitbake image-full-galileoWARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

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

                        Loaded 1617 entries from dependency cache.

                        .....................

                        WARNING: Failed to fetch URL http://zlib.net/pigz/pigz-2.3.tar.gz, attempting MIRRORS if available

                        WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-1.4.6.tar.bz2, attempting MIRRORS if available

                        WARNING: Failed to fetch URL http://www.apache.org/dist/apr/apr-util-1.5.1.tar.gz, attempting MIRRORS if available

                        WARNING: Failed to fetch URL http://www.apache.org/dist/subversion/subversion-1.7.8.tar.bz2, attempting MIRRORS if available

                        WARNING: Failed to fetch URL http://downloads.sourceforge.net/project/libpng/libpng16/1.6.0/libpng-1.6.0.tar.xz, attempting MIRRORS if available

                        WARNING: Failed to fetch URL ftp://ftp.freedesktop.org/pub/mesa/9.0.2/MesaLib-9.0.2.tar.bz2, attempting MIRRORS if available

                        ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:

                        fatal: reference is not a tree: 1cffe9f406cc54f4759fc9eeb85598fb8cae66c7

                        ................

                         

                        ERROR: Logfile of failure stored in: /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/i586-poky-linux/x264/r2230+git-r1/temp/log.do_unpack.30015

                        Log data follows:

                        | DEBUG: Executing python function do_unpack

                        | DEBUG: Executing python function base_do_unpack

                        | DEBUG: Running export SSH_AGENT_PID="2030"; export SSH_AUTH_SOCK="/run/user/1000/keyring-VZkt3A/ssh"; export PATH="/tmp/meta-clanton_v1.0.1/poky/scripts:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/clanton/usr/bin/crossscripts:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/sbin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/bin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/sbin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux//bin:/tmp/meta-clanton_v1.0.1/poky/scripts:/tmp/meta-clanton_v1.0.1/poky/bitbake/bin:/home/thuy/texlive/2013/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export HOME="/home/thuy"; git clone -s -n /tmp/meta-clanton_v1.0.1/yocto_build/downloads/git2/git.videolan.org.x264.git/ /tmp/meta-clanton_v1.0.1/yocto_build/tmp/work/i586-poky-linux/x264/r2230+git-r1/git/

                        | DEBUG: Running export SSH_AGENT_PID="2030"; export SSH_AUTH_SOCK="/run/user/1000/keyring-VZkt3A/ssh"; export PATH="/tmp/meta-clanton_v1.0.1/poky/scripts:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/clanton/usr/bin/crossscripts:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/sbin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/usr/bin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux/sbin:/tmp/meta-clanton_v1.0.1/yocto_build/tmp/sysroots/x86_64-linux//bin:/tmp/meta-clanton_v1.0.1/poky/scripts:/tmp/meta-clanton_v1.0.1/poky/bitbake/bin:/home/thuy/texlive/2013/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export HOME="/home/thuy"; git checkout 1cffe9f406cc54f4759fc9eeb85598fb8cae66c7

                        | DEBUG: Python function base_do_unpack finished

                        | DEBUG: Python function do_unpack finished

                        | ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:

                        | fatal: reference is not a tree: 1cffe9f406cc54f4759fc9eeb85598fb8cae66c7

                        |

                        ERROR: Task 2379 (/tmp/meta-clanton_v1.0.1/meta-oe/meta-oe/recipes-multimedia/x264/x264_git.bb, do_unpack) failed with exit code '1'

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

                        Waiting for 0 running tasks to finish:

                         

                         

                        Summary: 1 task failed:

                          /tmp/meta-clanton_v1.0.1/meta-oe/meta-oe/recipes-multimedia/x264/x264_git.bb, do_unpack

                        Summary: There were 7 WARNING messages shown.

                        Summary: There was 1 ERROR message shown, returning a non-zero exit code.

                        • 9. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                          mhahn

                          if it continues failing this way you might also download manually to your local system and put in Yocto a "file" URL rather than a "http"

                          • 10. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                            JPMontero_Intel

                            Hi Thuy,

                             

                            Have you tried by following this guide https://communities.intel.com/docs/DOC-22917? It seems you are getting a similar error, give it a try and let us know if it worked for you.

                             

                            Regards,
                            JPMontero_Intel

                            • 11. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                              Thuy

                              Thanks JPMontero_Intel,

                              Yes, I did that and it past, and I got another error. When I restarted my laptop, the folder meta-clanton_v1.0.1 was all gone (I put it in /tmp for short).

                              Now I'm back to the start.

                               

                              Thuy

                              • 12. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                                mhahn

                                Your /tmp folder might be mounted to tmpfs, i.e. to RAM. I.E. contents there would always be lost after reboot.

                                • 13. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                                  Thuy

                                  Thanks mhahn, I'm now working on home directory

                                  What I have done so far are

                                  1. downgrade to tar 1.25, gcc & g++-4.6, and git-1.8.1

                                  2. change the hash code in /meta-clanton_v1.0.0/meta-oe/meta-oe/recipes-multimedia/x264/x264_git.bb

                                   

                                  I still have 1 error and warnings but the job is still running (6.5 hours so far)

                                   

                                  ------------------------------------------

                                  WARNING: Failed to fetch URL http://downloads.sourceforge.net/project/libpng/libpng16/1.6.0/libpng-1.6.0.tar.xz, attempting MIRRORS if available

                                  WARNING: Failed to fetch URL ftp://ftp.freedesktop.org/pub/mesa/9.0.2/MesaLib-9.0.2.tar.bz2, attempting MIRRORS if available

                                  WARNING: Failed to fetch URL http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2d.tar.gz, attempting MIRRORS if available

                                  WARNING: Failed to fetch URL http://downloads.sourceforge.net/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2, attempting MIRRORS if available

                                  ERROR: Fetcher failure: Fetch command failed with exit code 8, output:

                                  http://downloads.sourceforge.net/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2:

                                  2014-09-19 01:25:07 ERROR 404: Not Found.

                                   

                                   

                                  ERROR: Function failed: Fetcher failure for URL: 'http://downloads.sourceforge.net/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2'. Unable to fetch URL from any source.

                                  ERROR: Logfile of failure stored in: /home/thuy/meta-clanton_v1.0.1/yocto_build/tmp/work/i586-poky-linux/opencv/2.4.3-r2/temp/log.do_fetch.28154

                                  ERROR: Task 461 (/home/thuy/meta-clanton_v1.0.1/meta-oe/meta-oe/recipes-support/opencv/opencv_2.4.3.bb, do_fetch) failed with exit code '1'

                                  Waiting for 1 running tasks to finish:

                                  0: linux-yocto-clanton-3.8-r0 do_fetch (pid 26626)

                                   

                                  --------------------------------------------

                                   

                                  I know that mhahn suggested to download manually and but into files, but I'm wondering why it doesn't work with wget, git, etc when comes to fetch some files from http and ftp.

                                  And the link http://downloads.sourceforge.net/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2 will redirect to OpenCV - Browse Files at SourceForge.net

                                  and bitbake can't fetch it.

                                   

                                  Thuy

                                  • 14. Re: Building Linux image for Galileo Gen 2 in Ubuntu 14.04
                                    mhahn

                                    can't tell you on the fetch. At the end all the bitbake controls are Python scripts. You might have a look in there & put some debug output messages to understand what happens in the fetch state.

                                    1 2 3 Previous Next