Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
1,373 Views

Problems building the 8.0 firmware

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.

17 Replies
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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

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.

Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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 🙂

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

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.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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 https://wiki.ubuntu.com/ToolChain/CompilerFlags# A-Wformat_-Wformat-security 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.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

Attached is the file.

I am using Unbuntu 13.10

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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 (http://permalink.gmane.org/gmane.comp.handhelds.openembedded.scm/66625 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 https://github.com/alext-mkrs/meta-alext-galileo 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 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 https://github.com/alext-mkrs/meta-alext-galileo

vim yocto_build/conf/bblayers.conf

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

bitbake image-full

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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 🙂

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

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.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

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?

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

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.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

"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 https://www.virtualbox.org/manual/ch04.html 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 (http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6-91406.vbox... 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 https://forums.virtualbox.org/viewtopic.php?p=33940# p33940 VirtualBox FAQ on the matter (search for "Does VB support 64 bit guests").

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

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

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.

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

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 &# 13; &# 13; Made some edits to the file. Thanks to Alex's comments.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

Glad to see it works for you & nice instructions, should be easy to follow.

Do you accept suggestions/bug reports on the document? 🙂

Here are some if yes:

  1. Instead of installing g++ separately, there are two nice meta-packages in Ubuntu (Debian): build-essentials and gcc-multilib. They are mentioned at the very beginning of the BSP Build Guide, section 2, at the very end of it. These will provide you with a full set of Linux headers and gcc and friends. These are useful for Guest Additions installation as well as for Galileo Linux building.
  2. Multiple apt-get commands can be replaced with one, like sudo apt-get install git diffstat texinfo gawk chrpath file
  3. Step 12, I think there's a copy'n'paste artifact: mv metaclanton_v0.8.0.tar.gz clanton should probably be mv metaclanton_v0.8.0 clanton, because the unpacked dir name won't have .tar.gz at the end.
  4. There's no mention of installing Guest Additions - these boost performance a lot and rather simple to install after you have build-essentials and gcc-multilib packages installed. I'd strongly recommend adding at least a link to VirtualBox docs I've provided in this thread earlier.

Nice work in any case.

0 Kudos
Highlighted
7 Views

Re: Problems building the 8.0 firmware

I fixed the typos, and changed the installs to be one line (well two with installing the packages from chapter 2 of the BSP document)

Added in a couple of steps to install Guest Additions and to setup the Shared Folders. I initially left them out because they were covered in the linked video and honestly I was tired of typing.

Now it should have all the steps needed. If anyone uses this, I hope it does not take them as long to build it as it took me. It seems like I have been fighting with this for weeks.

0 Kudos
Highlighted
Honored Contributor II
7 Views

Re: Problems building the 8.0 firmware

build-essentials package needs to be installed before the Guest Additions are, otherwise the installer won't be able to build necessary kernel modules, otherwise looks good enough to me! Nice one.

Just as a warning for anyone going to use this - the BSP 0.8.0 referenced in the manual is released per se, but is not yet formally validated to work with current IDE version 1.5.3 (this is the reason it wasn't announced widely yet), so watch out. My own, very limited, testing showed no problems, but YMMV.

0 Kudos