1 2 Previous Next 17 Replies Latest reply on Dec 21, 2013 3:31 PM by AlexT_Intel

    Problems building the 8.0 firmware

    Clayton Hofrock

      First off the BSP document does not list g++ as one of the required installs, but it is required.

       

      I have tried several times to be able to build the 8.0 firmware, and I have not been able to do so. Every time seems to end with the same error:

       

      ERROR: Nothing PROVIDES 'image-full'

       

      I have tried this on 12.04 and on 13.10 versions of Unbuntu. Both fail. Attached is the output from running on 12.04 on a virtual machine.

        • 1. Re: Problems building the 8.0 firmware
          AlexT_Intel

          I think this is the culprit, though I'm not sure yet what's causing that for you:

          galileo@galileo-VirtualBox:~/galileo8.0/Board_Support_Package_Sources_for_Intel_Quark_v0.8.0/meta-clanton_v0.8.0$ source poky/oe-init-build-env

          You had no conf/local.conf file. This configuration file has therefore been

          created for you with some default values. You may wish to <cut>

           

          That means setup.sh didn't generate a few files it's supposed to generate - local.conf and bblayers.conf - and that can easily result in what you're seeing.

           

          Looking at the setup.sh output in your log I don't see any errors, that's strange - the script doesn't do anything fancy when creating those files, so it should work.

           

          A quick debug way for you would be to add "set -x" at the beginning of the script somewhere - it will show every command it tries to execute. Then post the output here, we'll see what you get.

           

          I'll start downloading Ubuntu 12.04 right now, so that if that's something more serious than a transient glitch, I'll be able to help you debugging further.

          1 of 1 people found this helpful
          • 2. Re: Problems building the 8.0 firmware
            AlexT_Intel

            Ok, I've installed Ubuntu and while working on reproducing your problem I think I've found the reason, it has nothing to do with setup.sh.

             

            In this command (out of the text file you've attached):

            galileo@galileo-VirtualBox:~/galileo8.0/Board_Support_Package_Sources_for_Intel_Quark_v0.8.0/meta-clanton_v0.8.0$ source poky/oe-init-build-env

             

            You haven't specified the build directory ("yocto_build"), the one that setup.sh creates for you, with proper additional bitbake configs providing necessary targets. It's mentioned in the BSP Build Guide, but it's relatively hard to notice in the example :-)

             

            After that the oe-init-build-env has rather legitimately complained about the local.conf absence and created a default directory "build" for you, which doesn't have proper bitbake files and therefore targets.

             

            So after running setup.sh try

            source poky/oe-init-build-env youcto_build

            instead and it should work.

             

            If not - feel free to post here and we'll go from there. Hope this helps :-)

            • 3. Re: Problems building the 8.0 firmware
              Clayton Hofrock

              I think that got me a little farther. But now I am getting an error when trying to compile the strings.c file?

               

              Attaching the end of the output from the bitbake image-full command.

              • 4. Re: Problems building the 8.0 firmware
                AlexT_Intel

                I'm running the build now, let's see if I get the same. I definitely didn't on openSUSE 12.3 x86_64 which is my primary dev system. I've compiled both image-full and image-spi successfully there.

                 

                Generally, it looks like a consequence of reportedly system-default CFLAGS setting for Ubuntu (see here for some details), but I thought these would be redefined in Yocto recipes... I'll dig into that while waiting for the build to finish/fail and report my findings and eventual build results.

                • 5. Re: Problems building the 8.0 firmware
                  AlexT_Intel

                  Well, I see it indeed redefines the CFLAGS variable, moreover I see that elfutils were built just fine for me (the build as a whole is still running).

                   

                  I wonder if your system is lacking some build utility and that makes the configure process fail in such a subtle way?

                   

                  Please post the contents of the config.log file for elfutils package, you should be able to find it under meta-clanton_v0.8.0/yocto_build/tmp/work/i686-linux/elfutils-native/0.148-r11/build directory

                  • 6. Re: Problems building the 8.0 firmware
                    Clayton Hofrock

                    Attached is the file.

                     

                    I am using Unbuntu 13.10

                    • 7. Re: Problems building the 8.0 firmware
                      AlexT_Intel

                      Ah, ok, 13.10 explains it. It's just too new :-) and may cause problems like that with the [older] version of the Yocto provided with Galileo.

                       

                      This specific problem was fixed in later (0.155) version of the elfutils package, as far as I can see (here). So generally I'd suggest you to go one of the three ways:

                       

                      1) Go back to Ubuntu 12.04, which works fine (which is the best way if you want more stability and things proven to work);

                      2) Apply the patch I've referenced above manually by downloading it to poky/meta/recipes-devtools/elfutils/elfutils directory, then add the below line to SRC_URI variable definition in elfutils_0.148.bb in the poky/meta/recipes-devtools/elfutils directory, then rerunning the bitbake image-full command (which is the way if you want to get to the bleeding edge and dive into intimate details of Yocto)

                      file://fix-build-gcc-4.8.patch \

                      3) Do (2) in the automated and "Yocto-correct" way by using the additional layer I've just created:

                          a) If you want to start from scratch:

                      tar xzvf meta-clanton_v0.8.0.tar.gz
                      cd meta-clanton_0.8.0
                      git clone https://github.com/alext-mkrs/meta-alext-galileo
                      ./setup.sh -e "meta-clanton-galileo meta-alext-galileo"
                      source poky/oe-init-build-env yocto_build/
                      bitbake image-full
                      
                      
                      

                          b) If you want to use your existing build env

                      cd meta-clanton_0.8.0
                      git clone https://github.com/alext-mkrs/meta-alext-galileo
                      vim yocto_build/conf/bblayers.conf
                      <append the full path to the meta-alext-galileo dir to the existing list>
                      source poky/oe-init-build-env yocto_build/
                      bitbake image-full
                      
                      
                      
                      1 of 1 people found this helpful
                      • 8. Re: Problems building the 8.0 firmware
                        AlexT_Intel

                        Hmm, I've just finished installing the Ubuntu 13.10 VM and ran the above there - and looks like there's at least another similar problem in the line2addr.c file (the patch above fixes only addr2line.c) :/

                         

                        So realistically the best way would be to use the supported distro version and go to 12.04 unless you want to tackle all those quirks :-)

                        • 9. Re: Problems building the 8.0 firmware
                          Clayton Hofrock

                          I started a build last night using Unbuntu 12.04 on a virtual machine. When I left for work it had been running fro 12 hours and still had hundreds of steps to complete. It sure takes a long time, but it looks like it is working.

                           

                          When it is done, and I have verified that it will works, I will come back with the step by step instructions I used. The document, at least for me was confusing.

                          • 10. Re: Problems building the 8.0 firmware
                            AlexT_Intel

                            Sure. Feel free to report any problems and I'll be glad to help fixing them :-) It turns out to be quite a good way to learn Galileo and Yocto internals, I enjoyed yesterday's Ubuntu 13.10 troubleshooting enough to think about trying to fix it further :-)

                             

                            12 hours is quite a lot, to be honest. I have a Sandy Bridge i5 (4 HT "cores" @2.4GHz) laptop with 8GB RAM (Win7 x64) and on a 12.04 VirtualBox VM with 2 CPUs and 2GB RAM the image-full took about 4 hours to build.

                             

                            Apart from installing Guest Additions I only did one tweak - I've decreased the number of bitbake tasks and make threads by a factor of 2 in the yocto_build/conf/local.conf. I haven't run any specific benchmarking on that, but per the rules of thumb you can find in the internet, for a dual-"processor" VM the default numbers were too high and my perception was there were too many tasks at once competing for resources more than doing actual job.

                             

                            Out of the curiosity, what specs does your VM have, what hypervisor do you use?

                            • 11. Re: Problems building the 8.0 firmware
                              Clayton Hofrock

                              My Host system is an Core-i7-2600 with 8 GB of memory. It only has 4 cores, because I have disabled hyperthreading. Normally I have plenty of processing power.

                               

                              I am new to Virtual Machines so I am using VirtualBox with mostly default settings.

                              My Guest OS unbuntu 12.04 32-bits and I had it constrained down to just 1 core, but it does have 2GB Memory. I will increase the number of cores for the guest OS. I cannot figure out why my system will not run a 64-bit guest OS.

                               

                              The build threw an error. The error is attached.

                              • 12. Re: Problems building the 8.0 firmware
                                AlexT_Intel

                                "arguments list too long" - I'm not 100% sure, but that rings a bell. I think it's caused by too long paths involved into building. Try renaming the intermediate dir I see there "Board_Support_Package_Sources_for_Intel_Quark_v0.8.0" to something short like "bsp0.8.0" or alike and ideally removing some levels of dirs, if you can.

                                 

                                For comparison - I have my build dir as follows and it works fine:

                                /home/galileo/emb_dev/bsp_src/meta-clanton_v0.8.0/yocto_build

                                 

                                As far as the virtualization is concerned - no worries, I've been using various types of it for quite a while, so let's see what we can do here.

                                 

                                First off I suspect you haven't installed so called Guest Additions (see here) - they boost performance a lot, so highly recommended for installation. And I'd recommend to install the Extensions Pack too - it doesn't affect the performance per se, but adds nice features (here's is the newest one)

                                Second, give the VM a second CPU, it's well worth it too. 2GB RAM is fine, as far as I can see on mine.

                                I'd also recommend you to decrease the default values of BB_NUMBER_THREADS and PARALLEL_MAKE variables to 6 and 6 respectively, IMHO these numbers make more sense for a dual-vCPU VM. These are located in meta-clanton_v0.8.0/yocto_build/conf/local.conf

                                 

                                Given the i7, you should be able to run the 64-bit guests. One thing worth checking is whether you have virtualization enabled in BIOS (may be called "VT-d" or "VT-x" or "Intel Virtualization feature", etc.). Here's the VirtualBox FAQ on the matter (search for "Does VB support 64 bit guests").

                                 

                                Message was edited by: Alex T: Added path to local.conf

                                • 13. Re: Problems building the 8.0 firmware
                                  Clayton Hofrock

                                  So that was the final thing that I needed to do to get it to work.

                                   

                                  I also increased the number of cores the virtual machine was using to 4 cores, and when it compiled it was much faster. I was not watching it closely but I think it was within a couple of hours.

                                   

                                  I have put the firmware onto an SD card and booted my Galileo. There are a few more undocumented steps that I had to take. For instance the image directory creates symbolic links with simple file names to link to file with long names. Not sure why that is needed, but I renamed the files to be the simpler names.

                                   

                                  I am going to build it one more time with a fresh 64-bit image and try to record all the steps that I need to take to get the build to work. Including renaming the extremely long file directory names down to something more reasonable.

                                  • 14. Re: Problems building the 8.0 firmware
                                    Clayton Hofrock

                                    Here are the step by step instructions I used to build the 8.0 firmware. My intention is for anyone (even people with no Virtual Machine experience, or Linux experience) can follow these directions.

                                     

                                    If you try this and it does not work, let me know.

                                     

                                    Message was edited by: Clay Hofrock Made some edits to the file. Thanks to Alex's comments.

                                    1 2 Previous Next