summaryrefslogtreecommitdiff
path: root/recipes/dvsdk/ti-codec-combo-dm6446.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/dvsdk/ti-codec-combo-dm6446.inc')
-rw-r--r--recipes/dvsdk/ti-codec-combo-dm6446.inc39
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes/dvsdk/ti-codec-combo-dm6446.inc b/recipes/dvsdk/ti-codec-combo-dm6446.inc
new file mode 100644
index 0000000000..44508bf49e
--- /dev/null
+++ b/recipes/dvsdk/ti-codec-combo-dm6446.inc
@@ -0,0 +1,39 @@
+# 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, " \n"
+ print >>f, " qY\n"
+ print >>f, "%s\n" % workdir
+ f.close()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+