summaryrefslogtreecommitdiffstats
path: root/recipes-ti/includes
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ti/includes')
-rw-r--r--recipes-ti/includes/ti-eula-unpack.inc71
-rw-r--r--recipes-ti/includes/ti-paths.inc56
-rw-r--r--recipes-ti/includes/ti-staging.inc8
3 files changed, 135 insertions, 0 deletions
diff --git a/recipes-ti/includes/ti-eula-unpack.inc b/recipes-ti/includes/ti-eula-unpack.inc
new file mode 100644
index 00000000..3b79c243
--- /dev/null
+++ b/recipes-ti/includes/ti-eula-unpack.inc
@@ -0,0 +1,71 @@
1# This file defines function used for unpacking the .bin file downloaded over
2# the http and display EULA.
3# BINFILE - name of the install jammer .bin file
4# TARFILE - name of the tar file inside the install jammer
5# TI_BIN_UNPK_CMDS - contains list of commands separated with colon to be
6# passed while unpacking the bin file. The keyword
7# workdir expands to WORKDIR and commands are appendded
8# with '\n'. Eg. TI_BIN_UNPK_CMDS="Y:Y: qY:workdir"
9# TI_BIN_UNPK_WDEXT - This variable extends workdir path, if user wants to put
10# the output in some internal directory
11
12python do_unpack () {
13 bb.build.exec_func('base_do_unpack', d)
14 bb.build.exec_func('ti_bin_do_unpack', d)
15}
16
17TI_BIN_UNPK_WDEXT += ""
18python ti_bin_do_unpack() {
19
20 import os
21
22 localdata = bb.data.createCopy(d)
23 bb.data.update_data(localdata)
24
25 binfile = bb.data.getVar('BINFILE', localdata)
26 binfile = bb.data.expand(binfile, localdata)
27
28 # Change to the working directory
29 save_cwd = os.getcwd()
30 workdir = bb.data.getVar('WORKDIR', localdata)
31 workdir = bb.data.expand(workdir, localdata)
32 os.chdir(workdir)
33
34 # Get unpack commands
35 cmd_string = bb.data.getVar('TI_BIN_UNPK_CMDS', localdata)
36 cmd_list = cmd_string.split( ":" )
37
38 # Make the InstallJammer binary executable so we can run it
39 os.chmod(binfile, 0755)
40
41 # Run the InstallJammer binary and accept the EULA
42 filename = "HOME=%s ./%s --mode console" % (workdir, binfile)
43
44 # Test executable by printing installer version or help screen (--version currently broken for some installers)
45 # - this is currently broken in some IJ installers - comment out for now
46 #if os.system(filename + " --version") != 0:
47 # print "ERROR: ti-eula-unpack: failed to execute binary installer"
48 # raise bb.build.FuncFailed()
49
50 f = os.popen(filename,'w')
51 for cmd in cmd_list:
52 if cmd == "workdir":
53 wdext = bb.data.getVar('TI_BIN_UNPK_WDEXT', localdata)
54 wdext = bb.data.expand(wdext, localdata)
55 cmd = workdir+wdext
56 print >>f, "%s\n" % cmd
57 f.close()
58
59 # Expand the tarball that was created if required
60 tarfile = bb.data.getVar('TARFILE', localdata)
61 if bool(tarfile) == True:
62 tarfile = bb.data.expand(tarfile, localdata)
63 tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir)
64 if os.system(tcmd) != 0:
65 print "ERROR: ti-eula-unpack: failed to extract tarfile"
66 raise bb.build.FuncFailed()
67
68 # Return to the previous directory
69 os.chdir(save_cwd)
70}
71
diff --git a/recipes-ti/includes/ti-paths.inc b/recipes-ti/includes/ti-paths.inc
new file mode 100644
index 00000000..e7eefe1d
--- /dev/null
+++ b/recipes-ti/includes/ti-paths.inc
@@ -0,0 +1,56 @@
1installdir = "${datadir}/ti"
2
3# This is where do_install will put it
4export CODEGEN_INSTALL_DIR_RECIPE = "${installdir}/ti-cgt6x-tree"
5export XDC_INSTALL_DIR_RECIPE = "${installdir}/ti-xdctools-tree"
6export XDAIS_INSTALL_DIR_RECIPE = "${installdir}/ti-xdais-tree"
7export BIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-dspbios-tree"
8export SYSBIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-sysbios-tree"
9export BIOSUTILS_INSTALL_DIR_RECIPE = "${installdir}/ti-biosutils-tree"
10export FC_INSTALL_DIR_RECIPE = "${installdir}/ti-framework-components-tree"
11export FC3_INSTALL_DIR_RECIPE = "${installdir}/ti-framework-components3-tree"
12export CE_INSTALL_DIR_RECIPE = "${installdir}/ti-codec-engine-tree"
13export EDMA3_LLD_INSTALL_DIR_RECIPE = "${installdir}/ti-edma3lld-tree"
14export EDMA3_LLD_SYSBIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-edma3lld-sysbios-tree"
15export LINUXUTILS_INSTALL_DIR_RECIPE = "${installdir}/ti-linuxutils-tree"
16export CMEM_INSTALL_DIR_RECIPE = "${installdir}/ti-linuxutils-tree"
17export LINK_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplink-tree"
18export SYSLINK_INSTALL_DIR_RECIPE = "${installdir}/ti-syslink-tree"
19export IPC_INSTALL_DIR_RECIPE = "${installdir}/ti-ipc-tree"
20export LPM_INSTALL_DIR_RECIPE = "${installdir}/ti-local-power-manager-tree"
21export DMAI_INSTALL_DIR_RECIPE = "${installdir}/ti-dmai-tree"
22export CODEC_INSTALL_DIR_RECIPE = "${installdir}/ti-codecs-tree"
23export DSPLIB_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplib-tree"
24export DVSDK_DEMOS_INSTALL_DIR_RECIPE = "${installdir}/ti-dvsdk-demos-tree"
25export BIOSPSP_INSTALL_DIR_RECIPE = "${installdir}/ti-biospsp-tree"
26export AUDIO_SOC_INSTALL_DIR_RECIPE = "${installdir}/ti-audio-soc-example-tree"
27export C6ACCEL_INSTALL_DIR_RECIPE = "${installdir}/ti-c6accel-tree"
28
29# This is where the tools will end up in staging provided PACKAGE_ARCH = ${MACHINE_ARCH} is set
30export CODEGEN_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CODEGEN_INSTALL_DIR_RECIPE}"
31export XDC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${XDC_INSTALL_DIR_RECIPE}"
32export XDAIS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${XDAIS_INSTALL_DIR_RECIPE}"
33export BIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOS_INSTALL_DIR_RECIPE}"
34export SYSBIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${SYSBIOS_INSTALL_DIR_RECIPE}"
35export BIOSUTILS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOSUTILS_INSTALL_DIR_RECIPE}"
36export FC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${FC_INSTALL_DIR_RECIPE}"
37export FC3_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${FC3_INSTALL_DIR_RECIPE}"
38export CE_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CE_INSTALL_DIR_RECIPE}"
39export EDMA3_LLD_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${EDMA3_LLD_INSTALL_DIR_RECIPE}"
40export EDMA3_LLD_SYSBIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${EDMA3_LLD_SYSBIOS_INSTALL_DIR_RECIPE}"
41export LINUXUTILS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LINUXUTILS_INSTALL_DIR_RECIPE}"
42export CMEM_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CMEM_INSTALL_DIR_RECIPE}"
43export LINK_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LINK_INSTALL_DIR_RECIPE}"
44export SYSLINK_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${SYSLINK_INSTALL_DIR_RECIPE}"
45export IPC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${IPC_INSTALL_DIR_RECIPE}"
46export LPM_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LPM_INSTALL_DIR_RECIPE}"
47export DMAI_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${DMAI_INSTALL_DIR_RECIPE}"
48export CODEC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CODEC_INSTALL_DIR_RECIPE}"
49export DSPLIB_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${DSPLIB_INSTALL_DIR_RECIPE}"
50export BIOSPSP_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOSPSP_INSTALL_DIR_RECIPE}"
51export C6ACCEL_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${C6ACCEL_INSTALL_DIR_RECIPE}"
52
53DSPSUFFIX_omapl137 = "x674"
54DSPSUFFIX_omapl138 = "x674"
55DSPSUFFIX ?= "x64P"
56
diff --git a/recipes-ti/includes/ti-staging.inc b/recipes-ti/includes/ti-staging.inc
new file mode 100644
index 00000000..2bacd7a9
--- /dev/null
+++ b/recipes-ti/includes/ti-staging.inc
@@ -0,0 +1,8 @@
1PACKAGE_ARCH = "${MACHINE_ARCH}"
2
3PACKAGE_STRIP = "no"
4
5ALLOW_EMPTY_${PN} = "1"
6ALLOW_EMPTY_${PN}-dev = "1"
7
8