1 2 3 4 Previous Next 44 Replies Latest reply on Jan 20, 2016 7:37 AM by wayneomahony

    I Compiled the Poky Distribution. Now what?

    ecf_in_md

      I followed the very helpful instructions on Sergei's blog and finally got a compiled version of Poky. Unfortunately, it seems exactly the same as what is available in the SD card Linux download on the Intel site. I was hoping to add development tools to it. I did some reading of the Yocto Quickstart documents, but didn't find anything about modifying the image it creates. Any quick pointers about how to add things to the distro like the gcc tool chain or an updated kernel would be appreciated. I see that all that the full gcc tool chain was compiled for the host platform, but for the target.

       

      In doing the compile I learned some things that I thought I would pass along.

       

      I was unable to get the build to work on Centos 5.7 or 5.10. It seems that the version of Python (2.4.x) is too old and the build failed very early. As I recall, it failed in generating the build environment. The list of supported distributions on the Yocto site indicates that these should work, but the wiki, which I found later, said that they don't. Anyway, I already had a VM with this installed so trying it wasn't very painful.

       

      I was unable to get the build to work on Fedora 20. There was an error building guile that I could not figure out. I probably should have run bitbake with the Debug switch.

       

      The build worked using Centos 6.5. I used the min install iso and added the packages indicated in the Yocto Quickstart Guide.

       

      The build takes lots of disk space. Since I am running Linux on a Mac under Parallels running on an SSD my space is a bit constrained. In the Yocto quickstart it mentions adding:

      INHERIT += "rm_work"

      to the conf/local.conf file (under the yocto_build subdirectory). I did this and it substantiall reduced the disk space from over 15 GB to about 4 GB.

       

      Not surpisingly, increasing the number of CPUs available for the build in the VM speed the compile up quite a bit.

       

      The build failed when the VM had 1 GB of memory but succeeded with 2 GB. In all cases I was running a pretty bare-bones version of Linux with no GUI running and accessing it via ssh over a virtual network. So, I think most of the memory was being used by the build. I used the default number of threads (12), so perhaps reducing that would have used less memory.

        • 1. Re: I Compiled the Poky Distribution. Now what?
          Thomas_Faust_(Intel)

          Hi ecf_in_md

           

          I followed Sergei's blog as well and created an image with devtools. (For all readers who don’t know Sergei's blog, here it is: http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage)

           

          You are talking about many issues in your post. Which one is blocking you and needs to be resolved first?

          Let me address the your first one “Unfortunately, it seems exactly the same as what is available in the SD card Linux download on the Intel site.”

           

          I guess after a successful ‘bitbake image-sdk’ you found the files in ‘tmp/deploy/images/ directory’. Correct? (Important is the ‘image-sdk’, not ‘image-full’ !)

          There should be the 3GB .ext3 file. You should copy them over to the SD card and boot.

           

          As soon you have booted your Galileo board with the new files on the SD card, you do an ‘df –h’. (After login as root with no password)

          It should look like similar to this:

          Filesystem      Size Used Avail Use% Mounted on

          /dev/loop0      2.9G 1.8G  1.1G  63% /

          If it’s not the 3GB, the wrong image has booted.

           

          One reason for this could be: “Update the boards' firmware. Older firmware has a bug that prevents booting from SD card.”

           

          If the correct image from the SD card has booted, you will find the devtools, like ‘make’ (GNU make 3.82) and ‘gcc’ (GCC 4.7.2) and package management ‘opkg’ (opkg version 0.1.8)

           

          Tom

          • 2. Re: I Compiled the Poky Distribution. Now what?
            ecf_in_md

            Tom,

            Many thanks for your help. When I ran bitbake I built image-full and got only a 300 MB image file. I just tried building image-sdk and got a message saying "ERROR: Nothing PROVIDES 'image-sdk'. When I started the process I downloaded the file pointed to by the link:

            However, I see there is also another link:

            Is that what I should have started with?

             

            Eric

            • 3. Re: I Compiled the Poky Distribution. Now what?
              ecf_in_md

              By the way, the items at the end of the post were not problems. I mentioned them only to help someone else trying to build the distribution do it without the false starts that I had.

              Eric

              • 4. Re: I Compiled the Poky Distribution. Now what?
                Thomas_Faust_(Intel)

                To be able to build ‚image-sdk‘, you need to follow Sergey’s blog.

                The bitbake recipe for image-sdk is copied from the image-bull.bb and modified to include features like devtools (see section “Building Linux Standard Base (LSB) Image” in blog)

                After that, ‘bitbake image-sdk’ should work (takes almost 3 times as long as image-full to build and creates the 3GB image)

                • 5. Re: I Compiled the Poky Distribution. Now what?
                  ecf_in_md

                  I guess I misunderstood that compiling LSB was necessary. I did as instructed above but unfortunately got 1 error. It is in the compliation of attr. It seems it wants an internationalized version of the gettext library and fails when trying to link against it. There are lots of error messages like this:

                  /meta-clanton_v0.7.5/yocto_build/tmp/work/i586-poky-linux/attr/2.4.46-r4/attr-2.4.46/setfattr/setfattr.c:254: undefined reference to `libintl_gettext'

                   

                  I did some googling for this message and it mentions using -lintl instead of -lintl_gettext. I looked in sudirectories of the yocto_build/tmp directory and there are lots of libintl.a:

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/image/usr/lib/libintl.a

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/sysroot-destdir/usr/lib/libintl.a

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/build/gettext-tools/intl/.libs/libintl.a

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/build/gettext-runtime/intl/.libs/libintl.a

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/package/usr/lib/libintl.a

                  ./tmp/work/i586-poky-linux/gettext/0.18.2-r0/packages-split/gettext-staticdev/usr/lib/libintl.a

                  ./tmp/sysroots/clanton/usr/lib/libintl.a

                   

                  I poked around a bit in what I think is the directory that attr is built in:

                  tmp/work/i586-poky-linux/attr/2.4.46-r4/attr-2.4.46

                  I see some stuff in the output of the autoconf logs about finding libint.h. I also grepped for intl_gettext in the directory and subdirectories and they are in the object files for attr and several other commands. I am guessing those are the names of the link libraries. However, I can't see anything in any of the Makefiles linking it. I am guessing that I need to make a patch and add it to the recipes, but don't know enough about the build environment to do that. Any quick hints about what to do?

                   

                  Eric

                   

                  I don't understand the full build process, but the names of these make me think that at least one of these would be in the link directory. I guess what needs to be done is to patch the

                  • 6. Re: I Compiled the Poky Distribution. Now what?
                    Thomas_Faust_(Intel)

                    Believe it or not, I did had the very same issue with building ‘attr’ – undefined reference of ‘libintl_gettext’.

                    I played with the bb recipe for some time and checked dependencies, but couldn’t figure it out.

                     

                    I gave up for this day (I was doing it in the background on my desk in the company) also because I was running into issues with fetching packages that needed to clone a git repository. Setting up Yocto to run behind a firewall seems like rocket science.

                    Later that day – at home – I ran the whole thing again. Without any ‘git clone’ issues – and without the link issues in ‘attr’.

                    I can’t tell you if the proxy issues and the link issues are related, but you might want to check it.

                     

                    Are you behind a proxy? Are you http, https, git and ftp proxies all correct?

                    • 7. Re: I Compiled the Poky Distribution. Now what?
                      rmm200

                      Build errors in my case were due to building a full image after a tiny image. Start clean and only do the image-SDK build and your errors should go away. Switching from ulibc to glibc really messed a lot of things up in the build. And blessings upon Sergey for all he has done for this community.

                      • 8. Re: I Compiled the Poky Distribution. Now what?
                        ecf_in_md

                        Thanks for your answers. I am not behind a proxy at work and it failed at home too. It was, however, on the same computer so perhaps cleaning it is needed. I tried:

                        bitbake -c clean image-full

                        and

                        bitbake -c clean image-sdk

                        Then

                        bitbake image-sdk

                        It failed again on attr with the same error related to a missing reference to libintl_gettext.

                         

                        When you say start clean do you mean blow everything away and start from the beginning?

                         

                        Also, before you do that, can you tell me what Linux distribution you are using to build? I am using CentOS 6.5, though have also tried Centos 5.7 and 5.10 and Fedora 20. I get a warning saying that CentOS 6.5 is not a verified distribution. However, I'd rather not downgrade to CentOS 6.2 unless necessary.

                         

                        I echo the kudos to Sergey for his posts. Without them I wouldn't have been able to do anything remotely useful with the board.

                         

                         

                        Eric

                        • 9. Re: I Compiled the Poky Distribution. Now what?
                          rmm200

                          I used the clancy-full distribution. And by clean build I mean delete the pokey_build directory. Bitbake -clean won't do it.

                          Good luck!

                          • 10. Re: I Compiled the Poky Distribution. Now what?
                            ecf_in_md

                            Thanks for everyone's help. I finally got the full sdk built. rmm200 was correct: residual stuff from my first attempt at building, which uses ulibc, seemed to have left things in a state that interfered with the full build. I also found that I needed to up memory again in my VM. I don't know the minimum, but 8 GB did work. I used CentOS 6.5 to do the build and it seems to have worked despite the warnings.

                             

                            I followd the instructions on Sergey's blog and installed the image on my SD Card. I used the option that allows specifying an the root image so now I can boot into either the Intel SD Card image or the full LSB image with the SDK.

                             

                            The distribution booted fine and I now have access to gcc, etc. However, over the serial line there were a stream of messages about the clloader. I gather it is failing because it requires ulibc. So, the arduino sketches won't run and there is no need for that stuff in the inittab. I commented out the two lines relating to that in /etc/inittab:

                            #grst:5:respawn:/opt/cln/galileo/galileo_sketch_reset -v

                            #clld:5:respawn:/etc/init.d/clloader.sh

                             

                            One problem I am having, both with the new image and the Intel SD card image is that reboot does not seem to work. Using either the reboot command, shutdown -r, or pressing the on-board Linux reboot button shuts the system down but it does not reboot. I must power cycle it to get it to work. Is anyone else having that problem?

                             

                            Eric

                            • 11. Re: I Compiled the Poky Distribution. Now what?
                              rmm200

                              Reboot is indeed busted. You need a new spi image (assuming 0.8.0), built with ulibc.

                              I am not about to give up my full image, and I don't have room for another 50GB build disk, so I will live

                              with unplugging my board to reboot.  As noted elsewhere, if your usb cable is plugged in and you disconnect power,

                              the Galileo may self-destruct. Be careful.

                               

                              Eventually, Intel will get around to releasing a 0.8.0 version of the spi image. I will wait for it.

                              • 12. Re: I Compiled the Poky Distribution. Now what?
                                Thomas_Faust_(Intel)

                                Eric,

                                You reboot issue will be gine with the BSP 0.8.0.

                                See this thread:

                                Reboot button after firmware upgrade

                                1 of 1 people found this helpful
                                • 13. Re: I Compiled the Poky Distribution. Now what?
                                  az_ire

                                  I am trying to build the image according to Sergey's blog, but i am running into a compile error,

                                   

                                  it is to do with  elfutils_0.148.bb, error is on_compile, this seems to be a known issue, see it discussed here Discussion of all things about the Yocto Project (), but i dont know how to fix it.

                                  • 14. Re: I Compiled the Poky Distribution. Now what?
                                    ecf_in_md

                                    I think I got the same error when I was trying to build the image-sdk after building image-full. Image-full uses ulibc, but Sergey's instructions for preparing image-sdk result in using eglibc. As pointed out by rmm200 above, you need to start clean when building image-sdk. I did this by blowing away the previous stuff (everything) and starting at the beginning of Sergey's instructions. The key is not to do the bitbake image-full, but at that point skip down to the instructions for building the LSB sdk. When I did that, and had enough memory (8 GB) and disk space (almost 30 GB) I was able to build the full sdk.

                                     

                                    Are you trying to build image-full or image-sdk. Note that image-full is the same as what is provided by Intel to download and boot from the SD card. It does not include native development tools.

                                     

                                    Eric

                                    1 2 3 4 Previous Next