[oe] [PATCH 2/2] ti-codec-engine: make rebuild of ti-codec-engine itself possible

Khem Raj raj.khem at gmail.com
Sat Mar 19 18:47:37 UTC 2011


On (18/03/11 10:53), heinold at inf.fu-berlin.de wrote:
> From: Henning Heinold <heinold at inf.fu-berlin.de>
> 
> 
> Signed-off-by: Henning Heinold <heinold at inf.fu-berlin.de>
Looks ok

Acked-by: Khem Raj <raj.khem at gmail.com>

> ---
>  recipes/ti/ti-codec-engine.inc                    |  117 +++++++++++++++++++++
>  recipes/ti/ti-codec-engine/fix_core_package.patch |   13 +++
>  recipes/ti/ti-codec-engine/fix_ipc_dsplink.patch  |   86 +++++++++++++++
>  recipes/ti/ti-codec-engine_2.26.01.09.bb          |    4 +
>  4 files changed, 220 insertions(+), 0 deletions(-)
>  create mode 100644 recipes/ti/ti-codec-engine/fix_core_package.patch
>  create mode 100644 recipes/ti/ti-codec-engine/fix_ipc_dsplink.patch
> 
> diff --git a/recipes/ti/ti-codec-engine.inc b/recipes/ti/ti-codec-engine.inc
> index fdaebd5..9e8a8ad 100644
> --- a/recipes/ti/ti-codec-engine.inc
> +++ b/recipes/ti/ti-codec-engine.inc
> @@ -64,6 +64,107 @@ do_configure() {
>      sed -i  \
>          -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \
>          ${S}/examples/xdcpaths.mak
> +
> +    # Generate a config.bld for codec engine lib
> +
> +    cat > ${S}/packages/ti/sdo/ce/config.bld <<EOF
> +
> +/* Generated by ti-codeco-engine.inc OE recipe */
> +
> +var Build = xdc.useModule('xdc.bld.BuildEnvironment');
> +
> +var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T');
> +GCArmv5T.LONGNAME = "bin/${TARGET_PREFIX}gcc";
> +GCArmv5T.rootDir = "${TOOLCHAIN_PATH}";
> +GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing -I${FC_INSTALL_DIR}/packages -I${XDAIS_INSTALL_DIR}/packages ";
> +GCArmv5T.platform = null;
> +GCArmv5T.platforms = [
> +    "${XDC_PLATFORM}"
> +];
> +
> +/* remove profiles we don't use */
> +delete GCArmv5T.profiles["coverage"];
> +delete GCArmv5T.profiles["profile"];
> +
> +Build.targets.\$add(GCArmv5T);
> +
> +var C64P = xdc.useModule('ti.targets.C64P');
> +C64P.rootDir = "${CODEGEN_INSTALL_DIR}";
> +C64P.ccOpts.prefix += " -I${FC_INSTALL_DIR}/packages -I${XDAIS_INSTALL_DIR}/packages ";
> +
> +Build.targets.\$add(C64P);
> +EOF
> +
> +    cat > ${S}/packages/ti/sdo/ce/osal/linux/config.bld <<EOF
> +
> +/* Generated by ti-codeco-engine.inc OE recipe */
> +
> +var Build = xdc.useModule('xdc.bld.BuildEnvironment');
> +
> +var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T');
> +GCArmv5T.LONGNAME = "bin/${TARGET_PREFIX}gcc";
> +GCArmv5T.rootDir = "${TOOLCHAIN_PATH}";
> +GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing -I${FC_INSTALL_DIR}/packages -I${CMEM_INSTALL_DIR}/packages ";
> +GCArmv5T.platform = null;
> +GCArmv5T.platforms = [
> +    "${XDC_PLATFORM}"
> +];
> +
> +/* remove profiles we don't use */
> +delete GCArmv5T.profiles["coverage"];
> +delete GCArmv5T.profiles["profile"];
> +
> +Build.targets.\$add(GCArmv5T);
> +
> +EOF
> +
> +    cat > ${S}/packages/ti/sdo/ce/ipc/dsplink/config.bld <<EOF
> +
> +/* Generated by ti-codeco-engine.inc OE recipe */
> +
> +var Build = xdc.useModule('xdc.bld.BuildEnvironment');
> +
> +var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T');
> +GCArmv5T.LONGNAME = "bin/${TARGET_PREFIX}gcc";
> +GCArmv5T.rootDir = "${TOOLCHAIN_PATH}";
> +GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing -I${FC_INSTALL_DIR}/packages "
> +GCArmv5T.ccOpts.prefix += " -I${CMEM_INSTALL_DIR}/packages -I${LPM_INSTALL_DIR}/packages ";
> +GCArmv5T.platform = null;
> +GCArmv5T.platforms = [
> +    "${XDC_PLATFORM}"
> +];
> +
> +/* remove profiles we don't use */
> +delete GCArmv5T.profiles["coverage"];
> +delete GCArmv5T.profiles["profile"];
> +
> +Build.targets.\$add(GCArmv5T);
> +
> +EOF
> +
> +    cat > ${S}/packages/ti/dsplink/utils/ladclient/config.bld <<EOF
> +
> +/* Generated by ti-codeco-engine.inc OE recipe */
> +
> +var Build = xdc.useModule('xdc.bld.BuildEnvironment');
> +
> +var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T');
> +GCArmv5T.LONGNAME = "bin/${TARGET_PREFIX}gcc";
> +GCArmv5T.rootDir = "${TOOLCHAIN_PATH}";
> +GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing "
> +GCArmv5T.platform = null;
> +GCArmv5T.platforms = [
> +    "${XDC_PLATFORM}"
> +];
> +
> +/* remove profiles we don't use */
> +delete GCArmv5T.profiles["coverage"];
> +delete GCArmv5T.profiles["profile"];
> +
> +Build.targets.\$add(GCArmv5T);
> +
> +EOF
> +
>  }
>  
>  do_prepsources() {
> @@ -98,6 +199,22 @@ addtask prepsources after do_configure before do_compile
>  
>  do_compile () {
>  
> +        cd ${S}/packages/ti/sdo/ce
> +           ${XDC_INSTALL_DIR}/xdc
> +
> +        cd ${S}/packages/ti/sdo/ce/osal/linux
> +           ${XDC_INSTALL_DIR}/xdc
> +
> +	cd ${S}/packages/ti/sdo/ce/ipc/dsplink
> +           make XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \
> +                CE_INSTALL_DIR="${S}" \
> +		DSPLINK_REPO="${LINK_INSTALL_DIR}" \
> +                XDCARGS="DEVICE=${CEEXAMPLESDEVICES}"
> +
> +
> +        cd ${S}/packages/ti/dsplink/utils/ladclient
> +           ${XDC_INSTALL_DIR}/xdc
> +
>          for i in codecs extensions servers apps ; do
>                  cd ${S}/examples/ti/sdo/ce/examples/$i
>                  make DEVICES="${CEEXAMPLESDEVICES}" \
> diff --git a/recipes/ti/ti-codec-engine/fix_core_package.patch b/recipes/ti/ti-codec-engine/fix_core_package.patch
> new file mode 100644
> index 0000000..69ca438
> --- /dev/null
> +++ b/recipes/ti/ti-codec-engine/fix_core_package.patch
> @@ -0,0 +1,13 @@
> +Index: codec_engine_2_26_01_09/packages/ti/sdo/ce/package.bld
> +===================================================================
> +--- codec_engine_2_26_01_09.orig/packages/ti/sdo/ce/package.bld	2011-03-12 14:37:00.515568120 +0100
> ++++ codec_engine_2_26_01_09/packages/ti/sdo/ce/package.bld	2011-03-12 14:37:04.174063120 +0100
> +@@ -45,6 +45,8 @@
> +  */
> + Pkg.attrs.exportSrc = true;
> + 
> ++Pkg.libTemplate = "ti/sdo/ce/utils/libvers.xdt"
> ++
> + Pkg.otherFiles = ["CERuntime.h", "Server.h", "Engine.h", "visa.h", "skel.h",
> +         "rms.h", "ServerDataSheet.html.xdt", "async-extensions.txt",
> +         "package.bld"];
> diff --git a/recipes/ti/ti-codec-engine/fix_ipc_dsplink.patch b/recipes/ti/ti-codec-engine/fix_ipc_dsplink.patch
> new file mode 100644
> index 0000000..06f362c
> --- /dev/null
> +++ b/recipes/ti/ti-codec-engine/fix_ipc_dsplink.patch
> @@ -0,0 +1,86 @@
> +Index: codec_engine_2_26_01_09/packages/ti/sdo/ce/ipc/dsplink/package.bld
> +===================================================================
> +--- codec_engine_2_26_01_09.orig/packages/ti/sdo/ce/ipc/dsplink/package.bld	2011-03-12 16:42:42.508013119 +0100
> ++++ codec_engine_2_26_01_09/packages/ti/sdo/ce/ipc/dsplink/package.bld	2011-03-12 17:05:14.163503119 +0100
> +@@ -67,6 +67,15 @@
> +           "package will not be built.");
> + }
> + 
> ++var DEVICE;
> ++
> ++/* initialize local vars with those set in xdcpaths.mak (via XDCARGS) */
> ++for (x = 0; x < arguments.length; x++) {
> ++    if (arguments[x].match(/^DEVICE=/)) {
> ++        DEVICE = arguments[x].split("=")[1];
> ++    }
> ++}
> ++
> + for (var i = 0; i < Build.targets.length; i++) {
> +     var targ = Build.targets[i];
> +     var lib;
> +@@ -77,8 +86,11 @@
> +     }
> + 
> +     if ((":"+targ.getISAChain().join(":")+":").match(/:v5T:|:v6:/i)) {
> +-        /* DM6446 */
> ++
> +         linkGppGlobal.runtimeOS = linkGppGlobal.LINUX;
> ++
> ++     if (DEVICE.match(/DM6446|DM6467/)) {
> ++        /* DM6446 */
> +         linkGppGlobal.deviceName = linkGppGlobal.DAVINCI;
> + 
> +         lib = Pkg.addLibrary("lib/release/ipc_dsplink_6446", targ, {
> +@@ -121,7 +133,7 @@
> +         lib.addObjects([
> +             "Processor_dsplink_linkcfg_DM6467.c"
> +         ]);
> +-
> ++     } else if (DEVICE.match(/OMAP2530/)) {
> +         /* OMAP2530 */
> +         linkGppGlobal.deviceName = linkGppGlobal.OMAP2530;
> + 
> +@@ -144,6 +156,8 @@
> +             "Processor_dsplink_linkcfg_OMAP2530.c"
> +         ]);
> + 
> ++      } else if(DEVICE.match(/OMAP3530/)) {
> ++
> +         /* OMAP3530 */
> +         linkGppGlobal.deviceName = linkGppGlobal.OMAP3530;
> + 
> +@@ -166,6 +180,8 @@
> +             "Processor_dsplink_linkcfg_OMAP3530.c"
> +         ]);
> + 
> ++      } else if(DEVICE.match(/DM355|DM365/)) {
> ++
> +         /* DM357 */
> +         linkGppGlobal.deviceName = linkGppGlobal.DM357;
> + 
> +@@ -188,6 +204,8 @@
> +             "Processor_dsplink_linkcfg_DM357.c"
> +         ]);
> + 
> ++      } else if(DEVICE.match(/OMAPL137/)) {
> ++
> +         /* OMAPL137 */
> +         linkGppGlobal.deviceName = linkGppGlobal.OMAPL1XX;
> + 
> +@@ -210,6 +228,8 @@
> +             "Processor_dsplink_linkcfg_OMAPL137.c"
> +         ]);
> + 
> ++      } else if(DEVICE.match(/OMAPL138/)) {
> ++
> +         /* OMAPL138 */
> +         linkGppGlobal.deviceName = linkGppGlobal.OMAPL138;
> + 
> +@@ -231,6 +251,7 @@
> +         lib.addObjects([
> +             "Processor_dsplink_linkcfg_OMAPL138.c"
> +         ]);
> ++      }
> +     }
> +     else {
> +         if ((":"+targ.getISAChain().join(":")+":").match(/:v4T:/i)) {
> diff --git a/recipes/ti/ti-codec-engine_2.26.01.09.bb b/recipes/ti/ti-codec-engine_2.26.01.09.bb
> index ca28522..2cd8bed 100644
> --- a/recipes/ti/ti-codec-engine_2.26.01.09.bb
> +++ b/recipes/ti/ti-codec-engine_2.26.01.09.bb
> @@ -2,5 +2,9 @@ require ti-codec-engine.inc
>  
>  PV = "2_26_01_09"
>  
> +SRC_URI += "file://fix_core_package.patch \
> +            file://fix_ipc_dsplink.patch \
> +           "
> +
>  SRC_URI[cetarball.md5sum] = "d6046f29926b949b9eae4599f42dd51e"
>  SRC_URI[cetarball.sha256sum] = "4db08e47abb62b1180eb2310f5d0bbad2d1f58702a61d157dca5e056388dc7c2"
> -- 
> 1.7.4.1
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
-Khem




More information about the Openembedded-devel mailing list