Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/native_full_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build Component in Native Environment

on:
push:
branches: [ main, 'sprint/**', 'release/**', develop ]
pull_request:
branches: [ main, 'sprint/**', 'release/**', topic/RDK*, develop ]

jobs:
build-entservices-on-pr:
name: Build entservices-mediaanddrm component in github rdkcentral
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: native build
run: |
./cov_build.sh
env:
GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }}
108 changes: 108 additions & 0 deletions cov_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/bin/bash
set -x
set -e

WORKDIR=`pwd`
export ROOT=/home/rdkv-core/Yuvaram/workspace/downloads
export ROOT=/usr
export INSTALL_DIR=${ROOT}/local
mkdir -p $INSTALL_DIR

apt update
apt install -y libdbus-1-dev

cd $ROOT
rm -rf iarmbus
git clone https://github.com/rdkcentral/iarmbus.git

cd $ROOT
rm -rf iarmmgrs
git clone https://github.com/rdkcentral/iarmmgrs.git

export IARMBUS_PATH=$ROOT/iarmbus
export IARMMGRS_PATH=$ROOT/iarmmgrs

# Build and deploy stubs for IARMBus
echo "Building IARMBus stubs"
cd $WORKDIR
cd ./stubs
g++ -fPIC -shared -o libIARMBus.so iarm_stubs.cpp -I$WORKDIR/stubs -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$IARMBUS_PATH/core -I$IARMBUS_PATH/core/include -fpermissive
g++ -fPIC -shared -o libWPEFrameworkPowerController.so powerctrl_stubs.cpp -I$WORKDIR/stubs -fpermissive

#cp $IARMBUS_PATH/core/libIARMCore.h /usr/local/include
#cp $IARMBUS_PATH/core/include/libIBus.h /usr/local/include
#cp $IARMBUS_PATH/core/include/libIARM.h /usr/local/include
#cp $IARMBUS_PATH/core/include/libIBusDaemon.h /usr/local/include
#cp $IARMMGRS_PATH/hal/include/comcastIrKeyCodes.h /usr/local/include
#cp $IARMMGRS_PATH/mfr/include/mfr*.h /usr/local/include
#cp $IARMMGRS_PATH/mfr/common/include/mfrApi.h /usr/local/include

cp libIARMBus.so /usr/local/lib
cp libWPEFrameworkPowerController.so /usr/local/lib/libWPEFrameworkPowerController.so

function standaloneBuildClean()
{
pd=`pwd`

Check failure on line 45 in cov_build.sh

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'cov_build.sh' (Match: rdk/components/generic/storagemanager/rdk/components/generic/storagemanager/2017q4, 16 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/storagemanager/+archive/rdkv-2017q4.tar.gz, file: rdk_build.sh)
CLEAN_BUILD=1
dnames="$RDK_SCRIPTS_PATH"
for dName in $dnames
do
cd $dName
if [ -f Makefile ]; then
make distclean
fi
rm -f configure
rm -rf aclocal.m4 autom4te.cache config.log config.status libtool
rm -rf install
find . -iname "Makefile.in" -exec rm -f {} \;
find . -iname "Makefile" | xargs rm -f
ls cfg/* | grep -v "Makefile.am" | xargs rm -f
cd $pd
done
find . -iname "*.o" -exec rm -f {} \;
}

function standaloneBuildConfigure()
{
aclocal -I cfg
libtoolize --automake
autoheader
automake --foreign --add-missing
rm -f configure
autoconf
./configure
}

echo "##### Building sys_mon_tools module"
cd $WORKDIR

export GLIBS='-lglib-2.0 -lz'
export ROOT_INC="/usr/lib/x86_64-linux-gnu"
export GLIB_INCLUDE_PATH="/usr/include/glib-2.0"
export GLIB_CONFIG_INCLUDE_PATH="${ROOT_INC}/glib-2.0/include"
export DBUS_INCLUDE_PATH="/usr/include/dbus-1.0"
export DBUS_CONFIG_INCLUDE_PATH="${ROOT_INC}/dbus-1.0/include"
export CFLAGS+="-O2 -Wall -fPIC -I./include -I${GLIB_INCLUDE_PATH} -I${GLIB_CONFIG_INCLUDE_PATH} \
-I/usr/include \
-I/usr/local/include \
-I${WORKDIR}/stubs \
-I${DBUS_INCLUDE_PATH} \
-I${DBUS_CONFIG_INCLUDE_PATH} \
-I/usr/include/libsoup-2.4 \
-I/usr/include/gssdp-1.0"
export LDFLAGS+="-Wl,-rpath, -L/usr/lib"
export CC="gcc $CFLAGS"
export CXX="g++ $CFLAGS $LDFLAGS"
export USE_IARM_BUS="y"

standaloneBuildClean
standaloneBuildConfigure

#make
#
#cp $IARMMGRS_PATH/hal/include/comcastIrKeyCodes.h /usr/local/include
#cp $IARMMGRS_PATH/mfr/include/mfr*.h /usr/local/include
#cp $IARMMGRS_PATH/mfr/common/include/mfrApi.h /usr/local/include

make VERBOSE=1 AM_CPPFLAGS="-I${WORKDIR}/stubs -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libsoup-3.0 -I/usr/local/include -I${IARMMGRS_PATH}/sysmgr/include -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARMMGRS_PATH}/hal/include -I${IARMMGRS_PATH}/mfr/include -I${IARMMGRS_PATH}/mfr/common/include" \
AM_LDFLAGS="-L/usr/local/lib -lIARMBus -lWPEFrameworkPowerController" CXXFLAGS="-fpermissive -I${WORKDIR}/stubs"
73 changes: 73 additions & 0 deletions stubs/iarm_stubs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#include "libIBus.h"
#include "libIARMCore.h"
#include <mutex>
using namespace std;

IARM_Result_t IARM_Malloc(IARM_MemType_t type, size_t size, void **ptr)
{
return IARM_RESULT_SUCCESS;
}

int main()
{
}

IARM_Result_t IARM_Free(IARM_MemType_t type, void *alloc)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_BroadcastEvent(const char *ownerName, IARM_EventId_t eventId, void *arg, size_t argLen)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_Init(const char* name)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_Connect()
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_IsConnected(const char* memberName, int* isRegistered)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_RegisterEventHandler(const char* ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_UnRegisterEventHandler(const char* ownerName, IARM_EventId_t eventId)
{
return IARM_RESULT_SUCCESS;
}

IARM_Result_t IARM_Bus_RemoveEventHandler(const char* ownerName, IARM_EventId_t eventId, IARM_EventHandler_t handler)
{
return IARM_RESULT_SUCCESS;
}
IARM_Result_t IARM_Bus_RegisterCall(const char *methodName, IARM_BusCall_t handler)
{
return IARM_RESULT_SUCCESS;
}
IARM_Result_t IARM_Bus_Term(void)
{
return IARM_RESULT_SUCCESS;
}
IARM_Result_t IARM_Bus_Disconnect(void)
{
return IARM_RESULT_SUCCESS;
}
IARM_Result_t IARM_Bus_RegisterEvent(IARM_EventId_t maxEventId)
{
return IARM_RESULT_SUCCESS;
}
IARM_Result_t IARM_Bus_Call(const char* ownerName, const char* methodName, void* arg, size_t argLen)
{
return IARM_RESULT_SUCCESS;
}
Loading
Loading