summaryrefslogtreecommitdiff
path: root/packages/dsplink
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-10-22 11:45:12 +0200
committerKoen Kooi <koen@openembedded.org>2008-10-22 11:45:12 +0200
commit976dcd1843d07fd2c2ee4aacc408c5528f434ae0 (patch)
treea6e6b92415a912714193734c86c22c4de728803e /packages/dsplink
parentb0a9656acb9e03a77786abfd47cadf43531b9dcc (diff)
dsplink: overhaul buildsystem
* 1.60 builds, needs tweaks to actually run * you can't have a '.' in your pwd, it upsets the javascript config util, hence the fragile PV and PR munging * needs to use gcc-cross-kernel instead of regular gcc * pretty hardcoded to omap, but that should get fixed soon
Diffstat (limited to 'packages/dsplink')
-rw-r--r--packages/dsplink/dsplink.inc83
-rw-r--r--packages/dsplink/dsplink_1.51.00.08.bb1
-rw-r--r--packages/dsplink/dsplink_1.60.00.04.bb21
-rwxr-xr-xpackages/dsplink/files/Makefile.dsplink106
-rw-r--r--packages/dsplink/files/c64xx_5.xx_linux.mk2
-rw-r--r--packages/dsplink/ti-paths.inc4
6 files changed, 161 insertions, 56 deletions
diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc
index f303b6e53f..780ea43d12 100644
--- a/packages/dsplink/dsplink.inc
+++ b/packages/dsplink/dsplink.inc
@@ -16,7 +16,7 @@ require ti-paths.inc
DSPLINKPLATFORM ?= "Davinci"
DSPLINKPLATFORM_omap5912osk = "OMAP"
-DSPLINKPLATFORM_beagleboard = "OMAP"
+DSPLINKPLATFORM_beagleboard = "OMAP3530"
DSPLINKPLATFORM_davinci-sffsdr = "Davinci"
DSPLINKPLATFORM_davinci-dvevm = "Davinci"
@@ -32,21 +32,21 @@ KERNELARMFLAGS = "-include linux/autoconf.h -c -iwithprefix include -Iinclude -W
-fno-omit-frame-pointer -mapcs -mno-sched-prolog \
-mlittle-endian \
-D__LINUX_ARM_ARCH__=5 -march=armv5t -mtune=arm9tdmi \
- -msoft-float -Uarm -mapcs \
+ -Uarm \
-Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux"
KERNELARMFLAGS_armv6 = "-include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \
-Wno-trigraphs -fno-strict-aliasing -fno-common \
-fno-omit-frame-pointer -mapcs -mno-sched-prolog \
-mlittle-endian \
-D__LINUX_ARM_ARCH__=6 -march=armv6j -mtune=arm1136jf-s \
- -msoft-float -Uarm -mapcs \
+ -Uarm \
-Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux"
KERNELARMFLAGS_armv7a = "-c -nostdinc -include $(BASE_OSINC)/linux/autoconf.h -isystem $(OSINC_PLATFORM) -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \
-Wno-trigraphs -fno-strict-aliasing -fno-common \
-fno-omit-frame-pointer -mapcs -mno-sched-prolog \
-mlittle-endian \
-D__LINUX_ARM_ARCH__=7 -march=armv7-a -mtune=cortex-a8 \
- -msoft-float -Uarm -mapcs \
+ -Uarm \
-Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux \
-D__KERNEL__ -mno-thumb-interwork -msoft-float -fno-optimize-sibling-calls -g -fno-stack-protector -Wno-pointer-sign -g -DUSE_UDEV=1 -DOS_LINUX -DLINUX_KERNEL"
@@ -54,56 +54,38 @@ DSPFLAGS = "-q -pdr -pdv -pden -ml3 -mv64+ "
export DSPLINKPLATFORM
export DSPLINKDSP
+export DSPLINKSOC
do_configure () {
- cp ${WORKDIR}/CURRENTCFG.MK ${S}/config
- cp ${WORKDIR}/openembedded.mk ${S}/make/Linux
- cp ${WORKDIR}/c64xx_5.xx_linux.mk ${S}/make/DspBios
-
- sed -i -e s:SED_ME_SOURCEDIR:${S}:g \
- -e s:SED_ME_GPPDISTRO:openembedded:g \
- -e s:SED_ME_KERNELVERSION:${KERNEL_VERSION}:g \
- -e s:SED_ME_DSPDISTRO:c64xx_5.xx_linux:g \
- -e s:SED_ME_PLATFORM:${DSPLINKPLATFORM}:g \
- -e s:SED_ME_DSP:${DSPLINKDSP}:g \
- -e s:SED_ME_SOC:${DSPLINKSOC}:g \
- ${S}/config/CURRENTCFG.MK
-
- sed -i -e s:SED_ME_CROSS:${STAGING_INCDIR}:g \
- -e s:SED_ME_STAGINGDIR:${STAGING_DIR_TARGET}:g \
- -e s:SED_ME_TARGET_PREFIX:${TARGET_PREFIX}:g \
- -e s:SED_ME_KERNELDIR:${STAGING_KERNEL_DIR}:g \
- -e 's:SEDME_KERNEL_ARMFLAGS:${KERNELARMFLAGS}:g' \
- -e 's:SEDME_USER_ARMFLAGS:${USERARMFLAGS}:g' \
- ${S}/make/Linux/openembedded.mk
-
- sed -i -e s:SEDME_TITOOLS_BASEPATH:${TITOOLSDIR}:g \
- -e s:SEDME_BIOSUNPACKDIR:${TIBIOSDIR}:g \
- -e s:SEDME_CGTOOLSDIR:${TICGTOOLSDIR}:g \
- -e 's:SEDME_DSPFLAGS:${DSPFLAGS}:g' \
- ${S}/make/DspBios/c64xx_5.xx_linux.mk
+
+# Run perl script to create appropriate makefiles (v1.60 and up)
+DSPLINK=${S} perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=OMAP3530SHMEM --dspos_0=DSPBIOS5XX --gppos=OMAPLSP --comps=ponslrmc
+
}
PARALLEL_MAKE = ""
do_compile () {
- ln -sf ${S}/gpp/src/api/*h ${S}/gpp/inc/
- ln -sf ${S}/gpp/src/pmgr/Linux/2.6.18 ${S}/gpp/src/pmgr/Linux/${KERNEL_VERSION}
- ln -sf ${S}/gpp/src/api/Linux/2.6.18 ${S}/gpp/src/api/Linux/${KERNEL_VERSION}
- ln -sf ${S}/gpp/src/osal/Linux/2.6.18 ${S}/gpp/src/osal/Linux/${KERNEL_VERSION}
- ln -sf ${S}/gpp/src/pmgr/Linux/drv_pmgr.h ${S}/gpp/inc/drv_pmgr.h
- ln -sf ${S}/gpp/src/pmgr/pmgr_proc.h ${S}/gpp/inc/pmgr_proc.h
-
unset DISPLAY
+ sed -i -e s:armv7a:armv7-a:g make/Linux/omap3530_2.6.mk || true
+
+ # export various settings to override the defaults in the makefiles
+ export DSP_BASE_CGTOOLS=${TITOOLSDIR}/${TICGTOOLSDIR}
+ export DSP_BASE_BIOS=${TITOOLSDIR}/${TIBIOSDIR}
+ export DSP_BASE_RTDX=${TITOOLSDIR}/${TIBIOSDIR}/packages/ti/rtdx
+ export GPPTOOL_DIR=${CROSS_DIR}
+ export LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
+ export LINK_INSTALL_DIR=${S}
+ export VARIANT=${DSPLINKSOC}
+ export PLATFORM=${DSPLINKPLATFORM}
+ export BASE_TOOLCHAIN=${CROSS_DIR}
+ export BASE_CGTOOLS=${BASE_TOOLCHAIN}/bin
+ export OSINC_PLATFORM1=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include
+ export OSINC_TARGET=${BASE_TOOLCHAIN}/target/usr/include
+ export ARCHIVER_AR=${TARGET_PREFIX}ar
+ export BASE_SABIOS=${DSP_BASE_BIOS}
- sed -i -e 's:gcc:gcc${KERNEL_CCSUFFIX}:' ${S}/make/Linux/openembedded.mk
- oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" -C ${S}/gpp/src all targets
-
- sed -i -e 's:gcc${KERNEL_CCSUFFIX}:gcc:' ${S}/make/Linux/openembedded.mk
- oe_runmake -C ${S}/gpp/src/samples
-
- oe_runmake -C ${S}/dsp/src
- oe_runmake -C ${S}/dsp/src/samples
+ make -e -f ${WORKDIR}/Makefile.dsplink
}
do_install () {
@@ -121,14 +103,9 @@ do_install () {
install ${S}/gpp/BUILD/EXPORT/RELEASE/scalegpp ${D}/${bindir}
install -d ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/loop.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/messagemulti.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/message.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/mpcsxfer.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/mplist.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/readwrite.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/ringio.out ${D}/${datadir}/dsplink
- install ${S}/dsp/BUILD/EXPORT/RELEASE/scale.out ${D}/${datadir}/dsplink
+ for i in $(find ${S}/dsp/BUILD/ -name "*.out") ; do
+ install ${i} ${D}/${datadir}/dsplink
+ done
install -d ${D}/${libdir}
install -m 0755 ${S}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib ${D}/${libdir}
diff --git a/packages/dsplink/dsplink_1.51.00.08.bb b/packages/dsplink/dsplink_1.51.00.08.bb
index 8bbff51917..40f65e5801 100644
--- a/packages/dsplink/dsplink_1.51.00.08.bb
+++ b/packages/dsplink/dsplink_1.51.00.08.bb
@@ -17,6 +17,7 @@ SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_51_00_08.tar.gz \
file://c64xx_5.xx_linux.mk \
file://openembedded.mk \
file://prcs-fix-include.patch;patch=1;pnum=2 \
+ file://Makefile.dsplink \
"
SRC_URI_append_beagleboard = " \
diff --git a/packages/dsplink/dsplink_1.60.00.04.bb b/packages/dsplink/dsplink_1.60.00.04.bb
new file mode 100644
index 0000000000..2e0de85b58
--- /dev/null
+++ b/packages/dsplink/dsplink_1.60.00.04.bb
@@ -0,0 +1,21 @@
+require dsplink.inc
+
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_armv7a = "1"
+
+# The tconf tool breaks if there is a '.' in your pwd
+PR = "r0"
+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/index.html
+
+SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_60_00_04.tar.gz \
+ file://Makefile.dsplink \
+"
+
+S = "${WORKDIR}/dsplink_1_60_00_04/dsplink"
+
diff --git a/packages/dsplink/files/Makefile.dsplink b/packages/dsplink/files/Makefile.dsplink
new file mode 100755
index 0000000000..7156bcbda3
--- /dev/null
+++ b/packages/dsplink/files/Makefile.dsplink
@@ -0,0 +1,106 @@
+#
+# ======== makeunix ========
+#
+
+# Import Tools Path from Rules.make
+#include Rules.make
+
+PROJECT_BASE_DIR = $(shell pwd)
+LINUXKERNEL_INSTALL_DIR:=/home/rmonklocal/oe/angstrom-davinci-dvevm-tmp/staging/davinci-dvevm-angstrom-linux-gnueabi/kernel
+LINK_INSTALL_DIR := /home/rmonklocal/dsplink_1_51/dsplink
+
+# The prefix to be added before the GNU compiler tools (optionally including
+# path), i.e. "arm_v5t_le-" or "/opt/bin/arm_v5t_le-".
+GPPTOOL_DIR:=/home/rmonklocal/oe/angstrom-davinci-dvevm-tmp/cross
+
+# ---- DSP tools ----
+DSP_BASE_CGTOOLS := /home/rmonklocal/opt/cg6x_6_0_19
+DSP_BASE_BIOS := /home/rmonklocal/opt/bios_5_32_03
+DSP_BASE_RTDX := /home/rmonklocal/opt/bios_5_32_03/packages/ti/rtdx
+OSINC_PLATFORM1 := something
+ARCHIVER_AR := something
+
+# ---- get build host OS ----
+UNAME=$(shell uname)
+ifeq "$(UNAME)" "Linux"
+ BUILD_HOST_OS=Linux
+else
+ BUILD_HOST_OS=Solaris
+endif
+
+# ---- construct Link build make vars ----
+GPP_MAKE_OPTS := COMPILER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \
+ LINKER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \
+ LD=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \
+ ARCHIVER1=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \
+ ARCHIVER2=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \
+ CROSS_COMPILE=arm-angstrom-linux-gnueabi- \
+ DSPLINK=$(LINK_INSTALL_DIR) \
+ BASE_TOOLCHAIN=$(GPPTOOL_DIR) \
+ BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) \
+ ARCHIVER=$(ARCHIVER_AR) OSINC_PLATFORM=$(OSINC_PLATFORM1) \
+ #STD_KRNL_FLAGS=\
+ -include linux/autoconf.h -c -iwithprefix include -Iinclude -Wall -Wstrict-prototypes \
+ -Wno-trigraphs -fno-strict-aliasing -fno-common \
+ -fno-omit-frame-pointer -mapcs -mno-sched-prolog \
+ -mlittle-endian \
+ -D__LINUX_ARM_ARCH__=5 -march=armv5t -mtune=arm9tdmi \
+ -msoft-float -Uarm -mapcs \
+ -Wdeclaration-after-statement -Os -marm -mabi=aapcs-linux
+
+ #STD_KRNL_FLAGS=\
+ -nostdinc \
+ -isystem /home/rmonklocal/oe/angstrom-davinci-dvevm-tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.2.4/include \
+ -D__KERNEL__ \
+ -Iinclude -include include/linux/autoconf.h \
+ -mlittle-endian \
+ -Wall \
+ -Wundef \
+ -Wstrict-prototypes \
+ -Wno-trigraphs \
+ -fno-strict-aliasing \
+ -fno-common \
+ -Werror-implicit-function-declaration \
+ -Os \
+ -fno-stack-protector \
+ -marm \
+ -fno-omit-frame-pointer \
+ -mapcs \
+ -mno-sched-prolog \
+ -mabi=aapcs-linux \
+ -mno-thumb-interwork \
+ -D__LINUX_ARM_ARCH__=5 \
+ -march=armv5te \
+ -mtune=arm9tdmi \
+ -msoft-float \
+ -Uarm \
+ -fno-omit-frame-pointer \
+ -fno-optimize-sibling-calls \
+ -Wdeclaration-after-statement \
+ -Wno-pointer-sign \
+ -c
+
+DSP_MAKE_OPTS := DSPLINK=$(DSPLINK) \
+ DPPROOT=$(DSPLINK)/dsp \
+ BASE_SABIOS=$(DSP_BASE_BIOS) \
+ BASE_CGTOOLS=$(DSP_BASE_CGTOOLS) \
+ BASE_RTDX=$(DSP_BASE_RTDX)
+
+
+# ======== all ========
+all: $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko
+
+$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko:
+ @echo Building DSPLINK GPP driver, libs
+ make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS)
+ make -s -C $(DSPLINK)/gpp/src/samples $(GPP_MAKE_OPTS)
+ @echo Building DSPLINK DSP libs and message sample for DaVinci...
+ make -C $(DSPLINK)/dsp/src $(DSP_MAKE_OPTS)
+ make -C $(DSPLINK)/dsp/src/samples $(DSP_MAKE_OPTS)
+
+# clean rules
+clean:
+ @echo Cleaning DSPLINK GPP driver, libs
+ make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS) clean
+ @rm -rf $(LINK_INSTALL_DIR)/gpp/export/BIN/*
+ @rm -rf $(LINK_INSTALL_DIR)/gpp/export/INCLUDE/*
diff --git a/packages/dsplink/files/c64xx_5.xx_linux.mk b/packages/dsplink/files/c64xx_5.xx_linux.mk
index ea806fff4e..0a75c147ae 100644
--- a/packages/dsplink/files/c64xx_5.xx_linux.mk
+++ b/packages/dsplink/files/c64xx_5.xx_linux.mk
@@ -135,7 +135,7 @@ CC_SW_REL := -o3
# ----------------------------------------------------------------------------
# Standard flags for the compiler
# ----------------------------------------------------------------------------
-STD_CC_FLAGS := SEDME_DSPFLAGS -d"CHIP_DM642"
+STD_CC_FLAGS := SEDME_DSPFLAGS
# ----------------------------------------------------------------------------
# Standard flags for the compiler when building an executable
diff --git a/packages/dsplink/ti-paths.inc b/packages/dsplink/ti-paths.inc
index 83cbe683c0..3657d54527 100644
--- a/packages/dsplink/ti-paths.inc
+++ b/packages/dsplink/ti-paths.inc
@@ -1,8 +1,8 @@
# Path to the dir where the TI tools are unpacked
TITOOLSDIR ?= "/OE/TI"
# Path under TITOOLSDIR where dspbios is unpacked
-TIBIOSDIR ?= "bios_5_32_03"
+TIBIOSDIR ?= "bios_5_32_04"
TIXDCTOOLSDIR ?= "${TIBIOSDIR}/xdctools"
# Path under TITOOLSDIR where the dsp toolchain is unpacked
-TICGTOOLSDIR ?= "cg6x_6_1_2"
+TICGTOOLSDIR ?= "cg6x_6_0_19"