12 Replies Latest reply on Jul 8, 2015 8:13 AM by arfoll

    Adding mraa into image-full for bitbake

    M_Sherlock

      Hi,
      I am trying to add mraa headers into the image-full.bb file so i can add it into the bitbake receipe

       

       

      mraa: Building libmraa

      i have tried adding in

      IMAGE_INSTALL += "swig"               //this is a dependency i think
      IMAGE_INSTALL += "mraa upm"

       


      but i get back     

       

      ERROR: Nothing RPROVIDES 'mraa' (but /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-iot-devkit/recipes-core/images/image-full.bb RDEPENDS on or otherwise requires it)

      NOTE: Runtime target 'mraa' is unbuildable, removing...

      Missing or unbuildable dependency chain was: ['mraa']

      ERROR: Required build target 'image-full' has no buildable providers.

      Missing or unbuildable dependency chain was: ['image-full', 'mraa']

       

      any ideas on how to add this to the receipe ?

       

      Mark

        • 1. Re: Adding mraa into image-full for bitbake
          CMata_Intel

          Hi M_Sherlock

           

          Could you attach the whole recipe you are writing? Are you creating recipes from scratch for the dependencies as well?

           

          Regards,
          CMata

          • 2. Re: Adding mraa into image-full for bitbake
            M_Sherlock

            Its just the basic Image-full recipe with those 2 lines added

             

            Attached below

            • 3. Re: Adding mraa into image-full for bitbake
              JPMontero_Intel

              Hi M_Sherlock,

               

              Make sure you have the layer meta-intel-iot-middleware/recipes-devtools/ in your build. In case it is not in there you can add it with the following command:

              git clone -b daisy git://git.yoctoproject.org/meta-intel-iot-middleware

              Once you know it’s in there add it to the list of layers in bblayers.conf. Then try building only mraa with the command bitbake mraa. If the mraa build fails attach the error log.

               

              Regards,
              JPMontero_Intel

              • 4. Re: Adding mraa into image-full for bitbake
                M_Sherlock

                mraa build failed,
                Here is the error

                 

                 

                 

                ERROR: Traceback (most recent call last):

                  File "/home/mark/v1.1/meta-clanton_v1.1.0-dirty/bitbake/lib/bb/cookerdata.py", line 163, in wrapped

                    return func(fn, *args)

                  File "/home/mark/v1.1/meta-clanton_v1.1.0-dirty/bitbake/lib/bb/cookerdata.py", line 173, in parse_config_file

                    return bb.parse.handle(fn, data, include)

                  File "/home/mark/v1.1/meta-clanton_v1.1.0-dirty/bitbake/lib/bb/parse/__init__.py", line 99, in handle

                    return h['handle'](fn, data, include)

                  File "/home/mark/v1.1/meta-clanton_v1.1.0-dirty/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 147, in handle

                    feeder(lineno, s, abs_fn, statements)

                  File "/home/mark/v1.1/meta-clanton_v1.1.0-dirty/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 184, in feeder

                    raise ParseError("unparsed line: '%s'" % s, fn, lineno);

                ParseError: ParseError at /home/mark/v1.1/meta-clanton_v1.1.0-dirty/yocto_build/conf/bblayers.conf:15: unparsed line: 'BBLAYERS ?= " /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-iot-devkit /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-yocto /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-quark-bsp /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-galileo /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-intel-iot-middleware '

                 

                ERROR: Unable to parse /home/mark/v1.1/meta-clanton_v1.1.0-dirty/yocto_build/conf/bblayers.conf: ParseError at /home/mark/v1.1/meta-clanton_v1.1.0-dirty/yocto_build/conf/bblayers.conf:15: unparsed line: 'BBLAYERS ?= " /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-iot-devkit /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-yocto /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-quark-bsp /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-galileo /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-intel-iot-middleware '

                • 5. Re: Adding mraa into image-full for bitbake
                  JPMontero_Intel

                  M_Sherlock, Could you attach bblayers.conf file?

                   

                  Regards,
                  JPMontero_Intel

                  • 6. Re: Adding mraa into image-full for bitbake
                    M_Sherlock

                    i added

                     

                    /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-intel-iot-middleware \

                     

                    into the file bblayers.conf located at /home/mark/v1.1/meta-clanton_v1.1.0-dirty/yocto_build/conf

                     

                    and then ran
                    bitbake mraa and got the error above

                     

                     

                     

                    This is now my bblayers.conf file

                     

                    # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

                    # changes incompatibly

                    LCONF_VERSION = "6"

                     

                    BBPATH = "${TOPDIR}"

                    BBFILES ?= ""

                     

                    BBLAYERS ?= " \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-iot-devkit \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-yocto \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-quark-bsp \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-galileo \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-intel-iot-middleware \

                     

                    "

                    BBLAYERS_NON_REMOVABLE ?= " \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta \

                      /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-yocto \

                      "

                    • 7. Re: Adding mraa into image-full for bitbake
                      JPMontero_Intel

                      Hi M_Sherlock,


                      I was able to replicate your error. Let me investigate further into this.


                      Regards,
                      JPMontero_Intel

                      • 8. Re: Adding mraa into image-full for bitbake
                        M_Sherlock

                        The problem is the parsing of the string
                        the double CR LF  after  middlemare \  breaks it

                         

                         

                         

                        remove the return and it will work

                          /home/mark/v1.1/meta-clanton_v1.1.0-dirty/meta-intel-iot-middleware \

                        "


                        I am now having an issue with it finding the header file

                        I set the environment.

                        and then compile the file
                        but there is an error as shown

                         

                         

                         

                         

                        [mark@localhost ~]$ source /opt/iot-devkit/1.6.1/environment-setup-i586-poky-linux

                        [mark@localhost ~]$ ${CC} GalileoSpaces.c -o strings2

                        GalileoSpaces.c:11:23: fatal error: mraa/gpio.h: No such file or directory

                        #include <mraa/gpio.h>

                                               ^

                        compilation terminated.

                        [mark@localhost ~]$

                        • 9. Re: Adding mraa into image-full for bitbake
                          JPMontero_Intel

                          M_Sherlock, I was able to build the rmaa package without issues. These are the steps I followed.

                           

                          7z e Board_Support_Package_Sources_for_Intel_Quark v1.1.0.7z
                          tar xf meta-clanton_v1.1.0-dirty.tar.gz
                          cd meta-clanton*
                          ./setup.sh
                          source ./iot-devkit-init-build-env yocto_build
                          Added meta-intel-iot-devkit in conf/bblayers.conf

                          Check the layers used with the command bitbake-layers show-layers

                          Check the name of the rmaa recipe bitbake-layers show-recipes | grep mraa

                          bitbake -v mraa

                           

                          Additionally I installed libsdl1.2 with the command suggested in this site, which was missing from my OS. I’m using Ubuntu 14.04. Try this and let me know if it work for you as well. If it does you should be able to add it to the Yocto file system build.

                           

                          About the error with the headers, you are using the SDK to cross compile, right? Check the folder with the file system in the SDK and search for /usr/include/mraa. If you have the files try with the following command:

                           

                          ${CC} GalileoSpaces.c -lmraa -o strings2

                          Let me know if it compiles the file without errors.

                           

                          Regards,
                          JPMontero_Intel

                          1 of 1 people found this helpful
                          • 10. Re: Adding mraa into image-full for bitbake
                            CMata_Intel

                            Hi Mark,

                             

                            Were you able to try the suggestions from JPMontero?

                             

                            Regards,

                            Charlie

                            • 11. Re: Adding mraa into image-full for bitbake
                              M_Sherlock

                              Hi

                               

                              tried it, didn't work.
                              got it to bitbake fine but couldnt get it to pick up the headers in the crosscompile

                               

                              made my own library to call the system calls and got it working that way

                               

                              Regards
                              Mark