summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-11-19 14:41:01 +0100
committerKoen Kooi <koen@openembedded.org>2008-11-19 14:41:01 +0100
commitf96aefecd1b692abad17905b8828c7212d8a4cb9 (patch)
tree42089816a1c657293731f87d45ca85ce02bc910e /packages
parent71781609dc1ab7d434e95626c7d25ea3624d428e (diff)
dsplink: add a dsplink-module recipe that uses Kbuild to build a kernel module
* also start transitioning monolithis recipe to build kernel parts as seperate recipes
Diffstat (limited to 'packages')
-rw-r--r--packages/dsplink/codec-engine_2.21.bb1
-rw-r--r--packages/dsplink/dsplink-module_1.60.bb43
-rw-r--r--packages/dsplink/dsplink.inc5
-rw-r--r--packages/dsplink/dsplink_1.60.bb1
-rw-r--r--packages/dsplink/files/Makefile-dsplink-kbuild74
5 files changed, 120 insertions, 4 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb
index 7c81704604..a77bb9520e 100644
--- a/packages/dsplink/codec-engine_2.21.bb
+++ b/packages/dsplink/codec-engine_2.21.bb
@@ -19,6 +19,7 @@ PV = "221"
SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \
file://Makefile.dsplink \
+ file://Makefile-dsplink-kbuild \
"
S = "${WORKDIR}/codec_engine_2_21"
diff --git a/packages/dsplink/dsplink-module_1.60.bb b/packages/dsplink/dsplink-module_1.60.bb
new file mode 100644
index 0000000000..e2a8ef3d63
--- /dev/null
+++ b/packages/dsplink/dsplink-module_1.60.bb
@@ -0,0 +1,43 @@
+# The tconf tool breaks if there is a '.' in your pwd
+PR = "r2"
+PE = "1"
+PV = "160"
+
+# Get dsplink tarball from TI website, place in sources and calculate
+# md5sum
+# Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/link/link_1_60/index.html
+
+SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_60.tar.gz \
+ file://Makefile.dsplink \
+ file://Makefile-dsplink-kbuild \
+"
+
+S = "${WORKDIR}/dsplink_1_60/dsplink"
+
+# Needed for buildscripts
+export DSPLINK="${S}"
+
+inherit module
+require ti-paths.inc
+
+do_configure() {
+ # Run perl script to create appropriate makefiles (v1.60 and up)
+ perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX --gppos=${GPPOS} --comps=ponslrm
+
+ mkdir -p ${S}/dsplink-kbuild-test
+ cp ${WORKDIR}/Makefile-dsplink-kbuild ${S}/dsplink-kbuild-test/Makefile
+}
+
+do_compile_prepend() {
+ cd ${S}/dsplink-kbuild-test/
+}
+
+do_install() {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ cp ${S}/dsplink-kbuild-test/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+
+
diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc
index 30d1ca3165..1f72d24f92 100644
--- a/packages/dsplink/dsplink.inc
+++ b/packages/dsplink/dsplink.inc
@@ -1,6 +1,6 @@
DESCRIPTION = "DSP Link for TI ARM/DSP processors"
-DEPENDS = "virtual/kernel perl-native"
+DEPENDS = "virtual/kernel dsplink-module perl-native"
RDEPENDS_${PN}-module = "update-modules"
RRECOMMENDS_${PN} = "${PN}-module"
@@ -48,9 +48,6 @@ do_compile () {
}
do_install () {
- install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
- cp ${S}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
-
install -d ${D}/${bindir}
# install ${S}/gpp/BUILD/EXPORT/RELEASE/loopgpp ${D}/${bindir}
install ${S}/gpp/BUILD/EXPORT/RELEASE/messagegpp ${D}/${bindir}
diff --git a/packages/dsplink/dsplink_1.60.bb b/packages/dsplink/dsplink_1.60.bb
index 12027770a9..6c7da5b83d 100644
--- a/packages/dsplink/dsplink_1.60.bb
+++ b/packages/dsplink/dsplink_1.60.bb
@@ -11,6 +11,7 @@ PV = "160"
SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_60.tar.gz \
file://Makefile.dsplink \
+ file://Makefile-dsplink-kbuild \
"
S = "${WORKDIR}/dsplink_1_60/dsplink"
diff --git a/packages/dsplink/files/Makefile-dsplink-kbuild b/packages/dsplink/files/Makefile-dsplink-kbuild
new file mode 100644
index 0000000000..0fdf896c86
--- /dev/null
+++ b/packages/dsplink/files/Makefile-dsplink-kbuild
@@ -0,0 +1,74 @@
+# Composite Makefile
+DIRSEP=/
+
+TI_DSPLINK_RELATIVE_PATH := ../
+
+# include the CURRENTCFG.mk
+include $(DSPLINK)$(DIRSEP)config$(DIRSEP)BUILD$(DIRSEP)CURRENTCFG.MK
+
+# Generate the list of sources
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)arch$(DIRSEP)SOURCES
+ARCH_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)arch$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)SOURCES
+LDRV_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
+LDRV_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)gen$(DIRSEP)SOURCES
+GEN_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)gen$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)SOURCES
+PMGR_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
+PMGR_SOURCES += $(addpreifx $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES
+PMGR_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP)SOURCES
+OSAL_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
+OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES
+OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES))
+
+DSPLINK_SOURCES := $(ARCH_SOURCES) $(LDRV_SOURCES) $(GEN_SOURCES) $(OSAL_SOURCES) $(PMGR_SOURCES)
+DSPLINK_OBJS := $(foreach srcFile, $(DSPLINK_SOURCES),$(basename $(srcFile)).o)
+
+################################################################################################
+# USER SIDE
+# Generate the list of sources
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)SOURCES
+API_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP),$(SOURCES))
+SOURCES :=
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
+API_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
+
+# CFLAGS
+EXTRA_CFLAGS = $(addprefix -D, $(TI_DSPLINK_GPP_DEFINES))
+EXTRA_CFLAGS += $(addprefix -I, $(TI_DSPLINK_GPP_INC_PATH))
+EXTRA_CFLAGS += -DEXPORT_SYMTAB
+EXTRA_CFLAGS += -DTRACE_KERNEL
+
+ifneq ($(KERNELRELEASE),)
+obj-m := dsplinkk.o
+libs-m := $(shell pwd)
+lib-m := $(foreach srcFile, $(API_SOURCES),$(basename $(srcFile)).o)
+dsplinkk-objs := $(DSPLINK_OBJS)
+else
+KDIR := /opt/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500
+PWD := $(shell pwd)
+all:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+endif
+
+clean:
+ find $(DSPLINK) -name "*.o" -exec rm {} \;
+ rm -fr dsplinkk.ko dsplinkk.mod.c Module.symvers