Host Setup

The OpenEmbedded build system should be able to run on Ubuntu 18.04 distribution/other compatible linux distribution with the following versions for Git, tar, and Python.

  • Git 1.8.3.1 or greater
  • tar 1.27 or greater
  • Python 3.4.0 or greater
  • Coreutils(E.g realpath)

Note: You should also have about 50 Gbytes of free disk space for building images.

The essential packages you need for a supported Ubuntu or Debian distribution are shown in the following command:

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
  build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
  xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
  pylint3 xterm bmap-tools


$ sudo apt-get install git cmake autoconf texinfo openjdk-8-jdk openjdk-8-jre \
  m4 libtool libtool-bin curl pkg-config lib32z1 doxygen

Repo Setup

In order to use Yocto build system, the repo tool must be properly installed on the machine.

To install Repo make sure you have a /bin directory in your home directory and that it is included in your path

Repo Setup Steps
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the repo tool and ensure that it is executable
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

Note: it is also recommended to put credentials in ~/.netrc when interacting with repo.

A sample ~/.netrc file is illustrated below

.netrc
machine code.rdkcentral.com login YOUR_USERNAME password YOUR_PASSWORD

Yocto Build Steps

To build, follow below instructions

Build 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

pam crash on 64bit aarch
$ cd ~/rdkb/components/opensource/ccsp/CcspPandM
$ git fetch https://code.rdkcentral.com/r/rdkb/components/opensource/ccsp/CcspPandM refs/changes/04/62804/3 && 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.

Image Generation Steps
$ MACHINE=raspberrypi4-64-rdk-broadband source meta-cmf-raspberrypi/setup-environment
$ bitbake rdk-generic-broadband-image

Flashing Procedure

Following command can be used to flash the RPI image to sd card using linux machine . bmap tool should be available in linux

Flash command
bzip2 -d <path to ImageName.wic.bz2>
sudo -E bmaptool copy --nobmap <path to ImageName.wic> <path to SD card space>

Example:

$ bzip2 -d rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic.bz2
$ sudo -E bmaptool copy --nobmap rdk-generic-broadband-image-raspberrypi4-64-rdk-broadband.wic /dev/sdb

Errors and Challenges


S.No

     

 Recipe

             

Layer

                                                                                                             

                                                                                                               Error/Warning

             Action taken
1ccsp-common-librarymeta-cmf-raspberrypi../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c: In function 'AnscUIntArrayGetAt':
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c:278:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
  278 |         return (ANSC_OBJECT_ARRAY_DATA)pStorage[ulIndex];
                    ^
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c: In function 'AnscUIntArraySetAt':
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c:334:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  334 |         pStorage[ulIndex]   = (UINT)Data;
                          ^
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c: In function 'AnscUIntArrayInsertAt':
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c:415:39: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  415 |             pStorage[i + ulIndex]   = (UINT)Data;
                              ^
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c: In function 'AnscUIntArrayAdd':
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c:530:52: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  530 |             pStorage[pUIntArray->ulItemCount ++] = (UINT)Data;
                                                ^
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c: In function 'AnscUIntArrayFind':
../../../../../../../../../../../../rdkb/components/opensource/ccsp/CcspCommonLibrary/source/cosa/utilities/AnscObjectArray/AnscUIntArray/ansc_uint_array_co_process.c:663:51: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  663 |     UINT                            uSample     = (UINT)Data;
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
2zilker-sdkmeta-cmf-broadband /tmp/ccBNkS8g.o(.text+0x960): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
| /home/kpandu549/keerthana/sep14/build-raspberrypi4-64-rdk-broadband/tmp/work/aarch64-rdk-linux/ccronexpr/git-r0/recipe-sysroot-native/usr/bin/aarch64-rdk-linux/../../libexec/aarch64-rdk-linux/gcc/aarch64-rdk-linux/9.3.0/ld: final link failed: bad value
| collect2: error: ld returned 1 exit status
| Makefile:26: recipe for target 'library' failed
| make: *** [library] Error 1
| make: Leaving directory '/home/kpandu549/keerthana/sep14/build-raspberrypi4-64-rdk-broadband/tmp/work/aarch64-rdk-linux/ccronexpr/git-r0/git'
| WARNING: exit code 1 from a shell command.

CFLAGS_append_aarch64 = " -fPIC"  used in ccronexpr recipe
3webconfig-frameworkmeta-cmf-raspberrypi

error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary.
4telemetrymeta-cmf-raspberrypierror: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
|   142 |     T2Debug("TR-181 Param count : %d\n", paramList->count);
|       |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
|       |                                                   |
|       |                                                   size_t {aka long unsigned int}
| ../../../../../../../../../rdk/components/generic/telemetry/source/utils/t2log_wrapper.h:36:61: note: in definition of macro 'T2Debug'
|    36 | #define T2Debug(...)                   T2Log(RDK_LOG_DEBUG, __VA_ARGS__)
                                                         ^~~~~~~~~~~
| ../../../../../../../../../rdk/components/generic/telemetry/source/ccspinterface/rbusInterface.c:142:36: note: format string is defined here
|   142 |     T2Debug("TR-181 Param count : %d\n", paramList->count);
cc1: all warnings being treated as errors
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
5jstmeta-cmf-raspberrypi| ~/ld: CMakeFiles/jst.dir/source/jst_cosa.c.o: undefined reference to symbol 'dbus_connection_send@@LIBDBUS_1_3'
| ~/recipe-sysroot/usr/lib/libdbus-1.so: error adding symbols: DSO missing from command line
| collect2: error: ld returned 1 exit status
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
6ccsp-lm-litemeta-cmf-raspberrypi

 error: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]

   147 |         CcspLMLiteConsoleTrace(("RDK_LOG_DEBUG, wrp_msg->u.event.payload_size :%d\n",wrp_msg→u.event.paylo

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary.
7ccsp-miscmeta-cmf-raspberrypi

error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary.
8ccsp-miscmeta-cmf-raspberrypi/usr/lib/libhal_platform.so: undefined reference to `Utopia_SetEvent'
collect2: error: ld returned 1 exit status
 Makefile:403: recipe for target 'LTime' failed
 make[3]: *** [LTime] ErrorA 1
Added LDFLAGS_append_aarch64 = " -lutctx" in misc recipe
9ccsp-hotspotmeta-cmf-raspberrypierror: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
cc1: all warnings being treated as errors
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
10rdk-vlanmanagermeta-cmf-raspberrypi/usr/lib/libhal_platform.so: undefined reference to `Utopia_RawGet'
/usr/lib/libhal_platform.so: undefined reference to `Utopia_SetEvent'
/usr/lib/libhal_platform.so: undefined reference to `Utopia_Free'
/usr/lib/libhal_platform.so: undefined reference to `Utopia_Init'
/usr/lib/libhal_platform.so: undefined reference to `Utopia_RawSet'
Added LDFLAGS_aarch64 += " -lutctx -lprivilege "  in recipe
11ccsp-dmclimeta-cmf-raspberrypi error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
cc1: all warnings being treated as errors
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
12harvestermeta-cmf-raspberrypi

error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int64_t' {aka 'long int'} [-Werror=format=]

error: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]

/harvester_radio_traffic_avropack.c:512:34: error: format '%lld' expects argument of type 'long long int', but argument 4 has type 'int64_t' {aka 'long int'} [-Werror=format=]

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary.
13ccsp-xdnsmeta-cmf-raspberrypi

cosa_xdns_apis.c:393:35: error: format '%d' expects argument of type 'int', but argument 5 has type 'ssize_t' {aka 'long int'} [-Werror=format=]

cosa_xdns_webconfig_api.c:693:51: error: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
 693 |  fprintf(stderr, "xd->table_param->entries_count %d\n", xd->table_param->entries_count);

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary.
14ccsp-tr069-pameta-cmf-raspberrypi/ccsp_cwmp_tcpcrho_auth.c:1993:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
ssp_debug.c:993:21: error: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551615' to '4294967295' [-Werror=overflow]
ccsp_management_server.c:885:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
cc1: all warnings being treated as errors
Using CFLAGS_remove += " -Werror" to fix these errors temporary.
15rdk-vlanmanagermeta-cmf-raspberrypiundefined reference to `drop_root_caps'
undefined reference to `read_capablitiy'
undefined reference to `update_process_caps'
Added LDFLAGS_aarch64 += " -lutctx -lprivilege "  in recipe
16ccsp-snmp-pameta-cmf-raspberrypi

cosa_api.c:360:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

cc1: all warnings being treated as errors

Using CFLAGS_remove += " -Werror" to fix these errors temporary
17zilker-sdkmeta-cmf-broadbandWARNING: zilker-sdk-git-r0 do_populate_sysroot: File '/usr/lib/libccronexpr.so.0' from zilker-sdk was already stripped, this will prevent future debugging!
WARNING: zilker-sdk-git-r0 do_populate_sysroot: File '/usr/lib/libccronexpr.so.0.0.0' from zilker-sdk was already stripped, this will prevent future debugging!
WARNING: zilker-sdk-git-r0 do_populate_sysroot: File '/usr/lib/libccronexpr.so' from zilker-sdk was already stripped, this will prevent future debugging!
WARNING: zilker-sdk-git-r0 do_package: QA Issue: File '/usr/lib/libccronexpr.so' from zilker-sdk was already stripped, this will prevent future debugging! [already-stripped]
WARNING: zilker-sdk-git-r0 do_package: QA Issue: File '/usr/lib/libccronexpr.so.0' from zilker-sdk was already stripped, this will prevent future debugging! [already-stripped]
WARNING: zilker-sdk-git-r0 do_package: QA Issue: File '/usr/lib/libccronexpr.so.0.0.0' from zilker-sdk was already stripped, this will prevent future debugging! [already-stripped]
Added INSANE_SKIP_${PN} = "ldflags already-stripped" in zilker-sdk recipe
18zilker-sdkmeta-cmf-broadbandFile /usr/lib/libccronexpr.so.0.0.0 in package zilker-sdk doesn't have GNU_HASH (didn't pass LDFLAGS?)
File /usr/lib/libccronexpr.so.0 in package zilker-sdk doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]
Added INSANE_SKIP_${PN} = "ldflags" in ccronexpr recipe
19utopiameta-cmf-raspberrypiCR crashing is happening on 64bit aarch when dbus enabled Enabled rbus support
20pamCcspPandMccsp-p-and-m is crashing on 64bit aarch when rbus is enablingpam is passing wrong dm parameter to ethagent due to that pam crash is happened.

Sanity Testing

  1.  Sanity test cases are validated on 64bit aarch in RPI4. It includes,
    1.  All ccsp components are running on board
    2.  All ccsp components DM parameters are able to access properly
    3.  Able to connect the wireless clients
    4.  Able to access the WebUI via RM
    5.  Able to access the WebUI in connected clients using gateway ip
    6.  Internet is working on board
    7.  WAN connection is working on connected clients
    8.   iptables are loaded properly
    9.  Able to tab all the pages in WebUI without any crash
    10.  Able to get all the interfaces
    11.  Able to get the erouter0 IP address
    12.  Able to take ssh access via erouter0 IP Address
    13.  All ccsp component log files are generated under the /rdklogs/logs folder
    14.  Enabled rbus - all ccsp components are communicated via rbus
    15. udhcpc,dnsmasq,lighttpd process are running
    16. captiveportal page is loaded properly on wireless clients for initial connect

Known Issues

  1.  E2E validation is not performed yet on 64bit aarch in RPI4 
  2.  sometimes , rpi board is rebooting without giving reboot command
  3.  Observing CR crash when we enabled the dbus only 
  4.  None of the ccsp components are not started due to CR crash(if dbus only enabled)
  • No labels

1 Comment

  1. hello,  Keerthana

    thanks for your information,

    Here is Weilun, 

    we are trying to build up RDKB 64Bit with our platform,

    we encounter many package 64bit compatible issues.

    ex. some modules makefile/script only support 32bit path, so there have comiple error/runtime error because dependency modules can not reference to the lib

    ex. avro/avro-c_1.8.1 

    LIBRARY DESTINATION lib → should correct to LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} for 64bit

    Starting Utopia service...
    [   10.031495] sh[3626]: /bin/sh: /lib/rdk/if_check.sh: No such file or directory

    would you share what's this RPI 64bit project base on RDKB version (2021q3_dunfell or 2021q4_dunfell)

    and how to solve those rdkb package 64bit  compatible errors,

    or would you share RPI 64bit recipes-ccsp for reference


    Appreciate your time and help, thank you!