Hi, 

we are trying to integrate opensync onto a RDK-B platform. there are some official documents on opensync website but the information is not clear on how to integrate. can someone help me out on how to compile opensync on RDK-B.

  • No labels

26 Comments

  1. HI SHAMANTHA KUMAR,

    Could you please let us know the target device in which you wanted to intergrate the opensync? and which release code base you are referring too?

    Thanks and Regards
    Srinivas

    1. Thank you for the reply srinivas.

      we have taken x86 as the target device.

      and code base we are using is..

      RDK-B: rdkb-2019q3

      opensync: 1.4.0.1

      Also could you please share us the updated steps/documents if any on integration.

    1. Hi Srinivas,

      Thank you for your response.

      1.We are following the same documents but facing issues while compiling opensync

      -----------------------------------------------------------------------------------------------------------------------------------------------

      compile [osync_hal] platform/rdk/src/lib/osync_hal/src/init.c
      i586-rdk-linux-gcc -m32 -march=i586 -fno-omit-frame-pointer -fno-optimize-sibling-calls --sysroot=/Dakota_Drive/RDK_B/emulator2/build-qemux86broadband-dev/tmp/sysroots/qemux86broadband-dev -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-label -Wno-strict-aliasing -fasynchronous-unwind-tables -Wno-error=cpp -I/Dakota_Drive/RDK_B/emulator2/build-qemux86broadband-dev/tmp/sysroots/qemux86broadband-dev/usr/include/protobuf-c -DLOG_ENABLE_RDKLOG -g -DUSE_QM -DBUILD_REMOTE_LOG -DTARGET_RDKB -DTARGET_NAME="\"RDKB\"" -Iplatform/rdk/src/lib/osync_hal/inc -Iplatform/rdk/src/lib/devinfo/inc -Iplatform/rdk/src/lib/pl2rl/inc -Isrc/lib/common/inc -fasynchronous-unwind-tables -Isrc/lib/osa/inc -Isrc/lib/const/inc -Isrc/lib/crt/inc -Isrc/lib/daemon/inc -Isrc/lib/datapipeline/inc -Isrc/lib/ds/inc -Isrc/lib/evsched/inc -Isrc/lib/evx/inc -Isrc/lib/execsh/inc -Isrc/lib/json_util/inc -DJSON_MEMDBG -include "work/RDKB/kconfig/config_default.h" -Isrc/lib/kconfig/inc -Isrc/lib/log/inc -Isrc/lib/osa/inc -Isrc/lib/osa/inc -fasynchronous-unwind-tables -Isrc/lib/osn/inc -Isrc/lib/osn/inc -Isrc/lib/ovsdb/inc -Isrc/lib/pjs/inc -Isrc/lib/read_until/inc -Iwork/RDKB/obj/src.lib.schema -Isrc/lib/schema/inc -Isrc/lib/common/inc/ -Isrc/lib/log/inc/ -Isrc/lib/target/inc -Iwork/RDKB/obj/src.lib.target -DTARGET_H='"target_RDKB.h"' -Iplatform/rdk/src/lib/target/inc -DENABLE_MESH_SOCKETS -DCONTROLLER_ADDR="\"\"" -Isrc/lib/version/inc -Isrc/qm/qm_conn/src -fPIC platform/rdk/src/lib/osync_hal/src/init.c -MMD -c -o work/RDKB/obj/platform.rdk.src.lib.osync_hal/platform/rdk/src/lib/osync_hal/src/init.o
      In file included from src/lib/target/inc/target.h:38:0,
      from platform/rdk/src/lib/osync_hal/src/init.c:29:
      src/lib/schema/inc/schema.h:34:24: fatal error: schema_gen.h: No such file or directory
      #include "schema_gen.h"
      ^
      compilation terminated.
      build/unit-build.mk:510: recipe for target 'work/RDKB/obj/platform.rdk.src.lib.osync_hal/platform/rdk/src/lib/osync_hal/src/init.o' failed
      make: *** [work/RDKB/obj/platform.rdk.src.lib.osync_hal/platform/rdk/src/lib/osync_hal/src/init.o] Error 1
      ERROR: oe_runmake failed

      ------------------------------------------------------------------------------------------------------------------------------------------------

      2. In document they mentioned we need to implement some of the wifi hardware abstraction layer features. what exactly we need to implement?

      "Some of the API functions required by OpenSync are missing and integrator is expected to provide the complete wifi_hal implementation" 

      3. what should be the vendor parameter in opensync .bbappend file.


      Thank you, your help is much appreciated.

      Regards,

      Shamantha Kumar.

  2. Hi SHAMANTHA KUMAR,

    For opensync support, You need to have a vendor layer and HAL API implementations 

    sample vendorlayer for rdk :

    https://github.com/plume-design/opensync-vendor-rdk-template


    Opensync is integrated in turris omnia,
    vendorlayer:
    https://github.com/rdkcentral/opensync-vendor-rdk-turris 

    you need a Wifi hal implementation. This is up to each wifi chip vendor to add implementation for RDKB, there is cfg80211 based wifi hal implementation that is prepared for turris omnia. if vendor do not have own and support cfg80211 then can reuse that hal.


    wifi hal apis:
    https://github.com/rdkcentral/rdkb-turris-hal/



    Thanks and Regards

    Srinivas

    1. Hi Srinivas,

      Thank you so much for the valuable inputs.


      Thanks & Regards,

      Shamantha Kumar.

  3. Hi Srinivas,

    Is it possible to create a RDK-B image with .img format?

    by default only .bin and ext4 format images are created.


    Thanks & Regards,

    Shamantha Kumar.

  4. HI SHAMANTHA KUMAR,

    Currently there is no support for .img format. Please find the below supported formats,

    meta-raspberrypi/conf/machine/include/rpi-base.inc:8:IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"



    Thanks and Regards
    Srinivas

  5. Hi Srinivas,

    Thank you for sharing the information.

    Actually we are trying to create a image for arm architecture based boards, when we execute the source meta-cmf-bsp-emulator/setup-environment, list of profiles will be displayed. which profile do we hav to select inorder to flash onto a arm boards

    source meta-cmf-bsp-emulator/setup-environment
    1) meta-cmf-bsp-emulator/conf/machine/qemux86broadbanddev.conf
    2) meta-cmf-bsp-emulator/conf/machine/qemux86hybdev.conf
    3) meta-cmf-bsp-emulator/conf/machine/qemux86mcdev.conf
    4) meta-cmf-raspberrypi/conf/machine/raspberrypi3-64-rdk-broadband.conf
    5) meta-cmf-raspberrypi/conf/machine/raspberrypi3-64-rdk-broadband-musl.conf
    6) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf
    7) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband-musl.conf
    8) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-hybrid.conf
    9) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-hybrid-westeros.conf
    10) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-mc.conf
    11) meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-mc-westeros.conf
    12) meta-raspberrypi/conf/machine/raspberrypi0.conf
    13) meta-raspberrypi/conf/machine/raspberrypi2.conf
    14) meta-raspberrypi/conf/machine/raspberrypi3.conf
    15) meta-raspberrypi/conf/machine/raspberrypi-cm3.conf
    16) meta-raspberrypi/conf/machine/raspberrypi-cm.conf
    17) meta-raspberrypi/conf/machine/raspberrypi.conf
    18) meta-raspberrypi/conf/machine/raspberrypi-rdk-mc.conf
    19) meta-rdk-bsp-emulator/conf/machine/qemuarmbroadband.conf
    20) meta-rdk-bsp-emulator/conf/machine/qemux86broadband.conf
    21) meta-rdk-bsp-emulator/conf/machine/qemux86broadband-dev.conf
    22) meta-rdk-bsp-emulator/conf/machine/qemux86broadband-morty.conf
    23) meta-rdk-bsp-emulator/conf/machine/qemux86broadband-musl.conf
    24) meta-rdk-bsp-emulator/conf/machine/qemux86hyb.conf
    25) meta-rdk-bsp-emulator/conf/machine/qemux86hyb-dev.conf
    26) meta-rdk-bsp-emulator/conf/machine/qemux86hyb-morty.conf
    27) meta-rdk-bsp-emulator/conf/machine/qemux86mc.conf
    28) meta-rdk-bsp-emulator/conf/machine/qemux86mc-dev.conf
    29) meta-rdk-bsp-emulator/conf/machine/qemux86mc-morty.conf
    30) openembedded-core/meta/conf/machine/qemuarm.conf
    31) openembedded-core/meta/conf/machine/qemux86-64.conf
    32) openembedded-core/meta/conf/machine/qemux86.conf

    Thanks & Regards,

    Shamantha Kumar.

  6. Hi Z-SHAMANTHA KUMAR PR,

                                                           We already have opensync working in Turris omnia which is running RDK-B software stack.we are able to connect to plume cloud also 


    Thanks,

    Chandrakanth

  7. Hi Chandrakanth Pokuru

    can you share us any documents about how to integrate opensync with Turris omnia on RDK-B stack


  8. hi Z-srinivas kota ramaiah

    we had integrated open sync with RDK-B but meanwhile, we had an issue with some API's getting undefined reference errors. so, in place of that, we had created dummy's and able to complete the build. can you help with that API's, 

    1. should we need to implement below API's which were getting an undefined reference or what to be done?
    2. In rdkb/components/opensource/ccsp/halinterface/wifi_hal.h there were so many API's which are having only prototypes what about the definitions of those API's.
    3. below mentioned where the api's we are facing issue with.
    4. work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_inet_add_to_bridge'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_inet_create_vlan'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_map_vlan_to_bridge'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_inet_destroy_vlan'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_map_ifname_init'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_init'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_ready'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_deinit'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getApAssociatedDeviceDiagnosticResult3'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_newApAssociatedDevice_callback_register'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_apDisassociatedDevice_callback_register'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_pushRadioChannel2'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getRadioChannels'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_radio_get_chipset'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_get_country_code'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_chan_eventRegister'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getApMacAddressControlMode'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_delApAclDevices'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_map_ifname_to_vlan'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_map_ifname_to_vif_radio_idx'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getSSIDNameStatus'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getNeighborReportActivation'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getBSSTransitionActivation'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'target_map_update_vlan'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_setNeighborReportActivation'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_setBSSTransitionActivation'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_setRadioStatsEnable'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getApAssociatedDeviceStats'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getApAssociatedDeviceRxStatsResult'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getApAssociatedDeviceTxStatsResult'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getRadioChannelStats'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_startNeighborScan'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'osync_hal_fetch_connected_clients'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_eventRegister'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_eventUnregister'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_setGroup'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_clientSet'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_clientRemove'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_clientMeasure'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_steering_clientDisconnect'
      work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_setBTMRequest'
    1. Maybe this will help you:

      To avoid above errors and use all default osync_hal functions, the following config file in the

      vendor layer (“vendor/template/kconfig/TEMPLATE”) should be created:

      CONFIG_USE_KCONFIG=y

      CONFIG_INET_STATUS_NETLINK_POLL=y

      CONFIG_PLATFORM_IS_RDK=y

      CONFIG_DEFAULT_OSYNC_HAL=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INIT=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_READY=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_DEINIT=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_FETCH_CONNECTED_CLIENTS=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_DEVINFO_GET_CLOUD_MODE=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_DEVINFO_GET_REDIRECTOR_ADDR=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_DHCP_RESYNC_ALL=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_GET_IFACE_CONFIG=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_SET_IFACE_CONFIG=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_CREATE_GRE=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_DESTROY_GRE=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_ADD_TO_BRIDGE=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_CREATE_VLAN=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_INET_DESTROY_VLAN=y

      CONFIG_OSYNC_HAL_USE_DEFAULT_GET_COUNTRY_CODE=y

  9. Hi to do that changes we need to implement the vendor layer right but we didn't have vendor layer as you now do you any idea how to implement that vendor layer what should be the contents of that?


  10. previously we referred this doc https://www.opensync.io/s/019-1129-21_Building_OpenSync_with_RDK-B.pdf , and on page 6 it was mentioned like The vendor is expected to implement the missing functionality. so, my question is do all the missing functions mentioned in the above thread should be implemented in the respective map.c, radio.c, target.c files? and also how come we can able to know the description of those API's. 

    1. Hi Z-SHAMANTHA KUMAR PR,

      Yes, for missing functionality , vendor need to implement it( though you can keep dummy for the items that are not valid for your case-which depends on the platform on which you are trying to port )

  11. Hi Z-srinivas kota ramaiah

    can you tell us how to compile the ccsp framework, whenever we are trying to do bitbake ccsp components in the build directory we are getting an error called nothing PROVIDES <component name>

    1. Hi Z-SHAMANTHA KUMAR PR

      Could you please the bitbake command and the error here?Latest rdk-next builds for Raspberry Pi and Emulator are working fine so there should not be an error

  12. Hi Z-srinivas kota ramaiah

    for getting USB support do we need to enable any option in rdkb? which actually means due to memory constraints we want to boot from USB for that is there any options to be enabled or packages to be installed in rdkb?

    1. Hi Z-SHAMANTHA KUMAR PR,

      Currently USB Boot is not officially supported in RDK reference devices. For 3rd party devices, we haven't yet came across a device that boots from USB. Anyway, it needs to be enabled by OEM to enable boot from USB.

      If you have options to move some other data to USB and use the freed up space to flash and boot RDK-B, RDK-B picks us plugged USB devices and you can mount it just like other normal Linux distros

  13. I've been trying to bring up a Turris based router/extender pair but am failing badly with the extender.

    I tried to follow: https://wiki.rdkcentral.com/courses/playcourse.action?course=87986923 but that has now become blocked to me.

    The steps to build the extender were:

    repo init -u https://code.rdkcentral.com/r/manifests -m rdkb-turris-pod-extsrc.xml -b rdk-next
    repo sync -j 4 --no-tags --no-clone-bundle

    Then in a docker container:

    MACHINE=turris-extender source ./meta-turris/setup-environment
    bitbake rdk-generic-extender-image

    I then flashed the device-tree and zImage onto /dev/mmcblk0p3 and extracted the rootfs to /dev/mmcblk0p5, set the boot parameters accordingly and rebooted. The box comes up with no physical interfaces, just lo.

    ps -ef shows some Kernel processes and:

    root      1502     1  0 14:09 ?        00:00:00 /lib/systemd/systemd-journald
    root      1519     1  0 14:09 ?        00:00:00 /lib/systemd/systemd-udevd
    root      2615     1  0 14:09 ?        00:00:00 /sbin/klogd -n
    root      2616     1  0 14:09 ?        00:00:00 /usr/sbin/wpa_supplicant -g/va
    message+  2617     1  0 14:09 ?        00:00:00 /usr/bin/dbus-daemon --system
    root      2628     1  0 14:09 ?        00:00:00 /sbin/syslogd -n -C
    root      2629     1  0 14:09 ?        00:00:00 /lib/systemd/systemd-logind
    root      2630     1  0 14:09 ttyS0    00:00:00 /bin/login -f
    root      2631     1  0 14:09 tty1     00:00:00 /sbin/agetty --noclear tty1 li
    root      2724     1  0 14:09 ?        00:00:00 /usr/sbin/hostapd -g /var/run/

    systemctl status shows

     turris-extender
        State: degraded
         Jobs: 0 queued
       Failed: 2 units
        Since: Tue 2020-09-29 14:09:38 UTC; 25min ago
       CGroup: /
               ├─init.scope
               │ └─1 /sbin/init
               └─system.slice
                 ├─hostapd.service
                 │ └─2724 /usr/sbin/hostapd -g /var/run/hostapd/global -B -P /var/run/hostapd-global.pid
                 ├─dbus.service
                 │ └─2617 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
                 ├─system-serial\x2dgetty.slice
                 │ └─serial-getty@ttyS0.service
                 │   ├─2630 /bin/login -f
                 │   ├─2727 -sh
                 │   ├─2740 systemctl status
                 │   └─2741 /bin/cat
                 ├─system-getty.slice
                 │ └─getty@tty1.service
                 │   └─2631 /sbin/agetty --noclear tty1 linux
                 ├─systemd-logind.service
                 │ └─2629 /lib/systemd/systemd-logind
                 ├─systemd-udevd.service
                 │ └─1519 /lib/systemd/systemd-udevd
                 ├─busybox-syslog.service
                 │ └─2628 /sbin/syslogd -n -C
                 ├─systemd-journald.service
                 │ └─1502 /lib/systemd/systemd-journald
                 ├─busybox-klogd.service
                 │ └─2615 /sbin/klogd -n
                 └─wpa_supplicant-global.service
                   └─2616 /usr/sbin/wpa_supplicant -g/var/run/wpa_supplicant-global -P /var/run/wpa_supplicant-global.pid

    and systemctl list-units --failed shows

      UNIT                        LOAD   ACTIVE SUB    DESCRIPTION
    ● dnsmasq.service             loaded failed failed DNS forwarder and DHCP serv
    ● systemd-update-utmp.service loaded failed failed Update UTMP about System Bo
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    2 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.

    I've skipped show all the units

    Any idea of where to go next? It strikes me this should do something more than start only a few services and have 0 wifi interfaces.

  14. Hello Z-Howard Teece ,

    "ifconfig -a" would show up all wifi interface along with other interfaces.

    All interfaces are not "Up" and "Running" state.

    Dnsmasq service are not required to be running on extender device.

    We have eliminated the need to run script for starting OpenSync on RDKB Gateway. But on extender device, systemd service for starting OpenSync is not yet merged. Meanwhile will find and share the script for running OpenSync on extender device.


    Will be updating you shortly.

  15. Hello Narayanaswamy Ramaiyer ,

    please help us with the below errors,

    1. we are having some issues with wifi_hal_api while integrating opensync3.2.7 with RDK21.3. 

    error -

    | work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getRadioOperatingParameters'
    | work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_getRadioVapInfoMap'
    | work/RDKB/lib/libopensync.so: error: undefined reference to 'wifi_createVAP'

    2. we have tried to disable all those APIs, but it is taking us to some other issue.

    3. As per the  rdkb-integration-release-notes, all those APIs are supportable, but we are not sure yy we are getting an error like that. 

    4. Any suggestion on this like how to get rid of it? 

    Thank you!


    Thanks,

    Mani 

  16. Hii @ Priyanka K V B ,

    Any idea like On what exact file, we can disable those three APIs? OR

    any other hints to resolve the above error.

    Thanks,

    Mani