diff options
author | Koen Kooi <koen@openembedded.org> | 2009-06-16 16:08:09 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-06-16 16:08:09 +0200 |
commit | 8687813463bc7c9f37349000f75cfc0967da8458 (patch) | |
tree | eb550c22da7a2d9b35c64aee09172bd9d117c098 | |
parent | d895433b6c50e46edd9a75ed512455513f8e00df (diff) |
dvsdk: sync with TI overlay (http://arago-project.org/git/people/?p=brijesh/arago-dvsdk.git;a=summary)
* cleanups will follow later
42 files changed, 2260 insertions, 501 deletions
diff --git a/recipes/dvsdk/files/config.bld b/recipes/dvsdk/files/config.bld new file mode 100644 index 0000000000..2e99cab0b0 --- /dev/null +++ b/recipes/dvsdk/files/config.bld @@ -0,0 +1,48 @@ +/* + * CROSS_DIR - toolchain installation location + * PLATFORM - platform to be build + * doBuildArm - true (to build arm) + * doBuildDsp - true (to build dsp) + * buildDualCpu - build example for dual cpu + */ + +var buildTable = { + "Arm": [{doBuild: doBuildArm, + target: "gnu.targets.arm.GCArmv5T", + cgtoolsRootDir: "CROSS_DIR", + platforms: [ + {platform: "PLATFORM", dualCpu: buildDualCpu, outDir: "bin/PLATFORM"}, + ], + }], + "DSP": [{doBuild: doBuildDsp, + target: "ti.targets.C64P", + cgtoolsRootDir: "TICGTOOLSDIR", + platforms: [ + {platform: "PLATFORM", outDir: "bin/PLATFORM"}, + ], + }] + +}; + +var targets = []; +var userbldBuildPlatforms = {}; +for each (var cpu in buildTable) { + for (var t = 0; t < cpu.length; t++) { + if (cpu[t].doBuild) { + var targ = xdc.useModule(cpu[t].target); + targets.push(targ); + targ.rootDir = cpu[t].cgtoolsRootDir; + userbldBuildPlatforms[targ.name] = cpu[t].platforms; + } + } +} + +Build.targets = targets; +for (var i = 0; i < Build.targets.length; i++) { + var t = targets[i]; + + if (t.name == "GCArmv5T") { + t.LONGNAME = "bin/CROSS_PREFIX"; + } +} + diff --git a/recipes/dvsdk/files/dm355mm_1_30.patch b/recipes/dvsdk/files/dm355mm_1_30.patch new file mode 100644 index 0000000000..6ee6064f5a --- /dev/null +++ b/recipes/dvsdk/files/dm355mm_1_30.patch @@ -0,0 +1,498 @@ +diff -uNr dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c +--- dm355_codecs_1_13_000/dm355mm/module/dm350mmap.c 2009-05-20 11:22:57.000000000 -0500 ++++ dm355_codecs_1_13_000.new/dm355mm/module/dm350mmap.c 2009-06-09 10:43:25.000000000 -0500 +@@ -7,7 +7,7 @@ + * Use of this software is controlled by the terms and conditions found in the + * license agreement under which this software has been supplied or provided. + * ============================================================================ +- */ ++ */ + #include <linux/module.h> + #include <linux/init.h> + #include <linux/moduleparam.h> +@@ -20,274 +20,283 @@ + #include <linux/proc_fs.h> + #include <linux/kernel.h> + #include <linux/device.h> +- ++#include <linux/clk.h> ++ + #include <asm/page.h> + #include <asm/uaccess.h> + #include <asm/pgtable.h> + #include <asm/io.h> +-#include<asm/system.h> +-#include<asm-arm/memory.h> ++#include <asm/system.h> ++#include <asm/memory.h> ++ + #include <asm/irq.h> +- ++ ++#include <linux/version.h> + #include <linux/completion.h> +-#include <asm/arch/edma.h> +- ++#include <mach/edma.h> ++ + #define ASQINT_ENABLE +- typedef struct _edma_params +-{ +- unsigned long src; +- unsigned long dst; +- unsigned int srcmode; +- unsigned int srcfifowidth; +- int srcbidx; +- int srccidx; +- unsigned int dstmode; +- unsigned int dstfifowidth; +- int dstbidx; +- int dstcidx; +- int acnt; +- int bcnt; +- int ccnt; +- int bcntrld; +- int syncmode; +- } edma_params; ++typedef struct _edma_params { ++ unsigned long src; ++ unsigned long dst; ++ unsigned int srcmode; ++ unsigned int srcfifowidth; ++ int srcbidx; ++ int srccidx; ++ unsigned int dstmode; ++ unsigned int dstfifowidth; ++ int dstbidx; ++ int dstcidx; ++ int acnt; ++ int bcnt; ++ int ccnt; ++ int bcntrld; ++ int syncmode; ++} edma_params; + + #define DM350MMAP_IOCMEMCPY 0x7 + #define DM350MMAP_IOCWAIT 0x8 + #define DM350MMAP_IOCCLEAR_PENDING 0x9 +- ++ + #ifdef __DEBUG +-#define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args) ++# define __D(fmt, args...) printk(KERN_DEBUG "DM350MMAP Debug: " fmt, ## args) + #else /* */ +-#define __D(fmt, args...) ++# define __D(fmt, args...) + #endif /* */ +- ++ + #define __E(fmt, args...) printk(KERN_ERR "DM350MMAP Error: " fmt, ## args) +- ++ + #define MAXTYPE(T) ((T) (((T)1 << ((sizeof(T) * 8) - 1) ^ ((T) -1)))) +- ++ + static int major = 0; + + #if (USE_UDEV==1) + static struct class *dm350mmap_class; +- + #endif // USE_UDEV +-static DECLARE_MUTEX_LOCKED (dm350mmap_reply_mutex); +-int master_ch; +-struct completion edmacompletion; +- +-/* Forward declaration of system calls */ +-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long args); +-static int mmap (struct file *filp, struct vm_area_struct *vma); +-static int open (struct inode *inode, struct file *filp); +-static int release (struct inode *inode, struct file *filp); ++ ++static DECLARE_MUTEX(dm350mmap_reply_mutex); ++static struct completion edmacompletion; ++ ++/* Forward declaration of system calls */ ++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd, ++ unsigned long args); ++static int mmap(struct file *filp, struct vm_area_struct *vma); ++static int open(struct inode *inode, struct file *filp); ++static int release(struct inode *inode, struct file *filp); + static struct file_operations dm350mmap_fxns = { ioctl: ioctl, mmap: mmap, open: open, release:release +- + }; + +-static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs) ++/* Structure to hold mjcp clock info */ ++static struct clk *mjcp = NULL; ++ ++//static irqreturn_t irq_handler (int irq, void *dev_id, struct pt_regs *regs) ++static irqreturn_t irq_handler(int irq, void *dev_id) + { +- +- /* Release the mutex, suggesting sequencer processing complete */ +- up (&dm350mmap_reply_mutex); +- return IRQ_HANDLED; ++ /* Release the mutex, suggesting sequencer processing complete */ ++ up(&dm350mmap_reply_mutex); ++ return IRQ_HANDLED; + } + +-static void memcpy_dma_irq_handler (int lch, u16 ch_status, void *data) ++static void memcpy_dma_irq_handler(unsigned lch, u16 ch_status, void *data) + { +- complete_all (&edmacompletion); +-} ++ complete_all(&edmacompletion); ++} + +-static int mmap (struct file *filp, struct vm_area_struct *vma) ++static int mmap(struct file *filp, struct vm_area_struct *vma) + { +- __D ("mmap: vma->vm_start = %#lx\n", vma->vm_start); +- __D ("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff); +- __D ("mmap: vma->vm_end = %#lx\n", vma->vm_end); +- __D ("mmap: size = %#lx\n", vma->vm_end - vma->vm_start); +- vma->vm_page_prot = pgprot_noncached (vma->vm_page_prot); +- if (remap_pfn_range (vma, vma->vm_start, +- +-#ifdef LINUX_2_6_18 +- (vma->vm_pgoff >> PAGE_SHIFT), ++ __D("mmap: vma->vm_start = %#lx\n", vma->vm_start); ++ __D("mmap: vma->vm_pgoff = %#lx\n", vma->vm_pgoff); ++ __D("mmap: vma->vm_end = %#lx\n", vma->vm_end); ++ __D("mmap: size = %#lx\n", vma->vm_end - vma->vm_start); ++ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); ++ if (remap_pfn_range(vma, vma->vm_start, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) ++ (vma->vm_pgoff >> PAGE_SHIFT), + #else /* */ +- vma->vm_pgoff, ++ vma->vm_pgoff, + #endif /* */ +- +- vma->vm_end - vma->vm_start, vma->vm_page_prot)) +- { +- __E ("mmap: failed remap_pfn_range\n"); +- return -EAGAIN; ++ vma->vm_end - vma->vm_start, vma->vm_page_prot)) { ++ __E("mmap: failed remap_pfn_range\n"); ++ return -EAGAIN; + } +- return 0; ++ return 0; + } + + +-static int ioctl (struct inode *inode, struct file *filp, unsigned int cmd, +- unsigned long args) ++static int ioctl(struct inode *inode, struct file *filp, unsigned int cmd, ++ unsigned long args) + { +- unsigned int __user *argp = (unsigned int __user *) args; +- edma_params edmaparams; +- int err = 0, tcc = EDMA_TCC_ANY; +- struct paramentry_descriptor paramentry; +- switch (cmd) +- { +- +- /* +- * Tries to clear any previously unaccounted interrupt. +- */ +- case DM350MMAP_IOCCLEAR_PENDING: +- +- { +- int retval; +- __D ("Clear Pending Call received.\n"); +- init_MUTEX_LOCKED(&dm350mmap_reply_mutex); +- return 0; +- } +- break; +- +- /* +- * Blocks till the sequencer completion interrupt arrives. +- */ +- case DM350MMAP_IOCWAIT: +- +- { +- int retval; +- __D ("WAIT Call received.\n"); +- retval = down_interruptible (&dm350mmap_reply_mutex); +- return retval; +- } +- break; +- case DM350MMAP_IOCMEMCPY: +- __D ("MEMCPY ioctl received.\n"); +- if (copy_from_user (&edmaparams, argp, sizeof (edmaparams))) +- { +- return -EFAULT; +- } +- err = +- davinci_request_dma (EDMA_DMA_CHANNEL_ANY, "EDMA memcpy", +- memcpy_dma_irq_handler, NULL, &master_ch, &tcc, +- EVENTQ_1); +- +- /* Handle Failure condition here */ +- if (err < 0) +- { +- __E ("Error in requesting Master channel %d = 0x%x\n", master_ch, +- err); +- return err; +- } +- davinci_stop_dma (master_ch); +- init_completion (&edmacompletion); +- davinci_set_dma_src_params (master_ch, +- (unsigned long) edmaparams.src, +- edmaparams.srcmode, +- edmaparams.srcfifowidth); +- davinci_set_dma_dest_params (master_ch, +- (unsigned long) edmaparams.dst, +- edmaparams.dstmode, +- edmaparams.dstfifowidth); +- davinci_set_dma_src_index (master_ch, edmaparams.srcbidx, +- edmaparams.srccidx); +- davinci_set_dma_dest_index (master_ch, edmaparams.dstbidx, +- edmaparams.dstcidx); +- davinci_set_dma_transfer_params (master_ch, edmaparams.acnt, +- edmaparams.bcnt, edmaparams.ccnt, +- edmaparams.bcntrld, +- edmaparams.syncmode); +- davinci_get_dma_params (master_ch, ¶mentry); +- +- /*printk("%x : %x : %x : %x : %x : %x : %x\n", paramentry.opt, +- paramentry.a_b_cnt, paramentry.src_dst_bidx, +- paramentry.src_dst_cidx, paramentry.ccnt, paramentry.src, +- paramentry.dst); */ +- davinci_set_dma_params (master_ch, ¶mentry); +- davinci_start_dma (master_ch); +- wait_for_completion (&edmacompletion); +- +- //printk("Dma completed... \n"); +- davinci_stop_dma (master_ch); +- davinci_free_dma (master_ch); +- break; +- default: +- __E ("Unknown ioctl received = %d.\n", cmd); +- return -EINVAL; ++ unsigned int __user *argp = (unsigned int __user *) args; ++ edma_params edmaparams; ++ int edma_channel; ++ int retval = 0; ++ struct edmacc_param p_ram; ++ ++ switch (cmd) { ++ ++ /* ++ * Tries to clear any previously unaccounted interrupt. ++ */ ++ case DM350MMAP_IOCCLEAR_PENDING: ++ __D("Clear Pending Call received.\n"); ++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex); ++ break; ++ ++ /* ++ * Blocks till the sequencer completion interrupt arrives. ++ */ ++ case DM350MMAP_IOCWAIT: ++ __D("WAIT Call received.\n"); ++ retval = down_interruptible(&dm350mmap_reply_mutex); ++ break; ++ ++ case DM350MMAP_IOCMEMCPY: ++ __D("MEMCPY ioctl received.\n"); ++ if (copy_from_user(&edmaparams, argp, sizeof(edmaparams))) { ++ retval = -EFAULT; ++ break; ++ } ++ ++ edma_channel = ++ edma_alloc_channel(EDMA_CHANNEL_ANY, &memcpy_dma_irq_handler, ++ NULL, EVENTQ_1); ++ ++ /* Handle Failure condition here */ ++ if (edma_channel < 0) { ++ __E("Error in requesting Master channel = 0x%x\n", ++ edma_channel); ++ retval = edma_channel; ++ break; ++ } ++ ++ edma_stop(edma_channel); ++ ++ init_completion(&edmacompletion); ++ ++ edma_set_src(edma_channel, ++ (dma_addr_t) edmaparams.src, ++ edmaparams.srcmode, edmaparams.srcfifowidth); ++ ++ edma_set_dest(edma_channel, ++ (dma_addr_t) edmaparams.dst, ++ edmaparams.dstmode, edmaparams.dstfifowidth); ++ ++ edma_set_src_index(edma_channel, edmaparams.srcbidx, ++ edmaparams.srccidx); ++ edma_set_dest_index(edma_channel, edmaparams.dstbidx, ++ edmaparams.dstcidx); ++ ++ edma_set_transfer_params(edma_channel, ++ edmaparams.acnt, ++ edmaparams.bcnt, ++ edmaparams.ccnt, ++ edmaparams.bcntrld, edmaparams.syncmode); ++ ++ edma_read_slot(edma_channel, &p_ram); ++ p_ram.opt |= TCINTEN | EDMA_TCC(edma_channel); ++ edma_write_slot(edma_channel, &p_ram); ++ ++ edma_start(edma_channel); ++ wait_for_completion(&edmacompletion); ++ edma_stop(edma_channel); ++ edma_free_channel(edma_channel); ++ break; ++ ++ default: ++ __E("Unknown ioctl received = %d.\n", cmd); ++ retval = -EINVAL; ++ break; + } +- return 0; ++ ++ return retval; + } + + +-static int open (struct inode *inode, struct file *filp) ++static int open(struct inode *inode, struct file *filp) + { +- __D ("open: called.\n"); +- return 0; ++ __D("open: called.\n"); ++ return 0; + } + + +-static int release (struct inode *inode, struct file *filp) ++static int release(struct inode *inode, struct file *filp) + { +- __D ("close: called."); +- return 0; ++ __D("close: called."); ++ return 0; + } + + +-int __init dm350mmap_init (void) ++int __init dm350mmap_init(void) + { +- __D ("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n"); +- major = register_chrdev (0, "dm350mmap", &dm350mmap_fxns); +- if (major < 0) +- { +- __E ("Failed to allocate major number.\n"); +- return -ENODEV; ++ /* In the GIT kernel unused clocks are disabled. To run codec we need to ++ * enable mjcp clock. ++ */ ++ mjcp = clk_get(NULL, "mjcp"); ++ if (IS_ERR(mjcp)) ++ printk(KERN_WARNING "unable to get MJCP clock\n"); ++ else ++ clk_enable(mjcp); ++ ++ __D("** DM350MMAP kernel module built: " __DATE__ " " __TIME__ "\n"); ++ major = register_chrdev(0, "dm350mmap", &dm350mmap_fxns); ++ if (major < 0) { ++ __E("Failed to allocate major number.\n"); ++ return -ENODEV; + } +- __D ("Allocated major number: %d\n", major); +- ++ __D("Allocated major number: %d\n", major); ++ + #if (USE_UDEV==1) +- dm350mmap_class = class_create (THIS_MODULE, "dm350mmap"); +- if (IS_ERR (dm350mmap_class)) +- { +- __E ("Error creating dm350mmap device class.\n"); +- return -EIO; ++ dm350mmap_class = class_create(THIS_MODULE, "dm350mmap"); ++ if (IS_ERR(dm350mmap_class)) { ++ __E("Error creating dm350mmap device class.\n"); ++ return -EIO; + } +- class_device_create (dm350mmap_class, NULL, MKDEV (major, 0), NULL, +- "dm350mmap"); +- ++ class_device_create(dm350mmap_class, NULL, MKDEV(major, 0), NULL, ++ "dm350mmap"); ++ + #endif // USE_UDEV +- __D ("Successfully initialized module\n"); +- ++ __D("Successfully initialized module\n"); ++ + #ifdef ASQINT_ENABLE +- if (request_irq (IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL)) +- { +- __D ("Could not install ISR\n"); ++ if (request_irq(IRQ_ASQINT, irq_handler, 0, "seq_arm_interrupt", NULL)) { ++ __D("Could not install ISR\n"); + } +- ++ + #endif /* */ ++ init_MUTEX_LOCKED(&dm350mmap_reply_mutex); + return 0; + } + + +-void __exit dm350mmap_exit (void) ++void __exit dm350mmap_exit(void) + { +- __D ("In dm350mmap_exit()\n"); +- ++ /* if mjcp clock is enabled then free it */ ++ if (mjcp) { ++ clk_disable(mjcp); ++ clk_put(mjcp); ++ } ++ ++ __D("In dm350mmap_exit()\n"); ++ + #if (USE_UDEV==1) +- class_device_destroy (dm350mmap_class, MKDEV (major, 0)); +- class_destroy (dm350mmap_class); +- ++ class_device_destroy(dm350mmap_class, MKDEV(major, 0)); ++ class_destroy(dm350mmap_class); ++ + #endif // USE_UDEV +- __D ("Unregistering character device dm350mmap\n"); +- unregister_chrdev (major, "dm350mmap"); +- ++ __D("Unregistering character device dm350mmap\n"); ++ unregister_chrdev(major, "dm350mmap"); ++ + #ifdef ASQINT_ENABLE +- free_irq (IRQ_ASQINT, NULL); +- ++ free_irq(IRQ_ASQINT, NULL); ++ + #endif /* */ +- __D ("dm350mmap unregistered\n"); +-} ++ __D("dm350mmap unregistered\n"); ++} + +-module_init (dm350mmap_init); ++module_init(dm350mmap_init); + +-module_exit (dm350mmap_exit); +-MODULE_LICENSE ("GPL"); +-MODULE_AUTHOR ("Texas Instruments"); +-MODULE_DESCRIPTION ("DM350 mmap export to userland"); ++module_exit(dm350mmap_exit); ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Texas Instruments"); ++MODULE_DESCRIPTION("DM350 mmap export to userland"); + diff --git a/recipes/dvsdk/files/dvsdk-rules/Makefile b/recipes/dvsdk/files/dvsdk-rules/Makefile new file mode 100644 index 0000000000..edb74e0999 --- /dev/null +++ b/recipes/dvsdk/files/dvsdk-rules/Makefile @@ -0,0 +1,339 @@ +include Rules.make + +COMPONENTS:=$(DMAI_INSTALL_DIR) $(LINK_INSTALL_DIR) $(XDAIS_INSTALL_DIR) $(CMEM_INSTALL_DIR) $(EDMA3_LLD_INSTALL_DIR) $(FC_INSTALL_DIR) $(CE_INSTALL_DIR) $(XDC_INSTALL_DIR) $(BIOSUTILS_INSTALL_DIR) $(BIOS_INSTALL_DIR) $(DVTB_INSTALL_DIR) $(CODEC_INSTALL_DIR) + +REPOSITORIES:=$(addsuffix /packages, $(COMPONENTS)) + +CHECKLIST:=$(REPOSITORIES) $(CODEGEN_INSTALL_DIR)/bin/cl6x $(MVTOOL_PREFIX)gcc $(LINUXKERNEL_INSTALL_DIR)/Documentation $(DEMO_INSTALL_DIR)/$(PLATFORM) $(PSP_INSTALL_DIR)/docs + +.PHONY: all clean everything clobber help cmem cmem_clean dmai dmai_clean demos demos_clean examples examples_clean dvtb dvtb_clean dm355mm dm355mm_clean dsplink dsplink_arm dsplink_dsp dsplink_samples dsplink_clean codecs codecs_clean linux linux_clean psp_examples psp_clean info check install + +#============================================================================== +# Set up platform dependent variables. +#============================================================================== +ifeq ($(PLATFORM),dm6446) +LINUXKERNEL_CONFIG=davinci_dm644x_defconfig +LINUXSAMPLES_PLATFORM=dm644x +DSPLINK_CONFIG=--platform=DAVINCI --nodsp=1 --dspcfg_0=DM6446GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=MVL5G --comps=ponslrm +DSPLINK_MODULE=$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCI/RELEASE/dsplinkk.ko +DMAI_PLATFORM=dm6446_al +else +ifeq ($(PLATFORM),dm6467) +LINUXKERNEL_CONFIG=davinci_dm6467_defconfig +LINUXSAMPLES_PLATFORM=dm646x +DSPLINK_CONFIG=--platform=DAVINCIHD --nodsp=1 --dspcfg_0=DM6467GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=MVL5G --comps=ponslrm +DSPLINK_MODULE=$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCIHD/RELEASE/dsplinkk.ko +DMAI_PLATFORM=dm6467_al +else +ifeq ($(PLATFORM),dm355) +LINUXKERNEL_CONFIG=davinci_dm355_defconfig +LINUXSAMPLES_PLATFORM=dm355 +DMAI_PLATFORM=dm355_al +else + $(error PLATFORM not set correctly: $(PLATFORM)) +endif +endif +endif + +#============================================================================== +# The default build target. +#============================================================================== +all: check cmem dm355mm dmai demos examples dvtb + +#============================================================================== +# Clean up the targets built by 'make all'. +#============================================================================== +clean: cmem_clean dm355mm_clean dmai_clean demos_clean examples_clean dvtb_clean + +#============================================================================== +# Build everything rebuildable. +#============================================================================== +everything: check codecs linux dsplink psp_examples all + +#============================================================================== +# Clean up all targets. +#============================================================================== +clobber: clean dsplink_clean linux_clean codecs_clean psp_clean + +#============================================================================== +# A help message target. +#============================================================================== +help: + @echo + @echo "Available build targets are:" + @echo + @echo " check : Make sure Rules.make is set up properly" + @echo " info : List versions of DVSDK components" + @echo + @echo " all : Build the components below" + @echo " clean : Remove files generated by the 'all' target" + @echo + @echo " cmem : Build the CMEM kernel module for $(PLATFORM)" + @echo " cmem_clean : Remove generated cmem files." + @echo + @echo " dmai : Build DMAI for $(PLATFORM)_al" + @echo " dmai_clean : Remove generated DMAI files." + @echo + @echo " demos : Build the DVSDK demos for $(PLATFORM)" + @echo " demos_clean : Remove generated DVSDK demo files." + @echo + @echo " examples : Build examples for $(PLATFORM)" + @echo " examples_clean : Build examples for $(PLATFORM)" + @echo + @echo " dvtb : Build DVTB for $(PLATFORM)" + @echo " dvtb_clean : Remove generated DVTB files" + @echo + @echo " dm355mm : Build the dm355mm kernel module" + @echo " dm355mm_clean : Remove generated dm355mm files" + @echo + @echo "The following targets have to be explicitly built and cleaned:" + @echo + @echo " everything : Rebuild everything including below targets" + @echo " clobber : Remove all generated files" + @echo + @echo " dsplink : Configure and build DSP Link for $(PLATFORM) ARM and DSP" + @echo " dsplink_arm : Configure and build DSP Link for $(PLATFORM) ARM" + @echo " dsplink_dsp : Configure and build DSP Link for $(PLATFORM) DSP" + @echo " dsplink_samples : Build DSP Link ARM and DSP sample applications for $(PLATFORM)" + @echo " dsplink_clean : Remove generated DSP Link files" + @echo + @echo " codecs : Build codec servers for $(PLATFORM)" + @echo " codecs_clean : Remove generated codec server files" + @echo + @echo " linux : Build Linux kernel uImage for $(PLATFORM)" + @echo " linux_clean : Remove generated Linux kernel files" + @echo + @echo " psp_examples : Build Linux examples for $(PLATFORM)" + @echo " psp_clean : Build Linux examples for $(PLATFORM)" + @echo + @echo " install : Install binaries to $(EXEC_DIR)" + @echo + +#============================================================================== +# Target for listing information about the DVSDK components. +#============================================================================== +info: check + @LINUXKERNEL_INSTALL_DIR="$(LINUXKERNEL_INSTALL_DIR)" CODEGEN_INSTALL_DIR="$(CODEGEN_INSTALL_DIR)" GCC_PREFIX="$(MVTOOL_PREFIX)" XDC_INSTALL_DIR="$(XDC_INSTALL_DIR)" REPOSITORIES="$(REPOSITORIES)" $(DVSDK_INSTALL_DIR)/bin/info.sh + +#============================================================================== +# Target for checking that the Rules.make file is set up properly. +#============================================================================== +check: + @CHECKLIST="$(CHECKLIST)" $(DVSDK_INSTALL_DIR)/bin/check.sh + +#============================================================================== +# Build the dvsdk demos for the configured platform. Also, an explicit cleanup +# target is defined. +#============================================================================== +demos: + $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM) + +demos_clean: + $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM) clean + +#============================================================================== +# Build the Digital Video Test Bench for the configured platform. Also, an +# explicit cleanup target is defined. +#============================================================================== +dvtb: + $(MAKE) -C $(DVTB_INSTALL_DIR) $(PLATFORM) + @echo + @echo "dvtb can be found under $(DVTB_INSTALL_DIR)/packages/ti/sdo/dvtb/$(PLATFORM)/bin" + +dvtb_clean: + $(MAKE) -C $(DVTB_INSTALL_DIR) clean + +#============================================================================== +# Build the Linux kernel. Also, an explicit cleanup target is defined. +#============================================================================== +linux: + $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) $(LINUXKERNEL_CONFIG) + $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) uImage + @echo + @echo "Your kernel image can be found at $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/uImage" + +linux_clean: + $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) clean + +#============================================================================== +# Build the PSP Linux examples. Also, an explicit cleanup target is defined. +#============================================================================== +psp_examples: + $(MAKE) -C $(PSP_INSTALL_DIR)/examples PLATFORM=$(LINUXSAMPLES_PLATFORM) LINUXKERNEL_INSTALL_DIR=$(LINUXKERNEL_INSTALL_DIR) CROSS_COMPILE=$(MVTOOL_PREFIX) + @echo + @echo "PSP examples can be found under $(PSP_INSTALL_DIR)/examples/$(LINUXSAMPLES_PLATFORM)" + +psp_clean: + $(MAKE) -C $(PSP_INSTALL_DIR)/examples PLATFORM=$(LINUXSAMPLES_PLATFORM) LINUXKERNEL_INSTALL_DIR=$(LINUXKERNEL_INSTALL_DIR) clean + +#============================================================================== +# Build the CMEM kernel module for the configured platform, and make sure the +# kernel_binaries directory is kept in sync. Also, an explicit cleanup target +# is defined. +#============================================================================== +cmem: + $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/interface ../../lib/cmem.a470MV + $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module + @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM) + @cp $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/ + @echo + @echo "cmemk.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)" + +cmem_clean: + $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module clean + $(MAKE) -C $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/interface clean + +#============================================================================== +# Build the *evaluation* codec servers for the configured platform. Also, an +# explicit cleanup target is defined. +#============================================================================== +codecs: +ifneq ($(PLATFORM),dm355) + $(MAKE) -C $(CODEC_INSTALL_DIR) DVSDK_INSTALL_DIR=$(DVSDK_INSTALL_DIR) BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) XDC_INSTALL_DIR=$(XDC_INSTALL_DIR) CE_INSTALL_DIR=$(CE_INSTALL_DIR) FC_INSTALL_DIR=$(FC_INSTALL_DIR) CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) CODECS_INSTALL_DIR=$(CODEC_INSTALL_DIR) BIOSUTILS_INSTALL_DIR=$(BIOSUTILS_INSTALL_DIR) XDAIS_INSTALL_DIR=$(XDAIS_INSTALL_DIR) LINK_INSTALL_DIR=$(LINK_INSTALL_DIR) XDCARGS=\"eval\" +endif + +codecs_clean: +ifneq ($(PLATFORM),dm355) + $(MAKE) -C $(CODEC_INSTALL_DIR) DVSDK_INSTALL_DIR=$(DVSDK_INSTALL_DIR) BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) XDC_INSTALL_DIR=$(XDC_INSTALL_DIR) CE_INSTALL_DIR=$(CE_INSTALL_DIR) FC_INSTALL_DIR=$(FC_INSTALL_DIR) CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) CODECS_INSTALL_DIR=$(CODEC_INSTALL_DIR) BIOSUTILS_INSTALL_DIR=$(BIOSUTILS_INSTALL_DIR) XDAIS_INSTALL_DIR=$(XDAIS_INSTALL_DIR) LINK_INSTALL_DIR=$(LINK_INSTALL_DIR) XDCARGS=\"eval\" clean +endif + +#============================================================================== +# Build the dm355mm kernel module (if the configured platform is dm355). Also, +# an explicit cleanup target is defined. +#============================================================================== +dm355mm: +ifeq ($(PLATFORM),dm355) + $(MAKE) -C $(CODEC_INSTALL_DIR)/dm355mm/module KERNEL_DIR=$(LINUXKERNEL_INSTALL_DIR) + @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM) + @cp $(CODEC_INSTALL_DIR)/dm355mm/module/dm350mmap.ko $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/ + @echo + @echo "dm350mmap.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)" +endif + +dm355mm_clean: +ifeq ($(PLATFORM),dm355) + $(MAKE) -C $(CODEC_INSTALL_DIR)/dm355mm/module KERNEL_DIR=$(LINUXKERNEL_INSTALL_DIR) clean +endif + +#============================================================================== +# Build the DVSDK examples for the configured platform. Also, an explicit +# cleanup target is defined. +#============================================================================== +examples: + $(MAKE) -C examples/$(PLATFORM) + +examples_clean: + $(MAKE) -C examples/$(PLATFORM) clean + +#============================================================================== +# Build the Davinci Multimedia Application Interface for the configured +# platform. Also, an explicit cleanup target is defined. +#============================================================================== +dmai: + @$(MAKE) -C $(DMAI_INSTALL_DIR) PLATFORM=${DMAI_PLATFORM} \ + CE_INSTALL_DIR_${DMAI_PLATFORM}=$(CE_INSTALL_DIR) \ + CODEC_INSTALL_DIR_${DMAI_PLATFORM}=$(CODEC_INSTALL_DIR) \ + LINK_INSTALL_DIR_${DMAI_PLATFORM}=$(LINK_INSTALL_DIR) \ + CMEM_INSTALL_DIR_${DMAI_PLATFORM}=$(CMEM_INSTALL_DIR) \ + FC_INSTALL_DIR_${DMAI_PLATFORM}=$(FC_INSTALL_DIR) \ + LPM_INSTALL_DIR_${DMAI_PLATFORM}=$(LPM_INSTALL_DIR) \ + XDAIS_INSTALL_DIR_${DMAI_PLATFORM}=$(XDAIS_INSTALL_DIR) \ + BIOS_INSTALL_DIR_${DMAI_PLATFORM}=$(BIOS_INSTALL_DIR) \ + LINUXLIBS_INSTALL_DIR_${DMAI_PLATFORM}=$(LINUXLIBS_INSTALL_DIR)\ + LINUXKERNEL_INSTALL_DIR_${DMAI_PLATFORM}=$(LINUXKERNEL_INSTALL_DIR) \ + CROSS_COMPILE_${DMAI_PLATFORM}=$(CSTOOL_PREFIX) \ + XDC_INSTALL_DIR_${DMAI_PLATFORM}=$(XDC_INSTALL_DIR) \ + EXEC_DIR_${DMAI_PLATFORM}=$(EXEC_DIR) all + + @echo + @echo "DMAI applications can be found under $(DMAI_INSTALL_DIR)/packages/ti/sdo/dmai/apps" + @echo "To install them to $(EXEC_DIR) enter $(DMAI_INSTALL_DIR) and execute 'make install'" + +dmai_clean: + $(MAKE) -C $(DMAI_INSTALL_DIR) PLATFORM=${DMAI_PLATFORM} clean + +#============================================================================== +# Build DSP Link for the configured platform. Also, an explicit cleanup target +# is defined. +#============================================================================== +dsplink: dsplink_arm dsplink_dsp dsplink_samples + +dsplink_cfg: +ifneq ($(PLATFORM),dm355) + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink perl $(LINK_INSTALL_DIR)/packages/dsplink/config/bin/dsplinkcfg.pl $(DSPLINK_CONFIG) +else + $(error DSP Link build is not supported for $(PLATFORM)) +endif + +dsplink_arm: dsplink_cfg + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) + @mkdir -p $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM) + @cp $(DSPLINK_MODULE) $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/ + @echo + @echo "dsplinkk.ko kernel module can be found under $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)" + +dsplink_dsp: dsplink_cfg + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) + +dsplink_samples: + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src/samples BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src/samples BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) + +dsplink_clean: + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) clean + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) clean + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/gpp/src/samples BASE_TOOLCHAIN=$(MVTOOL_DIR) BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) clean + DSPLINK=$(LINK_INSTALL_DIR)/packages/dsplink $(XDC_INSTALL_DIR)/gmake -C $(LINK_INSTALL_DIR)/packages/dsplink/dsp/src/samples BASE_SABIOS=$(BIOS_INSTALL_DIR) XDCTOOLS_DIR=$(XDC_INSTALL_DIR) BASE_CGTOOLS=$(CODEGEN_INSTALL_DIR) clean + +#============================================================================== +# Install the built binaries to the target file system. +#============================================================================== +install: + @echo + @echo Creating $(EXEC_DIR) + @mkdir -p $(EXEC_DIR) + + @echo Copying kernel modules to target file system: $(EXEC_DIR)/ + @install -m 666 $(DVSDK_INSTALL_DIR)/kernel_binaries/$(PLATFORM)/* $(EXEC_DIR)/ + + @echo Installing DVSDK demos.. + $(MAKE) -C $(DEMO_INSTALL_DIR)/$(PLATFORM) install + + @echo Copying examples.. + @cp -rp examples/$(PLATFORM)/web $(EXEC_DIR)/ + @cp -p examples/$(PLATFORM)/dvevmdemo $(EXEC_DIR)/ + + @echo Installing clips.. + $(MAKE) -C clips install + +ifeq ($(PLATFORM),dm6446) + @echo Copying codec servers.. + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo_e.x64P $(EXEC_DIR)/ + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo_e.x64P $(EXEC_DIR)/ + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo_e.x64P $(EXEC_DIR)/ + @echo Copying dsplinkk.ko + @install -m 666 $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCI/RELEASE/dsplinkk.ko $(EXEC_DIR)/ +endif + +ifeq ($(PLATFORM),dm6467) + @echo Copying codec servers.. + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/encode/encodeCombo_e.x64P $(EXEC_DIR)/ + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/decode/decodeCombo_e.x64P $(EXEC_DIR)/ + @install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo.x64P $(EXEC_DIR)/ + -@install -m 666 $(CODEC_INSTALL_DIR)/packages/ti/sdo/servers/loopback/loopbackCombo_e.x64P $(EXEC_DIR)/ + @echo Copying dsplinkk.ko + @install -m 666 $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/DAVINCIHD/RELEASE/dsplinkk.ko $(EXEC_DIR)/ + @echo Copying mapdmaqhd.. + @install -m 777 $(DVSDK_INSTALL_DIR)/mapdmaq-hd/mapdmaq-hd $(EXEC_DIR)/ +endif + +ifeq ($(PLATFORM),dm355) + @echo Copying mapdmaq.. + @install -m 777 $(DVSDK_INSTALL_DIR)/mapdmaq/mapdmaq $(EXEC_DIR)/ +endif + diff --git a/recipes/dvsdk/files/dvsdk-rules/check.sh b/recipes/dvsdk/files/dvsdk-rules/check.sh new file mode 100755 index 0000000000..8dc4dd4959 --- /dev/null +++ b/recipes/dvsdk/files/dvsdk-rules/check.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo "Checking that components in Rules.make are found:" +echo + +for x in $CHECKLIST +do + if [ ! -e $x ] + then + echo "WARNING: $x doesn't exist, check your Rules.make.." + fi +done + +echo "Done checking! If no warning messages above, all components are found.." + +echo diff --git a/recipes/dvsdk/files/dvsdk-rules/info.sh b/recipes/dvsdk/files/dvsdk-rules/info.sh new file mode 100755 index 0000000000..59d36149cf --- /dev/null +++ b/recipes/dvsdk/files/dvsdk-rules/info.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +echo "Listing information about the DVSDK components:" +echo + +if [ ! -e $XDC_INSTALL_DIR ] +then + echo "Fatal!: XDC tools not found in $XDC_INSTALL_DIR, check Rules.make.." + echo "Aborting!" + exit +fi + +for x in $REPOSITORIES +do + echo "*******************************************************************************" + echo "Listing package information for repository:" + echo $x + echo + XDC_PATH="$XDC_INSTALL_DIR" $XDC_INSTALL_DIR/xs xdc.tools.path -Pr $x +done + +echo "*******************************************************************************" +if [ -e $LINUXKERNEL_INSTALL_DIR ] +then + echo "Using Linux kernel from:" + echo $LINUXKERNEL_INSTALL_DIR +else + echo "WARNING: Linux kernel not found:" + echo $LINUXKERNEL_INSTALL_DIR +fi +echo + +echo "*******************************************************************************" +echo "TI c6x codegen tool version:" +echo $CODEGEN_INSTALL_DIR/bin/cl6x +echo +if [ -f $CODEGEN_INSTALL_DIR/bin/cl6x ] +then + $CODEGEN_INSTALL_DIR/bin/cl6x -version +else + echo "WARNING: TI codegen not found!" + echo +fi + +echo +echo "*******************************************************************************" +echo "GCC compiler version:" +echo "$GCC_PREFIX"gcc +echo +if [ -f "$GCC_PREFIX"gcc ] +then + "$GCC_PREFIX"gcc --version +else + echo "WARNING: gcc tool chain not found!" + echo +fi + +echo diff --git a/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh b/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh index 9f9233d12b..9f9233d12b 100755..100644 --- a/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh +++ b/recipes/dvsdk/files/loadmodules-ti-codec-engine-apps.sh diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh new file mode 100755 index 0000000000..ca357e2095 --- /dev/null +++ b/recipes/dvsdk/files/loadmodules-ti-dmai-dm355_al.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +# loadmodules.sh +# +# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation version 2.1 of the License. +# +# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +# whether express or implied; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# 12MB +modprobe cmemk phys_start=0x87400000 phys_end=0x88000000 pools=1x2903040,1x1529856,7x829440,1x524288,1x108680,1x81920,2x8192,6x4096 + +./mapdmaq + +modprobe dm350mmap +rm -f /dev/dm350mmap +mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0 diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh new file mode 100755 index 0000000000..b4a230d590 --- /dev/null +++ b/recipes/dvsdk/files/loadmodules-ti-dmai-dm6446_al.sh @@ -0,0 +1,19 @@ +# +# loadmodules.sh +# +# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation version 2.1 of the License. +# +# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +# whether express or implied; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +modprobe cmemk phys_start=0x87800000 phys_end=0x88E00000 pools=20x4096,8x202752,10x131072,2x1048576,1x2097152,10x829440,1x6750000 +modprobe dsplinkk ddr_start=0x8F800000 ddr_size=0x600000 + +rm -rf /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 diff --git a/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh b/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh new file mode 100755 index 0000000000..076af07223 --- /dev/null +++ b/recipes/dvsdk/files/loadmodules-ti-dmai-o3530_al.sh @@ -0,0 +1,42 @@ +# loadmodules.sh +# +# Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation version 2.1 of the License. +# +# This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, +# whether express or implied; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# +# Default Memory Map +# +# Start Addr Size Description +# ------------------------------------------- +# 0x80000000 88 MB Linux +# 0x85800000 08 MB CMEM +# 0x86800000 24 MB DDRALGHEAP +# 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) +# 0x87E00000 1 MB DSPLINK (MEM) +# 0x87F00000 4 KB DSPLINK (RESET) +# 0x87F01000 1020 KB unused + +modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,4x829440,1x5250000,1x1429440,1x256000 + + +# insert DSP/BIOS Link driver +# +modprobe dsplinkk + +# make /dev/dsplink +rm -f /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 + + +# insert Local Power Manager driver +# +modprobe lpm_omap3530 + diff --git a/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh b/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh index 9cfb19d5c1..9cfb19d5c1 100755..100644 --- a/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh +++ b/recipes/dvsdk/files/loadmodules-ti-dsplink-apps.sh diff --git a/recipes/dvsdk/files/mapdmaq b/recipes/dvsdk/files/mapdmaq Binary files differnew file mode 100755 index 0000000000..5c11bc3141 --- /dev/null +++ b/recipes/dvsdk/files/mapdmaq diff --git a/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh b/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh index f990d99771..f990d99771 100755..100644 --- a/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh +++ b/recipes/dvsdk/files/unloadmodules-ti-codec-engine-apps.sh diff --git a/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh b/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh index 48fa84b03d..48fa84b03d 100755..100644 --- a/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh +++ b/recipes/dvsdk/files/unloadmodules-ti-dsplink-apps.sh diff --git a/recipes/dvsdk/gstreamer-ti_svn.bb b/recipes/dvsdk/gstreamer-ti_svn.bb index 493e4fb59a..0c4e2af482 100644 --- a/recipes/dvsdk/gstreamer-ti_svn.bb +++ b/recipes/dvsdk/gstreamer-ti_svn.bb @@ -1,56 +1,89 @@ -DEPENDS = "ti-codec-engine ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly libid3tag liboil libmad" +DESCRIPTION = "Gstreamer plugin for TI Davinci and OMAP processors" -SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ - " -SRCREV = "239" +inherit autotools + +DEPENDS = "ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly" -PR = "${MACHINE_KERNEL_PR}" +# Fetch source from svn repo +SRCREV = "225" +SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ + " # Again, no '.' in PWD allowed :( -PV = "0+svnr${SRCREV}" +PR = "r17" +PV = "svnr${SRCREV}" S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin" -inherit autotools +installdir = "${prefix}/ti" + +DMAI_INSTALL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai" +CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" +FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" +CODEC_INSTALL_DIR_dm355-evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm355" +CODEC_INSTALL_DIR_dm6446-evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm6446" +CODEC_INSTALL_DIR_omap3evm="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530" +CODEC_INSTALL_DIR_beagleboard="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530" +XDC_INSTALL_DIR="${STAGING_DIR}/${BUILD_SYS}/ti-xdctools-native" +CODEGEN_INSTALL_DIR="${STAGING_DIR}/${BUILD_SYS}/ti-cgt6x-native" + +export DMAI_INSTALL_DIR +export CE_INSTALL_DIR +export FC_INSTALL_DIR +export CODEC_INSTALL_DIR +export XDC_INSTALL_DIR +export CODEGEN_INSTALL_DIR + +XDC_TARGET = gnu.targets.arm.GCArmv5T +XDC_PLATFORM_dm355-evm = ti.platforms.evmDM355 +XDC_PLATFORM_dm6446-evm = ti.platforms.evmDM6446 +XDC_PLATFORM_omap3evm = ti.platforms.evm3530 +XDC_PLATFORM_beagleboard = ti.platforms.evm3530 +PLATFORM_XDC = ${XDC_PLATFORM} + +export XDC_TARGET +export XDC_PLATFORM +export PLATFORM_XDC -require ti-paths.inc +PLATFORM_dm355-evm = "dm355" +PLATFORM_dm6446-evm = "dm6446" +PLATFORM_omap3evm = "omap3530" +PLATFORM_beagleboard = "omap3530" -export DMAI_INSTALL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai" -export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" -export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" -export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos" +export PLATFORM -export XDC_TARGET = "gnu.targets.arm.GCArmv5T" +CROSS_COMPILE=${META_SDK_PATH}/bin/${TARGET_PREFIX} +CSTOOL_DIR=${META_SDK_PATH} +MVTOOL_DIR=${META_SDK_PATH} +export CROSS_COMPILE +export CSTOOL_DIR +export MVTOOL_DIR -XDC_PLATFORM = "foo" -# Assume every TI armv7a cpu is a 3530 -XDC_PLATFORM_armv7a = "ti.platforms.evm3530" -export XDC_PLATFORM +CPPFLAGS_append = " -DPlatform_${PLATFORM}" -# We need to add this to config.bld: -#GCArmv5T.cc.$unseal("opts"); -#GCArmv5T.cc.opts = "SEDME_CCARCH"; -#GCArmv5T.cc.$seal("opts"); - -do_configure_prepend() { - for i in ${S}/src/*.cfg ; do - sed -i -e s:\./encodeCombo.x64P:${datadir}/ti-codec-combos/encodeCombo.x64P:g \ - -e s:\./decodeCombo.x64P:${datadir}/ti-codec-combos/decodeCombo.x64P:g \ - $i - done -} +PACKAGE_ARCH = "${MACHINE_ARCH}" -do_compile_prepend() { - for i in $(find ${S} -name "config.bld") ; do - sed -i -e s:SEDME_CCARCH:'${TARGET_CCARCH}': $i - done +do_install_prepend () { + # install gstreamer demo scripts + install -d ${D}/${installdir}/gst + cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst + cp -r ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst + + # default loadmodule script is hard-coded for insmod, change to modprobe + sed -i 's/insmod/modprobe/g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + sed -i 's/.ko//g' ${D}/${installdir}/gst/${PLATFORM}/loadmodules.sh + chmod 0755 ${D}/${installdir}/gst -R } -CPPFLAGS_append = " -DPlatform_${PLATFORM}" +pkg_postinst_gstreamer-ti-demo-script () { + ln -sf ${installdir}/codec-combo/* ${installdir}/gst/${PLATFORM}/ +} -PACKAGE_ARCH = "${MACHINE_ARCH}" +PACKAGES += "gstreamer-ti-demo-script" +FILES_gstreamer-ti-demo-script = "${installdir}/gst/*" +RDEPENDS_gstreamer-ti-demo-script = "gstreamer-ti" -RDEPENDS_${PN} = "ti-dmai" +RDEPENDS_${PN} = "ti-dmai-apps" FILES_${PN} += "${libdir}/gstreamer-0.10/*.so" FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" diff --git a/recipes/dvsdk/ti-cgt6x-native_6.0.16.bb b/recipes/dvsdk/ti-cgt6x-native_6.0.16.bb new file mode 100644 index 0000000000..310662435f --- /dev/null +++ b/recipes/dvsdk/ti-cgt6x-native_6.0.16.bb @@ -0,0 +1,18 @@ +require ti-cgt6x.inc +inherit native + +SRC_URI = "http://install.source.dir.com/TI-C6x-CGT-v6.0.16-eval.tar.gz" + +S = "${WORKDIR}/cg6x_6_0_16" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "6016" +PR = "r12" + +do_stage() { + install -d ${STAGING_DIR_NATIVE}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN}/ +} + +AUTOTOOLS_NATIVE_STAGE_INSTALL="1" + diff --git a/recipes/dvsdk/ti-cgt6x-sdk_6.0.16.bb b/recipes/dvsdk/ti-cgt6x-sdk_6.0.16.bb new file mode 100644 index 0000000000..52b99b4eb0 --- /dev/null +++ b/recipes/dvsdk/ti-cgt6x-sdk_6.0.16.bb @@ -0,0 +1,26 @@ +require ti-cgt6x.inc +inherit sdk + +SRC_URI = "http://install.source.dir.com/TI-C6x-CGT-v6.0.16-eval.tar.gz" + +S = "${WORKDIR}/cg6x_6_0_16" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "6016" +PR = "r12" + +do_install() { + install -d ${D}/${prefix}/dvsdk/cg6x_6_0_16 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/cg6x_6_0_16 + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where the TI C6x codegen tool is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make + echo "CODEGEN_INSTALL_DIR=${prefix}/dvsdk/cg6x_6_0_16" >> ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make + echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/cgt6x.Rules.make +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "${prefix}/dvsdk/cg6x_6_0_16" +INSANE_SKIP_${PN} = True + diff --git a/recipes/dvsdk/ti-cgt6x.inc b/recipes/dvsdk/ti-cgt6x.inc new file mode 100644 index 0000000000..ad76cfe31f --- /dev/null +++ b/recipes/dvsdk/ti-cgt6x.inc @@ -0,0 +1,2 @@ +DESCRIPTION = "Code Generation Tools for TI DaVinci and OMAP" + diff --git a/recipes/dvsdk/ti-cmem-module_2.23.1.bb b/recipes/dvsdk/ti-cmem-module_2.23.1.bb new file mode 100644 index 0000000000..097319c722 --- /dev/null +++ b/recipes/dvsdk/ti-cmem-module_2.23.1.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "CMEM module for TI ARM/DSP processors" +inherit module + +# compile and run time dependencies +DEPENDS = "virtual/kernel perl-native" +RDEPENDS = "update-modules" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz" + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +PR = "r18" +PV = "2231" + +do_compile() { + # TODO :: KERNEL_CC, etc need replacing with user CC + # TODO :: Need to understand why OBJDUMP is required for kernel module + # Unset these since LDFLAGS gets picked up and used incorrectly.... need + # investigation + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + + cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem + make \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}" \ + UCTOOL_PREFIX="${TARGET_PREFIX}" \ + clean debug release +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + + cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem/apps + make \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}" \ + UCTOOL_PREFIX="${TARGET_PREFIX}" \ + EXEC_DIR="${D}${prefix}/ti/ti-cmem-apps" \ + install +} + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko" +PACKAGES += " ti-cmem-apps" +FILES_ti-cmem-apps = "${prefix}/ti/ti-cmem-apps/*" +INSANE_SKIP_ti-cmem-apps = True + + diff --git a/recipes/dvsdk/ti-cmem-module_2.23.bb b/recipes/dvsdk/ti-cmem-module_2.23.bb new file mode 100644 index 0000000000..15f8af349e --- /dev/null +++ b/recipes/dvsdk/ti-cmem-module_2.23.bb @@ -0,0 +1,50 @@ +DESCRIPTION = "CMEM module for TI ARM/DSP processors" +inherit module + +# compile and run time dependencies +DEPENDS = "virtual/kernel perl-native" +RDEPENDS = "update-modules" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23.tar.gz" + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23" + +PR = "r11" +PV = "223" + +do_compile() { + # TODO :: KERNEL_CC, etc need replacing with user CC + # TODO :: Need to understand why OBJDUMP is required for kernel module + # Unset these since LDFLAGS gets picked up and used incorrectly.... need + # investigation + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem + make \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}" \ + UCTOOL_PREFIX="${TARGET_PREFIX}" \ + clean debug release +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp +} + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko" + diff --git a/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb b/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb new file mode 100644 index 0000000000..3a63faf7e7 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-dm355-sdk_1.13.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "DM355 Codec Combo 1.13" + +inherit sdk +require ti-codec-combo-dm355.inc + +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin\ + file://dm355mm_1_30.patch;patch=1 \ + " + +S = "${WORKDIR}/dm355_codecs_1_13_000" +BINFILE="dm355_codecs_setuplinux_1_13_000.bin" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "113" +PR = "r13" + +do_compile() { + echo "Do nothing" +} + +do_install() { + install -d ${D}/${prefix}/dvsdk/dm355_codecs_1_13_000 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/dm355_codecs_1_13_000 + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where the codec servers are installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make + echo "CODEC_INSTALL_DIR=${prefix}/dvsdk/dm355_codecs_1_13_000" >> ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make +} + +INHIBIT_PACKAGE_STRIP = "1" +INSANE_SKIP_${PN} = True +FILES_${PN} = "${prefix}/dvsdk/dm355_codecs_1_13_000/*" + diff --git a/recipes/dvsdk/ti-codec-combo-dm355.inc b/recipes/dvsdk/ti-codec-combo-dm355.inc new file mode 100644 index 0000000000..e975793082 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-dm355.inc @@ -0,0 +1,38 @@ +# This file defines function used for extracting .bin file + +python do_unpack () { + bb.build.exec_func('base_do_unpack', d) + bb.build.exec_func('ti_bin_do_unpack', d) +} + +python ti_bin_do_unpack() { + + import os + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + binfile = bb.data.getVar('BINFILE', localdata) + + # Change to the working directory + save_cwd = os.getcwd() + workdir = bb.data.getVar('WORKDIR', localdata) + workdir = bb.data.expand(workdir, localdata) + os.chdir(workdir) + + # Make the InstallJammer binary executable so we can run it + os.chmod(binfile, 0755) + + # Run the InstallJammer binary and accept the EULA + filename = "HOME=%s ./%s" % (workdir, binfile) + f = os.popen(filename,'w') + print >>f, "Y\n" + print >>f, "Y\n" + print >>f, " qY\n" + print >>f, "%s\n" % workdir + f.close() + + # Return to the previous directory + os.chdir(save_cwd) +} + diff --git a/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb b/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb new file mode 100644 index 0000000000..3827a1f7e1 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-dm355_1.13.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "DM355 Codec Combo 1.13" + +require ti-codec-combo-dm355.inc +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin \ + file://mapdmaq \ + " + +S = "${WORKDIR}/dm355_codecs_1_13_000" +BINFILE="dm355_codecs_setuplinux_1_13_000.bin" +installdir = "${prefix}/ti" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "113" +PR = "r12" + +do_compile() { + echo "Do nothing" +} + +do_install () { + # install mapdmaq on target + install -d ${D}/${installdir}/codec-combo + install -m 0755 ${WORKDIR}/mapdmaq ${D}/${installdir}/codec-combo +} + +do_stage() { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +INHIBIT_PACKAGE_STRIP = "1" +INSANE_SKIP_${PN} = True +FILES_${PN} = "${installdir}/codec-combo/mapdmaq" + diff --git a/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb b/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb new file mode 100644 index 0000000000..0a396c7ba6 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-omap3530-sdk_3.16.1.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "OMAP3530 Codec Combo 3.16.01" +require ti-codec-combo-omap3530.inc + +inherit sdk + +SRC_URI = "http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin" + +# Specify names of the InstallJammer binary file and the tarball it extracts +BINFILE = "omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin" +TARFILE = "omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa_3_16_01.tar.gz" + +S = "${WORKDIR}/omap3530_dvsdk_combos_tspa_3_16_01" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "316" +PR = "r8" + +do_compile () { + echo "No nothing" +} + +do_install() { + install -d ${D}/${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01 + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where the codec servers are installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make + echo "CODEC_INSTALL_DIR=${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01" >> ${STAGING_DIR_HOST}/ti-sdk-rules/codec.Rules.make +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "${prefix}/dvsdk/omap3530_dvsdk_combos_3_16_01/*" +INSANE_SKIP_${PN} = True + diff --git a/recipes/dvsdk/ti-codec-combo-omap3530.inc b/recipes/dvsdk/ti-codec-combo-omap3530.inc new file mode 100644 index 0000000000..a884549622 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-omap3530.inc @@ -0,0 +1,46 @@ +# This file defines function used for unpacking the .bin file downloaded over +# the http and display EULA. +# BINFILE - name of the install jammer .bin file +# TARFILE - name of the tar file inside the install jammer + +python do_unpack () { + bb.build.exec_func('base_do_unpack', d) + bb.build.exec_func('ti_bin_do_unpack', d) +} + +python ti_bin_do_unpack() { + + import os + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + binfile = bb.data.getVar('BINFILE', localdata) + tarfile = bb.data.getVar('TARFILE', localdata) + + # Change to the working directory + save_cwd = os.getcwd() + workdir = bb.data.getVar('WORKDIR', localdata) + workdir = bb.data.expand(workdir, localdata) + os.chdir(workdir) + + # Make the InstallJammer binary executable so we can run it + os.chmod(binfile, 0755) + + # Run the InstallJammer binary and accept the EULA + filename = "HOME=%s ./%s" % (workdir, binfile) + f = os.popen(filename,'w') + print >>f, "Y\n" + print >>f, " qY\n" + print >>f, "%s\n" % workdir + f.close() + + # Expand the tarball that was created + cmd = 'tar xz --no-same-owner -f %s -C %s' % (tarfile, workdir) + ret = os.system(cmd) + + # Return to the previous directory + os.chdir(save_cwd) + return ret == 0 +} + diff --git a/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb b/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb new file mode 100644 index 0000000000..154527a700 --- /dev/null +++ b/recipes/dvsdk/ti-codec-combo-omap3530_3.16.1.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "OMAP3530 TSPA codec combo 3.16.01" + +require ti-codec-combo-omap3530.inc + +SRC_URI = "http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin" + +# Specify names of the InstallJammer binary file and the tarball it extracts +BINFILE = "omap3530_dvsdk_combos_tspa-3_16_01-Linux-x86.bin" +TARFILE = "omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa_3_16_01.tar.gz" + +S = "${WORKDIR}/omap3530_dvsdk_combos_tspa_3_16_01" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "3161" +PR = "r9" +installdir = "${prefix}/ti" + +do_compile() { + echo "Do not rebuild for now" +} + +do_install () { + install -d ${D}/${installdir}/codec-combo + cd ${S} + for file in `find . -name *.x64P`; do + cp ${file} ${D}/${installdir}/codec-combo + done +} + +do_stage() { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +FILES_${PN} = "${installdir}/codec-combo/*" + diff --git a/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb b/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb new file mode 100644 index 0000000000..340a222315 --- /dev/null +++ b/recipes/dvsdk/ti-codec-engine-sdk_2.23.1.bb @@ -0,0 +1,50 @@ +DESCRIPTION = "Codec Engine 2.23.01 for TI ARM/DSP processors" +inherit sdk + +# tconf from xdctools dislikes '.' in pwd :/ +PR = "r11" +PV = "2231" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz " + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +do_compile () { + echo "nothing to build" +} + +do_install() { + # Update cmem and sdma Rules.make to point correct location of main + # Rules.make. + sed -i -e s:Rules.make:../Rules.make:g \ + ${S}/cetools/packages/ti/sdo/linuxutils/cmem/Rules.make + sed -i -e s:Rules.make:../Rules.make:g \ + ${S}/cetools/packages/ti/sdo/linuxutils/sdma/Rules.make + + install -d ${D}/${prefix}/dvsdk/codec_engine_2_23_01 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/codec_engine_2_23_01 + + # Creates rules.make file + + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where the Codec Engine package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "CE_INSTALL_DIR=${prefix}/dvsdk/codec_engine_2_23_01" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "# Where the XDAIS package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "XDAIS_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "# Where the DSP Link package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "LINK_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "# Where the CMEM (contiguous memory allocator) package is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "CMEM_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "# Where Framework Components product is installed." >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make + echo "FC_INSTALL_DIR=\$(CE_INSTALL_DIR)/cetools" >> ${STAGING_DIR_HOST}/ti-sdk-rules/ce.Rules.make +} + +FILES_${PN} = "${prefix}/dvsdk/codec_engine_2_23_01" +INHIBIT_PACKAGE_STRIP = "1" +INSANE_SKIP_${PN} = True + diff --git a/recipes/dvsdk/ti-codec-engine_2.23.1.bb b/recipes/dvsdk/ti-codec-engine_2.23.1.bb new file mode 100644 index 0000000000..3d06971a60 --- /dev/null +++ b/recipes/dvsdk/ti-codec-engine_2.23.1.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Codec Engine 2.23.01 for TI ARM/DSP processors" + +# compile time dependencies +DEPENDS_dm6446-evm += "ti-xdctools-native ti-cgt6x-native ti-dspbios-native ti-codec-combo-dm6446" +DEPENDS_omap3evm += "ti-cgt6x-native ti-dspbios-native ti-codec-combo-omap3530 ti-xdctools-native" +DEPENDS_beagleboard += "ti-cgt6x-native ti-dspbios-native ti-codec-combo-omap3530 ti-xdctools-native" +DEPENDS_dm355-evm += "ti-codec-combo-dm355 ti-xdctools-native" + +# tconf from xdctools dislikes '.' in pwd :/ +PR = "r13" +PV = "2231" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz " + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +do_compile () { + echo "! Do not rebuild for now !" +} + +# stage tree - other packages may need this +do_stage() { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" +INHIBIT_PACKAGE_STRIP = "1" + diff --git a/recipes/dvsdk/ti-codec-engine_2.23.bb b/recipes/dvsdk/ti-codec-engine_2.23.bb deleted file mode 100644 index 2c4038d67f..0000000000 --- a/recipes/dvsdk/ti-codec-engine_2.23.bb +++ /dev/null @@ -1,394 +0,0 @@ -DESCRIPTION = "Codec Engine for TI ARM/DSP processors" - -DEPENDS = "virtual/kernel perl-native" -RDEPENDS = "update-modules" - -INSANE_SKIP_ti-codec-engine-apps = True -INSANE_SKIP_ti-dsplink-apps = True -INSANE_SKIP_${PN} = True - -inherit module - -# tconf from xdctools dislikes '.' in pwd :/ -PV = "223" - -# Get CE tarball from TI website, place in sources and calculate md5sum -# Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html - -SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_23_01.tar.gz \ - file://loadmodules-ti-dsplink-apps.sh \ - file://unloadmodules-ti-dsplink-apps.sh \ - file://loadmodules-ti-codec-engine-apps.sh \ - file://unloadmodules-ti-codec-engine-apps.sh \ -" - -S = "${WORKDIR}/codec_engine_2_23_01" - -########### - -# To build the DSP applications you need to have DSP/BIOS, xdctools and codegen installed. Get these from: -# TODO - update to bios 5.33.04.... (which is what CE was validated against) -# https://www-a.ti.com/downloads/sds_support/targetcontent/bios/bios_5_33/bios_5_33_02/exports/bios_setuplinux_5_33_02.bin -# https://www-a.ti.com/downloads/sds_support/targetcontent/rtsc/xdctools_3_10_03/exports/xdctools_setuplinux_3_10_03.bin -# https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/download.html -# Back link for above: -# https://www-a.ti.com/downloads/sds_support/targetcontent/index.html - -# Path to the dir where the TI tools are unpacked -TITOOLSDIR ?= "/OE/TI" -TIBIOSDIR ?= "${TITOOLSDIR}/bios_5_33_02" -TIXDCTOOLSDIR ?= "${TITOOLSDIR}/xdctools_3_10_03" -TICGTOOLSDIR ?= "${TITOOLSDIR}/cg6x_6_0_16" - -# CODEC ENGINE - This tells codec engine which targets to build -CEEXAMPLESDEVICES ?= "DM6446" -CEEXAMPLESDEVICES_omap5912osk = "fixme-ti-paths.inc" -CEEXAMPLESDEVICES_armv7a = "OMAP3530" -CEEXAMPLESDEVICES_omap3evm = "OMAP3530" -CEEXAMPLESDEVICES_beagleboard = "OMAP3530" -CEEXAMPLESDEVICES_davinci-sffsdr = "DM6446" -CEEXAMPLESDEVICES_davinci-dvevm = "DM6446" - -# DSPLINK - Config Variable for different platform -DSPLINKPLATFORM ?= "DAVINCI" -DSPLINKPLATFORM_omap5912osk = "OMAP" -DSPLINKPLATFORM_armv7a = "OMAP3530" -DSPLINKPLATFORM_beagleboard = "OMAP3530" -DSPLINKPLATFORM_omap3evm = "OMAP3530" -DSPLINKPLATFORM_davinci-sffsdr = "DAVINCI" -DSPLINKPLATFORM_davinci-dvevm = "DAVINCI" - -DSPLINKDSPCFG ?= "DM6446GEMSHMEM" -DSPLINKDSPCFG_armv7a ?= "OMAP3530SHMEM" -DSPLINKDSPCFG_beagleboard ?= "OMAP3530SHMEM" -DSPLINKDSPCFG_omap3evm ?= "OMAP3530SHMEM" - -DSPLINKGPPOS ?= "MVL5G" -DSPLINKGPPOS_armv7a = "OMAPLSP" -DSPLINKGPPOS_beagleboard = "OMAPLSP" -DSPLINKGPPOS_omap3evm = "OMAPLSP" - -# LPM -LPMDSPPOWERSOC ?= "dm6446" -LPMDSPPOWERSOC_armv7a = "omap3530" -LPMDSPPOWERSOC_beagleboard = "omap3530" -LPMDSPPOWERSOC_omap3evm = "omap3530" - -############ - -export DSPLINK="${S}/cetools/packages/dsplink" - -PARALLEL_MAKE = "" - -do_configure () { - # Clean up stale binaries - find ${S} -name "*.ko" -exec rm {} \; || true - find ${S} -name "*.o" -exec rm {} \; || true - - # Run perl script to create appropriate makefiles (v1.60 and up) - ( - cd ${DSPLINK} - perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPLINKDSPCFG} --dspos_0=DSPBIOS5XX --gppos=${DSPLINKGPPOS} --comps=ponslrm - ) -} - -do_compile () { - unset DISPLAY - -# DSPLINK - # TODO :: KERNEL_CC, etc need replacing with user CC - # TODO :: Need to understand why OBJDUMP is required for kernel module - - # Unset these since LDFLAGS gets picked up and used incorrectly.... need investigation - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - - # Build the gpp user space library - cd ${DSPLINK}/gpp/src/api - make \ - CROSS_COMPILE="${TARGET_PREFIX}" \ - CC="${KERNEL_CC}" \ - AR="${KERNEL_AR}" \ - LD="${KERNEL_LD}" \ - COMPILER="${KERNEL_CC}" \ - ARCHIVER="${KERNEL_AR}" \ - KERNEL_DIR="${STAGING_KERNEL_DIR}" \ - clean all - - # Build the gpp kernel space (debug and release) - cd ${DSPLINK}/gpp/src - make \ - OBJDUMP="${TARGET_PREFIX}objdump" \ - CROSS_COMPILE="${TARGET_PREFIX}" \ - CC="${KERNEL_CC}" \ - AR="${KERNEL_AR}" \ - LD="${KERNEL_LD}" \ - COMPILER="${KERNEL_CC}" \ - ARCHIVER="${KERNEL_AR}" \ - KERNEL_DIR="${STAGING_KERNEL_DIR}" \ - clean all - - # Build the gpp samples - cd ${DSPLINK}/gpp/src/samples - make \ - BASE_TOOLCHAIN="${CROSS_DIR}" \ - BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" \ - OSINC_PLATFORM="${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" \ - OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" \ - CROSS_COMPILE="${TARGET_PREFIX}" \ - CC="${KERNEL_CC}" \ - AR="${KERNEL_AR}" \ - LD="${KERNEL_LD}" \ - COMPILER="${KERNEL_CC}" \ - LINKER="${KERNEL_CC}" \ - ARCHIVER="${KERNEL_AR}" \ - KERNEL_DIR="${STAGING_KERNEL_DIR}" \ - clean all - - # Build the dsp library (debug and release) - cd ${DSPLINK}/dsp/src - make \ - BASE_CGTOOLS="${TICGTOOLSDIR}" \ - BASE_SABIOS="${TIBIOSDIR}" \ - clean all - - # Build the dsp samples (debug and release) - cd ${DSPLINK}/dsp/src/samples - make \ - BASE_CGTOOLS="${TICGTOOLSDIR}" \ - BASE_SABIOS="${TIBIOSDIR}" \ - clean all - - # LPM - Build the DSP power manager kernel module - cd ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm - make \ - DSPLINK_REPO="${DSPLINK}/.." \ - LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ - MVTOOL_PREFIX="${TARGET_PREFIX}" \ - clean default - - # CMEM - Build the cmem kernel module and associated test apps - # TODO - Still need to clean up UCTOOLs - don't really want to build UC here - it's not good to just build with MVTOOLS (GLIBC) - # - note target default, doesn't get passed through to underlying makefiles - cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem - make \ - LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ - MVTOOL_PREFIX="${TARGET_PREFIX}" \ - UCTOOL_PREFIX="${TARGET_PREFIX}" \ - clean debug release - - # SDMA - Build the sdma module - cd ${S}/cetools/packages/ti/sdo/linuxutils/sdma - make \ - LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ - MVTOOL_PREFIX="${TARGET_PREFIX}" \ - UCTOOL_PREFIX="${TARGET_PREFIX}" \ - clean debug release - - # TODO - add other modules here, like IRQ, etc for DM6446/DM355/etc - - # CE - EXAMPLES - # Now build the CE examples - cd ${S}/examples - - # Fix paths to arm crosstools, c6x codegen and x86 gcc - # Also disable uclibc and x86 builds - # Nasty replacement of 674x build - hard to sed this, since 2 entries similar, hence uses leading spaces... - sed -i \ - -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3:${CROSS_DIR}:g \ - -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TICGTOOLSDIR}:g \ - -e s:/db/toolsrc/library/tools/vendors/opensource/gcc/4.1.0/Linux/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu:/usr:g \ - -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \ - -e 's:true, // build for uC Linux:false,:g' \ - -e 's:true, // build for PC Linux:false,:g' \ - -e 's: {doBuild\: true, // DSP builds: {doBuild\: false, // DSP builds:g' \ - ${S}/examples/user.bld - - # For now, remove all targets, except omap3530 - nasty way to configure targets... - sed -i \ - -e '/evmDM357/d' \ - -e '/evmDM6446/d' \ - -e '/evmDM6467/d' \ - -e '/evmDM355/d' \ - -e '/evmDM6437/d' \ - -e '/evmDM648/d' \ - -e '/evmDM365/d' \ - -e '/evmOMAPL137/d' \ - -e '/sdp3430/d' \ - -e '/evm2530/d' \ - ${S}/examples/user.bld - - # Start building the CE examples: codecs, extensions, servers (codec bundles) and ARM side apps - # TODO : Make clean doesn't do what you'd expect, it only cleans stuff you've enabled, so some cruft remains - # TODO : Figure out how to pass PRODUCTS=... or alternative method, so that we don't build the 'local' versions - for i in codecs extensions servers apps ; do - make \ - DEVICES="${CEEXAMPLESDEVICES}" \ - CE_INSTALL_DIR="${S}" \ - XDC_INSTALL_DIR="${TIXDCTOOLSDIR}" \ - BIOS_INSTALL_DIR="${TIBIOSDIR}" \ - CC_V5T="bin/${TARGET_PREFIX}gcc" \ - CGTOOLS_V5T="${CROSS_DIR}" \ - CGTOOLS_C64P="${TICGTOOLSDIR}" \ - -C ${S}/examples/ti/sdo/ce/examples/$i \ - clean -#all - done -} - -do_install () { - # DSPLINK driver - kernel module - install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp - cp ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ - - # DSPLINK library - install -d ${D}/${libdir} - install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplink.lib ${D}/${libdir} - - # DSPLINK sample apps - install -d ${D}/${datadir}/ti-dsplink - install ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/*gpp ${D}/${datadir}/ti-dsplink || true - for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do - install ${i} ${D}/${datadir}/ti-dsplink - done - - # DSPLINK test app module un/load scripts - install ${WORKDIR}/loadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink - install ${WORKDIR}/unloadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink - - # LPM/CMEM/SDMA drivers - kernel modules - install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp - cp ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true - cp ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true - cp ${S}/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true - - # CE sample apps - this is very 64x / v5T specific at the moment - we really need CE to give us this list... - install -d ${D}/${datadir}/ti-codec-engine - - # we change pwd so that find gives us relative path to the files, which we use to create the same structure on the target - cd ${S}/examples/ti/sdo/ce - - # first find all the app files named '.out' - for i in $(find . -name "*.out") ; do - # first create the directory - install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - # now copy the file - install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - done - - # next find all the app files named '.xv5T' - for i in $(find . -name "*.xv5T") ; do - # first create the directory - install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - # now copy the file - install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - done - - # then find all the app/server files named '.x64P' - for i in $(find . -name "*.x64P") ; do - # first create the directory - install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - # now copy the file - install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - done - - # finally find all the app files named '.dat' - for i in $(find . -name "*.dat") ; do - # first create the directory - install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - # now copy the file - install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` - done - - # CE test app module un/load scripts - install ${WORKDIR}/loadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine - install ${WORKDIR}/unloadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine - - # we should install the CMEM apps as well here - # - TODO... - - # finally, strip targets that we're not supporting here - # - TODO... -} - -# Codec Engine and friends need a complete tree, so stage it all - possibly could use repoman for this later -do_stage() { - install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} - cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ -} - -PACKAGES =+ "ti-dsplink-module ti-dsplink-apps" -PACKAGES =+ "ti-lpm-module ti-cmem-module ti-sdma-module ti-codec-engine-apps" - -FILES_ti-dsplink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" -FILES_ti-dsplink-apps = "${datadir}/ti-dsplink/* ${libdir}/dsplink.lib" -FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" -FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko" -FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdmak.ko" -FILES_ti-codec-engine-apps = "${datadir}/ti-codec-engine/*" - -pkg_postinst_ti-dsplink-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_ti-dsplink-module () { - update-modules || true -} - -pkg_postinst_ti-lpm-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_ti-lpm-module () { - update-modules || true -} - -pkg_postinst_ti-cmem-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_ti-cmem-module () { - update-modules || true -} - -pkg_postinst_ti-sdma-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_ti-sdma-module () { - update-modules || true -} - -INHIBIT_PACKAGE_STRIP = "1" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -#legacy upgrade helpers -RPROVIDES_ti-dsplink-module += "dsplink-module" -RREPLACES_ti-dsplink-module += "dsplink-module" -RPROVIDES_ti-dsplink-apps += "dsplink-apps" -RREPLACES_ti_dsplink-apps += "dsplink-apps" -RPROVIDES_ti-cmem-module += "ti-cmemk-module" -RREPLACES_ti-cmem-module += "ti-cmemk-module" - -#run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel -#and dependence on recipe version, so that we ensure apps and modules stay syncd -RRECOMMENDS_ti-dsplink-apps += "ti-dsplink-module (>= ${PV}-${PR})" -RRECOMMENDS_ti-codec-engine-apps += "ti-dsplink-module (>= ${PV}-${PR}) ti-lpm-module (>= ${PV}-${PR}) ti-cmem-module (>= ${PV}-${PR}) ti-sdma-module (>= ${PV}-${PR})" - - diff --git a/recipes/dvsdk/ti-dm355mm-module_1.13.bb b/recipes/dvsdk/ti-dm355mm-module_1.13.bb new file mode 100644 index 0000000000..cb8c39d021 --- /dev/null +++ b/recipes/dvsdk/ti-dm355mm-module_1.13.bb @@ -0,0 +1,53 @@ +DESCRIPTION = "User space DMA module for DM355" + +require ti-codec-combo-dm355.inc +inherit module +# compile and run time dependencies +DEPENDS = "virtual/kernel perl-native" +RDEPENDS = "update-modules" + +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/codecs/dm355_codecs_setuplinux_1_13_000.bin \ + file://dm355mm_1_30.patch;patch=1 \ + " +S = "${WORKDIR}/dm355_codecs_1_13_000" +BINFILE="dm355_codecs_setuplinux_1_13_000.bin" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "113" +PR = "r15" + +do_configure() { + find ${S} -name "*.ko" -exec rm {} \; || true + sed -i -e s:include:#include:g ${S}/dm355mm/Rules.make +} + +do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + + cd ${S}/dm355mm/module + make \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}"; +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${S}/dm355mm/module/dm350mmap.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp +} + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dm350mmap.ko" + + diff --git a/recipes/dvsdk/ti-dmai-sdk_svn.bb b/recipes/dvsdk/ti-dmai-sdk_svn.bb new file mode 100644 index 0000000000..e4c9ad0c89 --- /dev/null +++ b/recipes/dvsdk/ti-dmai-sdk_svn.bb @@ -0,0 +1,21 @@ +inherit sdk +require ti-dmai.inc + +do_compile () { + echo "do nothing" +} + +do_install() { + install -d ${D}/${prefix}/dvsdk/dmai_${PV} + cp -pPrf ${S}/dmai/* ${D}/${prefix}/dvsdk/dmai_${PV} + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where DMAI package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/dmai.Rules.make + echo "DMAI_INSTALL_DIR=${prefix}/dvsdk/dmai_${PV}" >> ${STAGING_DIR_HOST}/ti-sdk-rules/dmai.Rules.make +} + +INHIBIT_PACKAGE_STRIP = "1" +FILES_${PN} = "${prefix}/dvsdk/dmai_${PV}/*" +INSANE_SKIP_${PN} = True + diff --git a/recipes/dvsdk/ti-dmai.inc b/recipes/dvsdk/ti-dmai.inc new file mode 100644 index 0000000000..5586951a5d --- /dev/null +++ b/recipes/dvsdk/ti-dmai.inc @@ -0,0 +1,15 @@ +DESCRIPTION = "DMAI for TI ARM/DSP processors" + +# NOTE: Use Brijesh' DMAI development branch. The URL *must* be updated once +# we have stable DMAI 2.x on gforge. +SRCREV = "166" +SRC_URI = "svn://gforge.ti.com/svn/dmai/branches;module=BRIJESH_GIT_031809;proto=https;user=anonymous;pswd='' \ + file://loadmodules-ti-dmai-dm355_al.sh \ + file://loadmodules-ti-dmai-dm6446_al.sh \ + file://loadmodules-ti-dmai-o3530_al.sh \ + " + +S = "${WORKDIR}/BRIJESH_GIT_031809/davinci_multimedia_application_interface" +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "svnr${SRCREV}" + diff --git a/recipes/dvsdk/ti-dmai_svn.bb b/recipes/dvsdk/ti-dmai_svn.bb index b335c7b707..9185b2746e 100644 --- a/recipes/dvsdk/ti-dmai_svn.bb +++ b/recipes/dvsdk/ti-dmai_svn.bb @@ -1,87 +1,105 @@ -DESCRIPTION = "Davinci (and OMAP) Multimedia Application Interface" -DEPENDS = "virtual/kernel ti-codec-engine ti-codec-combos" -LICENCE = "unknown" +require ti-dmai.inc inherit module-base -require ti-paths.inc +# compile time dependencies +DEPENDS_omap3evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-omap3530 virtual/kernel" +DEPENDS_beagleboard += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-omap3530 virtual/kernel " +DEPENDS_dm6446-evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-dspbios-native ti-cgt6x-native ti-codec-combo-dm6446 virtual/kernel " +DEPENDS_dm355-evm += "alsa-lib ti-codec-engine ti-xdctools-native ti-codec-combo-dm355 virtual/kernel" + +installdir = "${prefix}/ti" + +# Define DMAI build time variables +TARGET ?= "all" +TARGET_omap3evm ?= "o3530_al" +TARGET_beagleboard ?= "o3530_al" +TARGET_dm355-evm ?= "dm355_al" +TARGET_dm6446-evm ?= "dm6446_al" + +CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" +CODEC_dm355-evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm355" +CODEC_omap3evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530" +CODEC_beagleboard ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-omap3530" +CODEC_dm6446-evm ="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combo-dm6446" +FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" +DSPBIOS_DIR="${STAGING_DIR_NATIVE}/ti-dspbios-native" +CGT6x_DIR="${STAGING_DIR_NATIVE}/ti-cgt6x-native" +XDCTOOLS_DIR="${STAGING_DIR_NATIVE}/ti-xdctools-native" +USER_XDC_PATH="${CE_INSTALL_DIR}/examples" + +PARALLEL_MAKE = "" + +do_configure () { + # If kernel version is greater than 2.6.28 replace mach/omapfb.h with + # linux/omapfb.h + + if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 28 ] ; then + sed -i -e s:mach/omapfb:linux/omapfb:g ${S}/dmai/packages/ti/sdo/dmai/linux/Display_fbdev.c + fi +} -INSANE_SKIP_${PN} = True -INSANE_SKIP_${PN}-apps = True - -SRC_URI = "svn://gforge.ti.com/svn/dmai/branches;module=BRIJESH_GIT_022309;proto=https;user=anonymous;pswd='' \ - file://dmai-built-with-angstrom.patch;patch=1 \ - file://loadmodules-ti-dmai-apps.sh \ - file://unloadmodules-ti-dmai-apps.sh \ - " - -SRCREV = "120" - -S = "${WORKDIR}/BRIJESH_GIT_022309/davinci_multimedia_application_interface/dmai" -# Yes, the xdc stuff still breaks with a '.' in PWD -PV = "120+svnr${SRCREV}" - -TARGET = "all" -TARGET_neuros-osd2 = " dm6446_al dm6446_db" - -TARGET_armv7a = " o3530_al" - -TARGET_beagleboard = " o3530_al" -TARGET_omap3evm = " o3530_al" - -export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" -export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" -export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos" - -do_compile() { - if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 28 ] ; then - sed -i -e s:mach/omapfb:linux/omapfb:g packages/ti/sdo/dmai/linux/Display_fbdev.c - fi - - cd packages/ti/sdo/dmai - oe_runmake clean - oe_runmake ${TARGET} C_FLAGS="-O2 -I${STAGING_INCDIR}" - cd apps - oe_runmake clean - oe_runmake ${TARGET} + +do_compile () { + + cd ${S} + make XDC_INSTALL_DIR="${XDCTOOLS_DIR}" clean + + # TODO: Figure out how to pass the alsa include location, currently + # LINUXLIBS_INSTALL_DIR is hard-coded for armv5te + make CE_INSTALL_DIR="${CE_INSTALL_DIR}" \ + CODEC_INSTALL_DIR="${CODEC}" \ + FC_INSTALL_DIR="${FC_INSTALL_DIR}" \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + XDC_INSTALL_DIR="${XDCTOOLS_DIR}" \ + CODEGEN_INSTALL_DIR="${CGT6x_DIR}" \ + BIOS_INSTALL_DIR="${DSPBIOS_DIR}"\ + LINUXLIBS_INSTALL_DIR="${STAGING_DIR_HOST}/usr" \ + USER_XDC_PATH="${USER_XDC_PATH}" \ + CROSS_COMPILE="${SDK_PATH}/bin/${TARGET_PREFIX}" \ + VERBOSE="true" \ + XDAIS_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \ + LINK_INSTALL_DIR="${CE_INSTALL_DIR}/cetools/packages/dsplink" \ + CMEM_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \ + LPM_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \ + PLATFORM="${TARGET}" } do_install () { - install -d ${D}/${datadir}/ti-dmai/apps - - export EXEC_DIR="${D}/${datadir}/ti-dmai/apps" - oe_runmake install + # install dmai apps on target + install -d ${D}/dmai-apps + cd ${S}/dmai + make PLATFORM="${TARGET}" EXEC_DIR=${D}/${installdir}/dmai-apps install + install -m 0755 ${WORKDIR}/loadmodules-ti-dmai-${TARGET}.sh ${D}/${installdir}/dmai-apps/loadmodule.sh + + cd ${S}/tests + install -d ${D}/dmai-tests + make PLATFORM="${TARGET}" EXEC_DIR=${D}/${installdir}/dmai-tests install + install -m 0755 ${WORKDIR}/loadmodules-ti-dmai-${TARGET}.sh ${D}/${installdir}/dmai-tests/loadmodule.sh +} - #test app module un/load scripts - install ${WORKDIR}/loadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai - install ${WORKDIR}/unloadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai +pkg_postinst_ti-dmai-apps () { + ln -sf ${installdir}/codec-combo/* ${installdir}/dmai-apps/ } do_stage () { install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai - cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai + cp -pPrf ${S}/dmai/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai } -PACKAGES =+ "ti-dmai-apps" - -ALLOW_EMPTY_${PN} = "1" -RRECOMMENDS_${PN} = "ti-dmai-apps" - -FILES_ti-dmai-apps = "${datadir}/ti-dmai/*" - -pkg_postinst_ti-dmai-apps () { - if [ -n "$D" ]; then - exit 1 - fi - ln -sf /usr/share/ti-codec-combos/* /usr/share/ti-dmai/apps -} - -INHIBIT_PACKAGE_STRIP = "1" +# Disable QA check untils we figure out how to pass LDFLAGS in build +INSANE_SKIP_${PN} = True +INSANE_SKIP_ti-dmai-apps = True +INSANE_SKIP_ti-dmai-tests = True PACKAGE_ARCH = "${MACHINE_ARCH}" - -#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel -# and for now we make codecs RRECOMMENDS as well, since not everyone will have them -#RDEPENDS_ti-dmai-apps += "ti-codec-combos" -RRECOMMENDS_ti-dmai-apps += "ti-cmem-module ti-lpm-module ti-dsplink-module ti-codec-combos" - +INHIBIT_PACKAGE_STRIP = "1" +PACKAGES += "ti-dmai-apps ti-dmai-tests" +FILES_ti-dmai-apps = "${installdir}/dmai-apps/*" +FILES_ti-dmai-tests = "${installdir}/dmai-tests/*" + +# run time dependencies +RDEPENDS_ti-dmai-apps_dm355-evm += "ti-dm355mm-module ti-cmem-module ti-codec-combo-dm355" +RDEPENDS_ti-dmai-apps_dm6446-evm += "ti-cmem-module ti-dsplink-module ti-codec-combo-dm6446" +RDEPENDS_ti-dmai-apps_omap3evm += "ti-cmem-module ti-dsplink-module ti-codec-combo-omap3530 ti-lpm-module ti-sdma-module" +RDEPENDS_ti-dmai-apps_beagleboard += "ti-cmem-module ti-dsplink-module ti-codec-combo-omap3530 ti-lpm-module ti-sdma-module" diff --git a/recipes/dvsdk/ti-dspbios-native_5.33.02.bb b/recipes/dvsdk/ti-dspbios-native_5.33.02.bb new file mode 100644 index 0000000000..911eeda68c --- /dev/null +++ b/recipes/dvsdk/ti-dspbios-native_5.33.02.bb @@ -0,0 +1,19 @@ +require ti-dspbios.inc +inherit native + +SRC_URI = "http://install.source.dir.com/bios_setuplinux_5_33_02.bin" +BINFILE="bios_setuplinux_5_33_02.bin" + +S = "${WORKDIR}/bios_5_33_02" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "533" +PR = "r11" + +do_stage() { + install -d ${STAGING_DIR_NATIVE}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN}/ +} + +AUTOTOOLS_NATIVE_STAGE_INSTALL="1" + diff --git a/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb b/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb new file mode 100644 index 0000000000..a67ac238a8 --- /dev/null +++ b/recipes/dvsdk/ti-dspbios-sdk_5.33.02.bb @@ -0,0 +1,26 @@ +require ti-dspbios.inc +inherit sdk + +SRC_URI = "http://install.source.dir.com/bios_setuplinux_5_33_02.bin" +BINFILE="bios_setuplinux_5_33_02.bin" + +S = "${WORKDIR}/bios_5_33_02" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "533" +PR = "r11" + +do_install() { + install -d ${D}/${prefix}/dvsdk/bios_5_33_02 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/bios_5_33_02 + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where DSP/BIOS is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/bios.Rules.make + echo "BIOS_INSTALL_DIR=${prefix}/dvsdk/bios_5_33_02" >> ${STAGING_DIR_HOST}/ti-sdk-rules/bios.Rules.make +} + +FILES_${PN} ="${prefix}/dvsdk/bios_5_33_02/*" +INSANE_SKIP_${PN} = True +INHIBIT_PACKAGE_STRIP = "1" + diff --git a/recipes/dvsdk/ti-dspbios.inc b/recipes/dvsdk/ti-dspbios.inc new file mode 100644 index 0000000000..9e79216554 --- /dev/null +++ b/recipes/dvsdk/ti-dspbios.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "TI DSP/BIOS for Davinci and OMAP processor" + +# This file defines function used for extracting .bin file + +python do_unpack () { + bb.build.exec_func('base_do_unpack', d) + bb.build.exec_func('ti_bin_do_unpack', d) +} + +python ti_bin_do_unpack() { + + import os + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + binfile = bb.data.getVar('BINFILE', localdata) + + # Change to the working directory + save_cwd = os.getcwd() + workdir = bb.data.getVar('WORKDIR', localdata) + workdir = bb.data.expand(workdir, localdata) + os.chdir(workdir) + + # Make the InstallJammer binary executable so we can run it + os.chmod(binfile, 0755) + + # Run the InstallJammer binary and accept the EULA + filename = "HOME=%s ./%s" % (workdir, binfile) + f = os.popen(filename,'w') + print >>f, "Y\n" + print >>f, " qY\n" + print >>f, "%s\n" % workdir + print >>f, "Y\n" + f.close() + + # Return to the previous directory + os.chdir(save_cwd) +} + diff --git a/recipes/dvsdk/ti-dsplink-module_1.61.3.bb b/recipes/dvsdk/ti-dsplink-module_1.61.3.bb new file mode 100644 index 0000000000..764af7e6e8 --- /dev/null +++ b/recipes/dvsdk/ti-dsplink-module_1.61.3.bb @@ -0,0 +1,161 @@ +DESCRIPTION = "DSPLINK 1.61.3 module for TI ARM/DSP processors" +inherit module + +# compile and run time dependencies +DEPENDS += " virtual/kernel perl-native ti-dspbios-native ti-cgt6x-native update-modules" + +# tconf from xdctools dislikes '.' in pwd :/ +PR = "r11" +PV = "1613" + +installdir = "${prefix}/ti" +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz \ + file://loadmodules-ti-dsplink-apps.sh \ + file://unloadmodules-ti-dsplink-apps.sh" + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +# DSPLINK - Config Variable for different platform +DSPLINKPLATFORM ?= "DAVINCI" +DSPLINKPLATFORM_omap3evm ?= "OMAP3530" +DSPLINKPLATFORM_beagleboard ?= "OMAP3530" +DSPLINKPLATFORM_dm6446-evm ?= "DAVINCI" + +DSPLINKDSPCFG ?= "DM6446GEMSHMEM" +DSPLINKDSPCFG_omap3evm ?= "OMAP3530SHMEM" +DSPLINKDSPCFG_beagleboard ?= "OMAP3530SHMEM" +DSPLINKDSPCFG_dm6446-evm ?= "DM6446GEMSHMEM" + +DSPLINKGPPOS ?= "MVL5G" +DSPLINKGPPOS_omap3evm ?= "OMAPLSP" +DSPLINKGPPOS_beagleboard ?= "OMAPLSP" +DSPLINKGPPOS_dm6446-evm ?= "MVL5G" + +export DSPLINK="${S}/cetools/packages/dsplink" +STAGING_TI_DSPBIOS_DIR="${STAGING_DIR_NATIVE}/ti-dspbios-native" +STAGING_TI_CGT6x_DIR="${STAGING_DIR_NATIVE}/ti-cgt6x-native" + +do_compile() { + + # Run perl script to create appropriate makefiles (v1.60 and up) + ( + cd ${DSPLINK} + perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 \ + --dspcfg_0=${DSPLINKDSPCFG} --dspos_0=DSPBIOS5XX \ + --gppos=${DSPLINKGPPOS} --comps=ponslrm + ) + + # dsplink makefile is hard-coded to use kbuild only on OMAP3530. + # we are forcing to use kbuild on other platforms. + sed -i 's/OMAP3530/${DSPLINKPLATFORM}/g' ${DSPLINK}/gpp/src/Makefile + + # TODO :: KERNEL_CC, etc need replacing with user CC + # TODO :: Need to understand why OBJDUMP is required for kernel module + # Unset these since LDFLAGS gets picked up and used incorrectly.... need + # investigation + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + + # Build the gpp user space library + cd ${DSPLINK}/gpp/src/api + make \ + CROSS_COMPILE="${TARGET_PREFIX}" \ + CC="${KERNEL_CC}" \ + AR="${KERNEL_AR}" \ + LD="${KERNEL_LD}" \ + COMPILER="${KERNEL_CC}" \ + ARCHIVER="${KERNEL_AR}" \ + KERNEL_DIR="${STAGING_KERNEL_DIR}" \ + clean all + + # Build the gpp kernel space (debug and release) + cd ${DSPLINK}/gpp/src + make \ + OBJDUMP="${TARGET_PREFIX}objdump" \ + CROSS_COMPILE="${TARGET_PREFIX}" \ + CC="${KERNEL_CC}" \ + AR="${KERNEL_AR}" \ + LD="${KERNEL_LD}" \ + COMPILER="${KERNEL_CC}" \ + ARCHIVER="${KERNEL_AR}" \ + KERNEL_DIR="${STAGING_KERNEL_DIR}" \ + clean all + + # Build the gpp samples + cd ${DSPLINK}/gpp/src/samples + make \ + BASE_TOOLCHAIN="${CROSS_DIR}" \ + BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" \ + OSINC_PLATFORM="${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" \ + OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" \ + CROSS_COMPILE="${TARGET_PREFIX}" \ + CC="${KERNEL_CC}" \ + AR="${KERNEL_AR}" \ + LD="${KERNEL_LD}" \ + COMPILER="${KERNEL_CC}" \ + LINKER="${KERNEL_CC}" \ + ARCHIVER="${KERNEL_AR}" \ + KERNEL_DIR="${STAGING_KERNEL_DIR}" \ + clean all + + # Build the dsp library (debug and release) + cd ${DSPLINK}/dsp/src + make \ + BASE_CGTOOLS="${STAGING_TI_CGT6x_DIR}" \ + BASE_SABIOS="${STAGING_TI_DSPBIOS_DIR}" \ + clean all + + # Build the dsp samples (debug and release) + cd ${DSPLINK}/dsp/src/samples + make \ + BASE_CGTOOLS="${STAGING_TI_CGT6x_DIR}" \ + BASE_SABIOS="${STAGING_TI_DSPBIOS_DIR}" \ + clean all +} + +do_install () { + # DSPLINK driver - kernel module + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ + + # DSPLINK library + install -d ${D}/${installdir}/dsplink/libs + install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplink.lib ${D}/${installdir}/dsplink/libs + + # DSPLINK sample apps + install -d ${D}/${installdir}/dsplink/apps + + cp ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/*gpp ${D}/${installdir}/dsplink/apps + + for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do + cp ${i} ${D}/${installdir}/dsplink/apps + done + + # DSPLINK test app module un/load scripts + install ${WORKDIR}/loadmodules-ti-dsplink-apps.sh ${D}/${installdir}/dsplink/apps + install ${WORKDIR}/unloadmodules-ti-dsplink-apps.sh ${D}/${installdir}/dsplink/apps +} + +pkg_postrm () { + update-modules || true +} + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGES += " ti-dsplink-apps" +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*" +FILES_ti-dsplink-apps = "/${installdir}/dsplink/*" + +# Disable QA check untils we figure out how to pass LDFLAGS in build +INSANE_SKIP_${PN} = True +INSANE_SKIP_ti-dsplink-apps = True + diff --git a/recipes/dvsdk/ti-lpm-module_2.23.1.bb b/recipes/dvsdk/ti-lpm-module_2.23.1.bb new file mode 100644 index 0000000000..790b7f99d0 --- /dev/null +++ b/recipes/dvsdk/ti-lpm-module_2.23.1.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "LPM module for TI OMAP3 processors" + +inherit module +# compile and run time dependencies +DEPENDS = " virtual/kernel perl-native ti-dsplink-module" + +PR = "r9" +PV = "2231" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz " + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +export DSPLINK="${S}/cetools/packages/dsplink" + +LPMDSPPOWERSOC ?= "omap3530" +LPMDSPPOWERSOC_omap3evm ?= "omap3530" +LPMDSPPOWERSOC_beagleboard ?= "omap3530" + +do_compile () { + # TODO :: KERNEL_CC, etc need replacing with user CC + # TODO :: Need to understand why OBJDUMP is required for kernel module + # Unset these since LDFLAGS gets picked up and used incorrectly.... need + # investigation + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + + cd ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm + make \ + DSPLINK_REPO="${DSPLINK}/.." \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}" \ + clean default +} + +do_install () { + + # LPM/CMEM/SDMA drivers - kernel modules + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${S}/cetools/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp +} + + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" + +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" +RDEPENDS += " ti-dsplink-module" + diff --git a/recipes/dvsdk/ti-rules-make-sdk.bb b/recipes/dvsdk/ti-rules-make-sdk.bb new file mode 100644 index 0000000000..b60e3a44a5 --- /dev/null +++ b/recipes/dvsdk/ti-rules-make-sdk.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "This package creates Rules.make file and copies top label Makefile for rebuilding dvsdk components." + +inherit sdk + +PR="r4" + +FILES=${@os.path.dirname(bb.data.getVar('FILE',d,1))}/files/dvsdk-rules + +DEPENDS_dm355-evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-dm355-sdk ti-dmai-sdk" +DEPENDS_dm6446-evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-dm6446-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk" +DEPENDS_omap3evm = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-omap3530-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk" +DEPENDS_beagleboard = "ti-xdctools-sdk ti-codec-engine-sdk ti-codec-combo-omap3530-sdk ti-dmai-sdk ti-cgt6x-sdk ti-dspbios-sdk" + + +PLATFORM_dm355-evm = "dm355" +PLATFORM_dm6446-evm = "dm6446" +PLATFORM_omap3evm = "omap3530" +PLATFORM_dm6467-evm = "dm6467" +PLATFORM_beagleboard = "omap3530" + +do_install () { + mkdir -p ${D}/${prefix}/dvsdk/ + + # Create Rules.make file by concatinating pkg Rules.make files. + echo "# Define target platform." > ${D}/${prefix}/dvsdk/Rules.make + echo "PLATFORM=${PLATFORM}" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "# The installation directory of the DVSDK." >> ${D}/${prefix}/dvsdk/Rules.make + echo "DVSDK_INSTALL_DIR=${prefix}/dvsdk" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "# For backwards compatibility" >> ${D}/${prefix}/dvsdk/Rules.make + echo "DVEVM_INSTALL_DIR=\$(DVSDK_INSTALL_DIR)" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + + for file in `ls -1 ${STAGING_DIR_HOST}/ti-sdk-rules` ; do + cat ${STAGING_DIR_HOST}/ti-sdk-rules/${file} >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + done + + echo "# The directory that points to your kernel source directory." >> ${D}/${prefix}/dvsdk/Rules.make + echo "LINUXKERNEL_INSTALL_DIR=${prefix}/${TARGET_SYS}/usr/src/kernel" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "# Where temporary Linux headers and libs are installed." >> ${D}/${prefix}/dvsdk/Rules.make + echo "LINUXLIBS_INSTALL_DIR=${prefix}/${TARGET_SYS}/usr" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "# The prefix to be added before the GNU compiler tools (optionally including # path), i.e. \"arm_v5t_le-\" or \"/opt/bin/arm_v5t_le-\"." >> ${D}/${prefix}/dvsdk/Rules.make + echo "CSTOOL_DIR=${SDK_PATH}" >> ${D}/${prefix}/dvsdk/Rules.make + echo "CSTOOL_PREFIX=\$(CSTOOL_DIR)/bin/arm-none-linux-gnueabi-" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "MVTOOL_DIR=\$(CSTOOL_DIR)" >> ${D}/${prefix}/dvsdk/Rules.make + echo "MVTOOL_PREFIX=\$(CSTOOL_PREFIX)" >> ${D}/${prefix}/dvsdk/Rules.make + echo "" >> ${D}/${prefix}/dvsdk/Rules.make + echo "# Where to copy the resulting executables" >> ${D}/${prefix}/dvsdk/Rules.make + echo "EXEC_DIR=\$(HOME)/install/\$(PLATFORM)" >> ${D}/${prefix}/dvsdk/Rules.make + + # copy Makefile and other scripts needed by Makefile + mkdir -p ${D}/${prefix}/dvsdk/bin + cp ${FILES}/Makefile ${D}/${prefix}/dvsdk/ + cp ${FILES}/info.sh ${D}/${prefix}/dvsdk/bin + cp ${FILES}/check.sh ${D}/${prefix}/dvsdk/bin +} + +FILES_${PN} = "${prefix}/dvsdk/*" diff --git a/recipes/dvsdk/ti-sdma-module_2.23.1.bb b/recipes/dvsdk/ti-sdma-module_2.23.1.bb new file mode 100644 index 0000000000..924a61866a --- /dev/null +++ b/recipes/dvsdk/ti-sdma-module_2.23.1.bb @@ -0,0 +1,52 @@ +DESCRIPTION = "SDMA module for TI OMAP3 processors" + +inherit module +# compile and run time dependencies +DEPENDS = "virtual/kernel perl-native" + +PR = "r9" +PV = "2231" + +SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz " + +# Set the source directory +S = "${WORKDIR}/codec_engine_2_23_01" + +do_compile() { + # SDMA - Build the sdma module + # TODO :: KERNEL_CC, etc need replacing with user CC + # TODO :: Need to understand why OBJDUMP is required for kernel module + # Unset these since LDFLAGS gets picked up and used incorrectly.... need + # investigation + + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + + cd ${S}/cetools/packages/ti/sdo/linuxutils/sdma + make \ + LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ + MVTOOL_PREFIX="${TARGET_PREFIX}" \ + UCTOOL_PREFIX="${TARGET_PREFIX}" \ + clean debug release +} + +do_install () { + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp +} + +pkg_postinst () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" + +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdmak.ko" + diff --git a/recipes/dvsdk/ti-xdctools-native_3.10.03.bb b/recipes/dvsdk/ti-xdctools-native_3.10.03.bb new file mode 100644 index 0000000000..a41098e051 --- /dev/null +++ b/recipes/dvsdk/ti-xdctools-native_3.10.03.bb @@ -0,0 +1,19 @@ +inherit native +require ti-xdctools.inc + +SRC_URI = "http://install.source.dir.com/xdctools_setuplinux_3_10_03.bin" +BINFILE="xdctools_setuplinux_3_10_03.bin" + +S = "${WORKDIR}/xdctools_3_10_03" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "310" +PR = "r14" + +do_stage() { + install -d ${STAGING_DIR_NATIVE}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR_NATIVE}/${PN} +} + +AUTOTOOLS_NATIVE_STAGE_INSTALL="1" + diff --git a/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb b/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb new file mode 100644 index 0000000000..b68a0fcb00 --- /dev/null +++ b/recipes/dvsdk/ti-xdctools-sdk_3.10.03.bb @@ -0,0 +1,25 @@ +inherit sdk +require ti-xdctools.inc + +SRC_URI = "http://install.source.dir.com/xdctools_setuplinux_3_10_03.bin" +BINFILE="xdctools_setuplinux_3_10_03.bin" + +S = "${WORKDIR}/xdctools_3_10_03" + +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "310" +PR = "r14" + +do_install() { + install -d ${D}/${prefix}/dvsdk/xdctools_3_10_03 + cp -pPrf ${S}/* ${D}/${prefix}/dvsdk/xdctools_3_10_03 + + # Creates rules.make file + mkdir -p ${STAGING_DIR_HOST}/ti-sdk-rules + echo "# Where the RTSC tools package is installed." > ${STAGING_DIR_HOST}/ti-sdk-rules/xdc.Rules.make + echo "XDC_INSTALL_DIR=${prefix}/dvsdk/xdctools_3_10_03" >> ${STAGING_DIR_HOST}/ti-sdk-rules/xdc.Rules.make +} + +FILES_${PN} = "${prefix}/dvsdk/xdctools_3_10_03" +INSANE_SKIP_${PN} = True +INHIBIT_PACKAGE_STRIP = "1" diff --git a/recipes/dvsdk/ti-xdctools.inc b/recipes/dvsdk/ti-xdctools.inc new file mode 100644 index 0000000000..9dbd35f24c --- /dev/null +++ b/recipes/dvsdk/ti-xdctools.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "TI XDC tool" + +# This file defines function used for extracting .bin file + +python do_unpack () { + bb.build.exec_func('base_do_unpack', d) + bb.build.exec_func('ti_bin_do_unpack', d) +} + +python ti_bin_do_unpack() { + + import os + + localdata = bb.data.createCopy(d) + bb.data.update_data(localdata) + + binfile = bb.data.getVar('BINFILE', localdata) + + # Change to the working directory + save_cwd = os.getcwd() + workdir = bb.data.getVar('WORKDIR', localdata) + workdir = bb.data.expand(workdir, localdata) + os.chdir(workdir) + + # Make the InstallJammer binary executable so we can run it + os.chmod(binfile, 0755) + + # Run the InstallJammer binary and accept the EULA + filename = "HOME=%s ./%s" % (workdir, binfile) + f = os.popen(filename,'w') + print >>f, "Y\n" + print >>f, " qY\n" + print >>f, "%s\n" % workdir + print >>f, "Y\n" + f.close() + + # Return to the previous directory + os.chdir(save_cwd) +} + |