summaryrefslogtreecommitdiff
path: root/recipes/dvsdk/ti-codec-combo-omap3530.inc
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2009-06-16 16:42:27 +0100
committerPhil Blundell <philb@gnu.org>2009-06-16 16:42:27 +0100
commit4e0f69867535f4a93e0af3ffb26336e1a3a85f65 (patch)
treec4e1f45e61cc101564036737ba3518de74c5ed01 /recipes/dvsdk/ti-codec-combo-omap3530.inc
parent73bdf9cc0c931f8d49596bc89ceb632e2e464d84 (diff)
parente2b659db223fca8b5e3e8c3241da0d8a3399f25e (diff)
Merge branch 'org.openembedded.dev' of git@new.openembedded.org:openembedded into org.openembedded.dev
Diffstat (limited to 'recipes/dvsdk/ti-codec-combo-omap3530.inc')
-rw-r--r--recipes/dvsdk/ti-codec-combo-omap3530.inc46
1 files changed, 46 insertions, 0 deletions
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
+}
+