Hi Phillipe,

I've found that the libraries are built (libnotification_consumer.so
and libnotification_provider.so), but simply weren't copied over when
building the image. I've adapted the recipe to do this now.

I've created a patch file (see attached). Should I submit this on
Gerrit? (I'm new to working on larger existing projects)

I've changed the following:
 - Added some extra files for Easy Setup: includes and executables
related to the enrollee. (Files for the mediator are already present.)
 - Added support for Notification service. This will copy libraries,
includes and samples similar to how Easy Setup is handled.

I've mostly mirrored how Easy Setup is configured, so please check if
this makes any sense (especially for the tests, since I haven't used
those).

With kind regards,
Koenraad



diff --git a/recipes-core/iotivity/iotivity_1.2.1.bb
b/recipes-core/iotivity/iotivity_1.2.1.bb
index 344db21..9b2f13f 100644
--- a/recipes-core/iotivity/iotivity_1.2.1.bb
+++ b/recipes-core/iotivity/iotivity_1.2.1.bb
@@ -285,6 +285,7 @@ do_install() {

     #Easy setup app
     make_dir ${IOTIVITY_BIN_DIR_D}/examples/service/easy-setup
+    copy_exec 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/easy-setup/sampleapp/enrollee/linux/enrollee
${IOTIVITY_BIN_DIR_D}/examples/service/easy-setup
     copy_exec 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/easy-setup/sampleapp/mediator/linux/richsdk_sample/mediator_rich
${IOTIVITY_BIN_DIR_D}/examples/service/easy-setup

     #Easy setup tests
@@ -293,6 +294,22 @@ do_install() {
         copy_exec
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/easy-setup/mediator/richsdk/unittests/easysetup_mediator_test
${IOTIVITY_BIN_DIR_D}/tests/service/easy-setup
     fi

+    #Notification
+    copy_file 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/libnotification_consumer.so
${D}${libdir}
+    copy_file 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/libnotification_provider.so
${D}${libdir}
+
+    #Notification app
+    make_dir ${IOTIVITY_BIN_DIR_D}/examples/service/notification
+    copy_exec 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/notification/examples/linux/notificationconsumer
${IOTIVITY_BIN_DIR_D}/examples/service/notification
+    copy_exec 
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/notification/examples/linux/notificationprovider
${IOTIVITY_BIN_DIR_D}/examples/service/notification
+
+    #Notification tests
+    if ${@bb.utils.contains('EXTRA_OESCONS', 'SECURED=1', 'false',
'true', d)}; then
+        make_dir ${IOTIVITY_BIN_DIR_D}/tests/service/notification
+        copy_exec
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/notification/unittest/notification_consumer_test
${IOTIVITY_BIN_DIR_D}/tests/service/notification
+        copy_exec
${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/service/notification/unittest/notification_provider_test
${IOTIVITY_BIN_DIR_D}/tests/service/notification
+    fi
+
     #Scene manager
     copy_file ${S}/out/yocto/${IOTIVITY_TARGET_ARCH}/release/libscene_manager.a
${D}${libdir}

@@ -317,6 +334,7 @@ do_install() {
     make_dir ${D}${includedir}/iotivity/service/easy-setup/enrollee/
     make_dir ${D}${includedir}/iotivity/service/easy-setup/mediator/csdk/
     make_dir ${D}${includedir}/iotivity/service/easy-setup/mediator/richsdk/
+    make_dir ${D}${includedir}/iotivity/service/notification/
     make_dir ${D}${includedir}/iotivity/service/scene-manager/

     #Resource container
@@ -333,8 +351,12 @@ do_install() {

     #Easy setup
     copy_file_recursive ${S}/service/easy-setup/inc
${D}${includedir}/iotivity/service/easy-setup
+    copy_file_recursive ${S}/service/easy-setup/enrollee/inc
${D}${includedir}/iotivity/service/easy-setup/enrollee
     copy_file_recursive ${S}/service/easy-setup/mediator/richsdk/inc/
${D}${includedir}/iotivity/service/easy-setup/mediator/richsdk/

+    #Notification
+    copy_file_recursive ${S}/service/notification/include
${D}${includedir}/iotivity/service/notification
+
     #Scene manager
     copy_file_recursive ${S}/service/scene-manager/include
${D}${includedir}/iotivity/service/scene-manager/

@@ -438,6 +460,8 @@ FILES_${PN}-service = "\
         ${libdir}/libHueBundle.so \
         ${libdir}/libESEnrolleeSDK.so \
         ${libdir}/libESMediatorRich.so \
+        ${libdir}/libnotification_consumer.so \
+        ${libdir}/libnotification_provider.so \
         ${libdir}/librcs_client.so \
         ${libdir}/libTestBundle.so"

@@ -454,6 +478,7 @@ FILES_${PN}-service-samples-dbg = "\
         ${IOTIVITY_BIN_DIR}/examples/service/resource-container/.debug \
         ${IOTIVITY_BIN_DIR}/examples/service/resource-directory/.debug \
         ${IOTIVITY_BIN_DIR}/examples/service/easy-setup/.debug \
+        ${IOTIVITY_BIN_DIR}/examples/service/notification/.debug \
         ${IOTIVITY_BIN_DIR}/examples/service/scene-manager/.debug"

 FILES_${PN}-service-samples = "\
@@ -463,6 +488,7 @@ FILES_${PN}-tests-dbg = "\
         ${libdir}/.debug/libgtest.so \
         ${libdir}/.debug/libgtest_main.so \
         ${IOTIVITY_BIN_DIR}/tests/service/easy-setup/.debug \
+        ${IOTIVITY_BIN_DIR}/tests/service/notification/.debug \
         ${IOTIVITY_BIN_DIR}/tests/resource/.debug \
         ${IOTIVITY_BIN_DIR}/tests/service/resource-container/.debug \
         ${IOTIVITY_BIN_DIR}/tests/service/resource-encapsulation/.debug \



On 31 March 2017 at 19:26, Philippe Coval <philippe.coval.pro at gmail.com> 
wrote:
>
> On Fri, Mar 31, 2017 at 5:16 PM, Koenraad Verheyden
> <koenraad.verheyden at gmail.com> wrote:
>>
>> Hello,
>>
>> I'm building an application for an embedded device using the Yocto
>> meta-oic layer. I've set up the layers using this guide.
>
>
>
>
>>
>> I have made an application using the OC stack and the Easy Setup service
>> (as enrollee). Now I wanted to add the Notification Service as well.
>
>
> You can use this page to explain to community too:
> https://wiki.iotivity.org/yocto
>
>>
>>
>> Setting up my build chain for Easy Setup was really easy. I did some
>> includes and linked against libESEnrolleeSDK.so (can be found at /usr/lib/
>> of the sysroot).
>
>
> Good,
>
>>
>> But for Notification Service it seems there's no equivalent? Is this a
>> configuration mistake in my Yocto build?
>>
>>
>
> On yocto, so far only default settings are supported, if it is not working
> out of the box please report bugs,
> then for next release 1.3 we can ensure those will work, or eventually
> backport fixes to 1.2.1 or earlier.
>
> I will update wiki page about building master branch, if unclear.
>
> Maybe comparing to Tizen package could help too:
> https://wiki.iotivity.org/tizen
>
> Hope this help.
>
> --
> https://wiki.tizen.org/wiki/User:Pcoval
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iotivity_services.patch
Type: application/octet-stream
Size: 4575 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170404/2baf4c20/attachment.obj>

Reply via email to