4 Replies Latest reply on May 2, 2017 2:56 PM by Intel Corporation

    Custom .bb file

    gerrik84k

      Hi,

      i trie to make a custom .bb file for my board. i can run bitbake without an error but i'm not able to copy some pre compiled .so files to my device.

       

      SUMMARY = ""

      DESCRIPTION = ""

      HOMEPAGE = ""

      LICENSE = "GPLv2"

      LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=f74cdfd6d7e3a11c3e776b27e7cfa586"

       

       

      SRC_URI = "file://tam_modem_start; \

          file://tam_modem_start.service; \

          file://tam_gateway_upload; \

          file://tam_gateway_upload.service; \

          file://tam_gateway_upload_telematic_hub.json; \

          file://intel_mcu.bin; \

          file://libazure_functions.so; \

          file://libble.so; \

          file://libble_c2d.so; \

          file://libble_printer.so; \

          file://libhello_world.so; \

          file://libidentity_map.so; \

          file://libiothub.so; \

          file://liblogger.so; \

          file://libnative_module_host.so; \

          file://libsimulated_device.so; \

          file://libsqlite.so; \

          file://libtam_gateway.so; \

          file://libTAMGNSS.so; \

          file://libXBee.so; \

          file://COPYING;"

       

       

      PROVIDES = "tam"

       

       

      DEPENDS = " \

        mraa \

        azure-iot-gateway-sdk \

        "

       

       

      #specify where to get the files

      S = "${WORKDIR}"

       

       

      #SYSTEMD_SERVICE

      # When inheriting the systemd class, this variable specifies the systemd service name for a package.

      # When you specify this file in your recipe, use a package name override to indicate the package to which the value applies.

      # Here is an example from the connman recipe:

      # SYSTEMD_SERVICE_${PN} = "connman.service"

                        

      SYSTEMD_SERVICE_${PN} = " \

        tam_modem_start.service \

        tam_gateway_upload.service \

        "

       

       

      FILES_${PN} = "${systemd_unitdir}/system/*"

      FILES_${PN} += "${bindir}/*"

      FILES_${PN} += "${exec_prefix}/bin/*"

      FILES_${PN} += "${libdir}/*.so"

      FILES_${PN} += "${libdir}/lib*.so.*"

      FILES_${PN} += "${base_prefix}/*"

      FILES_${PN} += "${exec_prefix}/lib/*"

      FILES_${PN}-dbg += "${exec_prefix}/lib/.debug"

      FILES_${PN}-dbg += "${exec_prefix}/lib/firmware/.debug"

      FILES_${PN}-dbg += "${exec_prefix}/bin/.debug"

       

       

      ALLOW_EMPTY_${PN} = "1"

       

       

      do_install() {

        mkdir -p 0755 ${D}${exec_prefix}/lib/firmware/

        #mkdir -p 0755 ${D}${exec_prefix}/lib/

        #mkdir -p 0755 ${D}${exec_prefix}/bin/

       

       

        #install -d ${D}${exec_prefix}/lib

        #install -d ${D}${exec_prefix}/bin

        install -d ${D}${exec_prefix}/lib/firmware

        install -d ${D}${systemd_unitdir}/system

       

       

        install -c -m 0777 ${WORKDIR}/tam_modem_start.service ${D}${systemd_unitdir}/system

            install -m 0777 ${WORKDIR}/tam_modem_start ${D}${exec_prefix}/bin

       

       

        install -c -m 0777 ${WORKDIR}/tam_gateway_upload.service ${D}${systemd_unitdir}/system

        install -m 0777 ${WORKDIR}/tam_gateway_upload ${D}${exec_prefix}/bin

       

        install -m 0777 ${WORKDIR}/tam_gateway_upload_telematic_hub.json ${D}${exec_prefix}/bin

       

       

        install -m 0777 ${WORKDIR}/intel_mcu.bin ${D}${exec_prefix}/lib/firmware

       

       

        install -m 0777 ${WORKDIR}/libazure_functions.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libble.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libble_c2d.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libble_printer.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libhello_world.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libidentity_map.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libiothub.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/liblogger.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libnative_module_host.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libsimulated_device.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libsqlite.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libtam_gateway.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libTAMGNSS.so ${D}${exec_prefix}/lib

        install -m 0777 ${WORKDIR}/libXBee.so ${D}${exec_prefix}/lib

       

       

        #ln -s 0777 tam_modem_start.service ${D}${systemd_unitdir}system/multi-user.target.wants/tam_modem_start.service

       

      }

       

      the starnge thing is that tam_modem_start, tam_modem_start.service, tam_gateway_upload, tam_gateway_upload.service, tam_gateway_upload_telematic_hub.json, intel_mcu.bin work fine to copy only all the .so files are not on my target device.

       

      does anybody has a hint on that ?