From 5c852741484295c6794548d51ed8491a005c587e Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Sat, 14 Jun 2014 12:48:01 +0800 Subject: add recipes for ipc kernel module and userspace tool Signed-off-by: Ting Liu --- recipes-bsp/ipc/ipc-modules-multi_git.bb | 11 +++++++ recipes-bsp/ipc/ipc-modules-single_git.bb | 11 +++++++ recipes-bsp/ipc/ipc-modules.inc | 39 ++++++++++++++++++++++++ recipes-bsp/ipc/ipc-ust_git.bb | 50 +++++++++++++++++++++++++++++++ recipes-bsp/ipc/ipc.inc | 7 +++++ 5 files changed, 118 insertions(+) create mode 100644 recipes-bsp/ipc/ipc-modules-multi_git.bb create mode 100644 recipes-bsp/ipc/ipc-modules-single_git.bb create mode 100644 recipes-bsp/ipc/ipc-modules.inc create mode 100644 recipes-bsp/ipc/ipc-ust_git.bb create mode 100644 recipes-bsp/ipc/ipc.inc (limited to 'recipes-bsp/ipc') diff --git a/recipes-bsp/ipc/ipc-modules-multi_git.bb b/recipes-bsp/ipc/ipc-modules-multi_git.bb new file mode 100644 index 0000000..e5dc115 --- /dev/null +++ b/recipes-bsp/ipc/ipc-modules-multi_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1 CONFIG_MULTI_RAT=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/multi_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/multi_rat +} + +FILES_${PN} += "/usr/driver/IPC/multi_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/multi_rat/.debug" diff --git a/recipes-bsp/ipc/ipc-modules-single_git.bb b/recipes-bsp/ipc/ipc-modules-single_git.bb new file mode 100644 index 0000000..03817e0 --- /dev/null +++ b/recipes-bsp/ipc/ipc-modules-single_git.bb @@ -0,0 +1,11 @@ +require ipc-modules.inc + +EXTRA_OEMAKE ="KERNEL_DIR=${STAGING_KERNEL_DIR} ${SOC}=1" + +do_install(){ + install -d ${D}/usr/driver/IPC/single_rat + install -m 755 ${S}/kernel/*.ko ${D}/usr/driver/IPC/single_rat +} + +FILES_${PN} += "/usr/driver/IPC/single_rat/*.ko" +FILES_${PN}-dbg += "/usr/driver/IPC/single_rat/.debug" diff --git a/recipes-bsp/ipc/ipc-modules.inc b/recipes-bsp/ipc/ipc-modules.inc new file mode 100644 index 0000000..015a91b --- /dev/null +++ b/recipes-bsp/ipc/ipc-modules.inc @@ -0,0 +1,39 @@ +SUMMARY = "Linux IPC KERNEL MODULE " +DESCRIPTION = "DSP boot application and ipc test application" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" + +require ipc.inc + +inherit module + +S = "${WORKDIR}/git" +python () { + ma = d.getVar("DISTRO_FEATURES", True) + arch = d.getVar("OVERRIDES", True) + + # the : after the arch is to skip the message on 64b + if not "multiarch" in ma and ("e5500:" in arch or "e6500:" in arch): + raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES") + + promote_kernel = d.getVar('BUILD_64BIT_KERNEL') + + if promote_kernel == "1": + d.setVar('KERNEL_CC_append', ' -m64') + d.setVar('KERNEL_LD_append', ' -melf64ppc') + + error_qa = d.getVar('ERROR_QA', True) + if 'arch' in error_qa: + d.setVar('ERROR_QA', error_qa.replace(' arch', '')) +} + +do_compile_prepend () { + cd ${S}/kernel + case ${MACHINE} in + bsc9132qds|bsc9131rdb) SOC=B913x;; + b4860qds|b4420qds) SOC=B4860;; + esac +} + +INHIBIT_PACKAGE_STRIP = "1" + diff --git a/recipes-bsp/ipc/ipc-ust_git.bb b/recipes-bsp/ipc/ipc-ust_git.bb new file mode 100644 index 0000000..c6b3cfe --- /dev/null +++ b/recipes-bsp/ipc/ipc-ust_git.bb @@ -0,0 +1,50 @@ +SUMMARY = "Linux IPC Userspace Tool" +DESCRIPTION = "DSP boot application and ipc test application" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10" + +require ipc.inc + +S = "${WORKDIR}/git" + +# workaround for issue of parallel build, required a actual fix in ipc source +PARALLEL_MAKE = "" + +EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC}" AR="${AR}"' + +do_compile () { + case ${MACHINE} in + bsc9132qds|bsc9131rdb) SOC=B913x;; + b4860qds|b4420qds|b4860qds-64b) SOC=B4860;; + esac + oe_runmake ${SOC}=1 +} + +do_install () { + install -d ${D}${bindir} + install -d ${D}${includedir} + install -d ${D}/ipc + install -m 755 ${S}/dsp_boot/dsp_bt ${D}/ipc + install -m 755 ${S}/ipc/ipc_test ${D}/ipc + install -m 755 ${S}/ipc/ipc_test67 ${D}/ipc + install -m 755 ${S}/ipc/l1d_app ${D}/ipc + install -m 755 ${S}/fsl_shm/app ${D}${bindir}/lg_shm_test + install -d ${D}${base_libdir} + install -m 755 ${S}/ipc/libipc.so ${D}${base_libdir} + install -m 755 ${S}/ipc/libmem.so ${D}${base_libdir} + install -m 755 ${S}/ipc/libdspboot.so ${D}${base_libdir} + install -d ${D}${includedir}/ipc + install -d ${D}${includedir}/ipc/ipc/include + install -d ${D}${includedir}/ipc/fsl_shm/lib + install ${S}/ipc/include/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/dsp_boot/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_ipc_types.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_heterogeneous_common.h ${D}${includedir}/ipc/ipc/include + install ${S}/kernel/fsl_heterogeneous_l1_defense.h ${D}${includedir}/ipc/ipc/include + install ${S}/fsl_shm/include/*.h ${D}${includedir}/ipc/ipc/include + install ${S}/fsl_shm/lib/*.h ${D}${includedir}/ipc/fsl_shm/lib +} + +FILES_${PN} += "/ipc/*" +FILES_${PN}-dbg += "/ipc/.debug" + diff --git a/recipes-bsp/ipc/ipc.inc b/recipes-bsp/ipc/ipc.inc new file mode 100644 index 0000000..22ab1e3 --- /dev/null +++ b/recipes-bsp/ipc/ipc.inc @@ -0,0 +1,7 @@ +DEPENDS = "virtual/kernel" + +SRC_URI = "git://git.freescale.com/ppc/sdk/ipc.git;nobranch=1" +SRCREV = "7e36edbbc5ac5271c85d45745b3e70f47771f262" + +COMPATIBLE_MACHINE = "(bsc9132qds|bsc9131rdb|b4860qds|b4420qds)" + -- cgit v1.2.3-54-g00ecf