You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Introduction

           This page describes the list of build errors while integrating the RdkWanManager component in yocto build environment 

Yocto Build Steps 

Please refer the below link for host environment set-up & flashing procedure for yocto build ,

Dunfell :

RPI 3B/3B+ Model Reference Platform

Morty:

RDK-B Raspberrypi - Host SetUp and Build Instructions#BRaspberrypi-HostSetUpandBuildInstructions-YoctoBuildSteps

Repo Steps

To build, follow below instructions

Repo Steps
$ mkdir <workspace dir>
$ cd <workspace dir>
$ repo init -u https://code.rdkcentral.com/r/manifests -b dunfell -m rdkb-extsrc.xml
$ repo sync -j`nproc` --no-clone-bundle

WanManager Bug Fixes

WanManager Fixes
$ cd ~/rdkb/components/opensource/ccsp/CcspEthAgent
$ git fetch https://code.rdkcentral.com/r/rdkb/components/opensource/ccsp/CcspEthAgent refs/changes/98/58898/2 && git cherry-pick FETCH_HEAD

$ cd ~/rdkb/components/generic/json-rpc
$ git fetch https://code.rdkcentral.com/r/rdkb/components/generic/json-rpc refs/changes/91/58891/1 && git cherry-pick FETCH_HEAD

$ cd ~/rdk/components/generic/rdk_logger
$ git fetch https://code.rdkcentral.com/r/rdk/components/generic/rdk_logger refs/changes/85/58885/1 && git cherry-pick FETCH_HEAD

$ cd ~/rdkb/components/opensource/ccsp/CcspPandM
$ git fetch https://code.rdkcentral.com/r/rdkb/components/opensource/ccsp/CcspPandM refs/changes/51/58951/1 && git cherry-pick FETCH_HEAD

$ cd ~/meta-cmf-broadband
$ git fetch https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-cmf-broadband refs/changes/65/58865/2 && git cherry-pick FETCH_HEAD

Note : The above bug fixes changes are temporary given as instructions. This is not required once the change is gets merged into the appropriate repo.

Distro Features

We are using the following distro features to enable rdkb wanmanager . Please add the following distro features into OEM machine configuration file,

  • rdkb_wan_manager : Used to enable RDK WanManager and json hal

Please open the below rpi machine configuration file and add the following line in that file .

 $ vi ~/meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-broadband.conf

DISTRO_FEATURES_append = "  rdkb_wan_manager"

Also , we need to disable the GwProvapp-EthWan component in ccsp packagegroup . For that, please open the below file and add the following line in that file ,

$ vi ~/meta-cmf-raspberrypi/recipes-core/packagegroups/packagegroup-rdk-ccsp-broadband.bbappend

GWPROVAPP = ""

Note :  The above distro changes are temporary given as instructions. This is not required once the change is gets merged into the appropriate repo.

Build steps

Build Steps
$ MACHINE=raspberrypi-rdk-broadband source meta-cmf-raspberrypi/setup-environment
$ bitbake rdk-generic-broadband-image

We will get the following rdk-wanmanager compilation errors While bitbaking the target image,

rdk-wanmanager Compilation Errors
../../../git/source/WanManager/wanmgr_interface_sm.c:720:62: error: macro "LOG_CONSOLE" passed 3 arguments, but takes just 0
         LOG_CONSOLE("%s Wan_init_complete:%d\n",buffer,uptime);
                                                              ^
../../../git/source/WanManager/wanmgr_interface_sm.c:720:9: error: 'LOG_CONSOLE' undeclared (first use in this function)
         LOG_CONSOLE("%s Wan_init_complete:%d\n",buffer,uptime);
         ^~~~~~~~~~~
rdk-wanmanager compilation Fix
$ cd ~/build-raspberrypi-rdk-broadband/tmp/work/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi/rdk-wanmanager/1.99+gitAUTOINC+b6db33d891-r0/git/source
$ git fetch https://code.rdkcentral.com/r/rdkb/components/opensource/ccsp/RdkWanManager refs/changes/00/58500/2 && git cherry-pick FETCH_HEAD

$ bitbake rdk-wanmanager -c compile -f
$ bitbake  rdk-generic-broadband-image

Note: The above bug fixes changes are temporary given as instructions. This is not required once the change is gets merged into the appropriate repo.

Components

The following components & meta-layers are used for Porting of  RdkWanManager in RPI Target Platform ,

Manifest Changes

Manifest File
<project name="rdkb/components/opensource/ccsp/RdkWanManager" revision="rdk-next"/>
<project name="rdkb/components/generic/json-rpc" revision="rdk-next"/>

Note :  RdkWanManager Project will be added in RPI Manifest , Once the RdkWanManager Compilation error changes are merged in rdk-next(58500

Persistent (PSM) configuration changes

For wanmanager, the default configurations are stored in PSM. As of now, we have 1 interfaces defined for WAN in wanmanager modules (i,e) wanoe.

For WANOE, by default we are using `eth0 `port for WAN connection. 

<Record name=""dmsb.wanmanager.if.2.Name"" type=""astr"">eth0</Record>

Example PSM Configurations

 <!-- rdk-wanmanager records -->

   <Record name="dmsb.wanmanager.wanenable" type="astr">1</Record> 
   <Record name="dmsb.wanmanager.wanifcount" type="astr">1</Record> 
   <Record name="dmsb.wanmanager.wanpolicy" type="astr">2</Record> 
   <Record name="dmsb.wanmanager.wanidletimeout" type="astr">0</Record> 

<!-- X_RDK_WanManager.CPEInterface.1. -wanmanager -->
   <Record name="dmsb.selfheal.rebootstatus"  type="astr">0</Record> 
   <Record name="dmsb.wanmanager.if.1.Name" type="astr">eth0</Record> 
   <Record name="dmsb.wanmanager.if.1.DisplayName" type="astr">WanOE</Record> 
   <Record name="dmsb.wanmanager.if.1.Enable" type="astr">TRUE</Record> 
   <Record name="dmsb.wanmanager.if.1.Type" type="astr">2</Record> 
   <Record name="dmsb.wanmanager.if.1.Priority" type="astr">0</Record> 
   <Record name="dmsb.wanmanager.if.1.SelectionTimeout" type="astr">0</Record> 
   <Record name="dmsb.wanmanager.if.1.DynTriggerEnable" type="astr">FALSE</Record> 
   <Record name="dmsb.wanmanager.if.1.DynTriggerDelay" type="astr">0</Record> 
   <Record name="dmsb.wanmanager.if.1.Marking.List" type="astr">DATA</Record> 
   <Record name="dmsb.wanmanager.if.1.Marking.DATA.Alias" type="astr">DATA</Record> 
   <Record name="dmsb.wanmanager.if.1.Marking.DATA.SKBPort" type="astr">1</Record> 
   <Record name="dmsb.wanmanager.if.1.Marking.DATA.SKBMark" type="astr"> </Record> 
   <Record name="dmsb.wanmanager.if.1.Marking.DATA.EthernetPriorityMark" type="astr"></Record> 
   <Record name="dmsb.wanmanager.if.1.PPPEnable" type="astr">FALSE</Record> 
   <Record name="dmsb.wanmanager.if.1.PPPLinkType" type="astr">PPPoE</Record> 
   <Record name="dmsb.wanmanager.if.1.PPPIPCPEnable" type="astr">TRUE</Record> 
   <Record name="dmsb.wanmanager.if.1.PPPIPV6CPEnable" type="astr">TRUE</Record> 
   <Record name="dmsb.wanmanager.if.1.PPPIPCPEnable" type="astr">TRUE</Record>

Errors and Challenges in yocto

S.NoRecipe Layer Error/WarningRoot CauseAction 
1

ccsp-cr.bbappend

meta-cmf-raspberrypi

CcspEthAgent will start once it gets the signal status from CR but CR is taking long time to send the Signal status .

CR is waiting to get the MTA System_Ready Signal but MTA is not supported for RPI. 

https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58559/1/recipes-ccsp/ccsp/ccsp-cr.bbappend


2ccsp-psm.bbappendmeta-cmf-raspberrypi

Need to add wanmanager default DM values in PSM database


WanManager DM  parameters are not getting the default values from PSM DBhttps://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58559/1/recipes-ccsp/ccsp/ccsp-psm.bbappend
  3utopia.bbappendmeta-cmf-raspberrypi

Below gaps needs to be filled in rpi,

  •   Below initialization activities were done by GWP
    1. /var/run/firewall directory creation.
    2. copying files that are needed by CCSP modules -ccsp_msg.cfg and cp_subsys_ert.
    3. crontab related changes(soft link) 4
    .ipv6/conf/all/forwarding proc entry
  • LAN_start() in ccsp-gwprovapp-ethwan will set
  • sysevents viz. "lan-start", "bridge_mode" and "dhcp_server-resync".
  • Multiple sysevents were set in ccsp-gwprovappethwan: lan-status, wan-status, ethwan-initialized,eth_wan_enabled, wan_service-status, eth_wan_mac,current_ipv4_link_state, current_wan_state,wan_start_time, bridge_mode
  • LAN_start() in ccsp-gwprovapp-ethwan will set
  • sysevents viz. "lan-start", "bridge_mode" and "dhcp_server-resync".
  • Multiple sysevents were set in ccsp-gwprovappethwan: lan-status, wan-status, ethwan-initialized,eth_wan_enabled, wan_service-status, eth_wan_mac,current_ipv4_link_state, current_wan_state,wan_start_time, bridge_mode.
  • In service_wan, execute_dir /etc/utopia/post.d/ restart is being done once the address is set to the WAN interface.
https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58554/1/recipes-ccsp/util/utopia.bbappend
  4system_defaults (utopia recipe)meta-cmf-raspberrypiAdded WanManager default values to syscfg.dbThese default values are used by PAMhttps://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58567/1/recipes-ccsp/util/utopia/system_defaults
  5ccsp-p-and-m.bbappendmeta-cmf-raspberrypi

PandM DM was not loading after the WanManager Integration

Device.DHCPv6.Client.{i} and Device.DHCPv4.Client.{i}. was
moved to the WanManager . But the DMs was not removed

Removed the Device.DHCPv6.Client.{i} and Device.DHCPv4.
Client.{i}. from the PandM XML file. 
https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58681/2/recipes-ccsp/ccsp/ccsp-p-and-m.bbappend
 6RdkWanManagerrdkb/components/opensource/ccsp/RdkWanManagerRdkWanManager fails to build with the folloiwing errors: | ../../../git/source/WanManager/wanmgr_interface_sm.c:720:62: error: macro LOG_CONSOLE passed 3 arguments, but takes just 0 | 720 | LOG_CONSOLE(%s Wan_init_complete:%d\n,buffer,uptime); | | ^ | In file included from ../../../git/source/WanManager/wanmgr_interface_sm.c:31: | ../../../git/source/WanManager/wanmgr_platform_events.h:48: note: macro LOG_CONSOLE defined here | 48 | #define LOG_CONSOLE() | | | ../../../git/source/WanManager/wanmgr_interface_sm.c:720:9: error: LOG_CONSOLE undeclared (first use in this function) | 720 | LOG_CONSOLE(%s Wan_init_complete:%d\n,buffer,uptime); | |LOG_CONSOLE () api is not definedhttps://code.rdkcentral.com/r/c/rdkb/components/opensource/ccsp/RdkWanManager/+/58500
 7ccsp-common-library.bbappendmeta-cmf-raspberrypiccsp-gwprov-app starts initialization scripts utopia_init.sh

Added the below line in RdkWanManager.service

ExecStartPre=/bin/sh /etc/utopia/utopia_init.sh

utopia_init.sh needs to be started before starting the RdkWanManager executable

https://code.rdkcentral.com/r/c/rdk/components/generic/rdk-oe/meta-cmf-raspberrypi/+/58732/2/recipes-ccsp/ccsp/ccsp-common-library.bbappend



References


  • No labels