diff options
Diffstat (limited to 'recipes-ti/includes')
-rw-r--r-- | recipes-ti/includes/ti-eula-unpack.inc | 71 | ||||
-rw-r--r-- | recipes-ti/includes/ti-paths.inc | 56 | ||||
-rw-r--r-- | recipes-ti/includes/ti-staging.inc | 8 |
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 | |||
12 | python do_unpack () { | ||
13 | bb.build.exec_func('base_do_unpack', d) | ||
14 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
15 | } | ||
16 | |||
17 | TI_BIN_UNPK_WDEXT += "" | ||
18 | python 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 @@ | |||
1 | installdir = "${datadir}/ti" | ||
2 | |||
3 | # This is where do_install will put it | ||
4 | export CODEGEN_INSTALL_DIR_RECIPE = "${installdir}/ti-cgt6x-tree" | ||
5 | export XDC_INSTALL_DIR_RECIPE = "${installdir}/ti-xdctools-tree" | ||
6 | export XDAIS_INSTALL_DIR_RECIPE = "${installdir}/ti-xdais-tree" | ||
7 | export BIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-dspbios-tree" | ||
8 | export SYSBIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-sysbios-tree" | ||
9 | export BIOSUTILS_INSTALL_DIR_RECIPE = "${installdir}/ti-biosutils-tree" | ||
10 | export FC_INSTALL_DIR_RECIPE = "${installdir}/ti-framework-components-tree" | ||
11 | export FC3_INSTALL_DIR_RECIPE = "${installdir}/ti-framework-components3-tree" | ||
12 | export CE_INSTALL_DIR_RECIPE = "${installdir}/ti-codec-engine-tree" | ||
13 | export EDMA3_LLD_INSTALL_DIR_RECIPE = "${installdir}/ti-edma3lld-tree" | ||
14 | export EDMA3_LLD_SYSBIOS_INSTALL_DIR_RECIPE = "${installdir}/ti-edma3lld-sysbios-tree" | ||
15 | export LINUXUTILS_INSTALL_DIR_RECIPE = "${installdir}/ti-linuxutils-tree" | ||
16 | export CMEM_INSTALL_DIR_RECIPE = "${installdir}/ti-linuxutils-tree" | ||
17 | export LINK_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplink-tree" | ||
18 | export SYSLINK_INSTALL_DIR_RECIPE = "${installdir}/ti-syslink-tree" | ||
19 | export IPC_INSTALL_DIR_RECIPE = "${installdir}/ti-ipc-tree" | ||
20 | export LPM_INSTALL_DIR_RECIPE = "${installdir}/ti-local-power-manager-tree" | ||
21 | export DMAI_INSTALL_DIR_RECIPE = "${installdir}/ti-dmai-tree" | ||
22 | export CODEC_INSTALL_DIR_RECIPE = "${installdir}/ti-codecs-tree" | ||
23 | export DSPLIB_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplib-tree" | ||
24 | export DVSDK_DEMOS_INSTALL_DIR_RECIPE = "${installdir}/ti-dvsdk-demos-tree" | ||
25 | export BIOSPSP_INSTALL_DIR_RECIPE = "${installdir}/ti-biospsp-tree" | ||
26 | export AUDIO_SOC_INSTALL_DIR_RECIPE = "${installdir}/ti-audio-soc-example-tree" | ||
27 | export 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 | ||
30 | export CODEGEN_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CODEGEN_INSTALL_DIR_RECIPE}" | ||
31 | export XDC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${XDC_INSTALL_DIR_RECIPE}" | ||
32 | export XDAIS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${XDAIS_INSTALL_DIR_RECIPE}" | ||
33 | export BIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOS_INSTALL_DIR_RECIPE}" | ||
34 | export SYSBIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${SYSBIOS_INSTALL_DIR_RECIPE}" | ||
35 | export BIOSUTILS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOSUTILS_INSTALL_DIR_RECIPE}" | ||
36 | export FC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${FC_INSTALL_DIR_RECIPE}" | ||
37 | export FC3_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${FC3_INSTALL_DIR_RECIPE}" | ||
38 | export CE_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CE_INSTALL_DIR_RECIPE}" | ||
39 | export EDMA3_LLD_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${EDMA3_LLD_INSTALL_DIR_RECIPE}" | ||
40 | export EDMA3_LLD_SYSBIOS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${EDMA3_LLD_SYSBIOS_INSTALL_DIR_RECIPE}" | ||
41 | export LINUXUTILS_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LINUXUTILS_INSTALL_DIR_RECIPE}" | ||
42 | export CMEM_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CMEM_INSTALL_DIR_RECIPE}" | ||
43 | export LINK_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LINK_INSTALL_DIR_RECIPE}" | ||
44 | export SYSLINK_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${SYSLINK_INSTALL_DIR_RECIPE}" | ||
45 | export IPC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${IPC_INSTALL_DIR_RECIPE}" | ||
46 | export LPM_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${LPM_INSTALL_DIR_RECIPE}" | ||
47 | export DMAI_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${DMAI_INSTALL_DIR_RECIPE}" | ||
48 | export CODEC_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${CODEC_INSTALL_DIR_RECIPE}" | ||
49 | export DSPLIB_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${DSPLIB_INSTALL_DIR_RECIPE}" | ||
50 | export BIOSPSP_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${BIOSPSP_INSTALL_DIR_RECIPE}" | ||
51 | export C6ACCEL_INSTALL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${C6ACCEL_INSTALL_DIR_RECIPE}" | ||
52 | |||
53 | DSPSUFFIX_omapl137 = "x674" | ||
54 | DSPSUFFIX_omapl138 = "x674" | ||
55 | DSPSUFFIX ?= "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 @@ | |||
1 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
2 | |||
3 | PACKAGE_STRIP = "no" | ||
4 | |||
5 | ALLOW_EMPTY_${PN} = "1" | ||
6 | ALLOW_EMPTY_${PN}-dev = "1" | ||
7 | |||
8 | |||