From 8687813463bc7c9f37349000f75cfc0967da8458 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 16 Jun 2009 16:08:09 +0200 Subject: dvsdk: sync with TI overlay (http://arago-project.org/git/people/?p=brijesh/arago-dvsdk.git;a=summary) * cleanups will follow later --- recipes/dvsdk/ti-xdctools.inc | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 recipes/dvsdk/ti-xdctools.inc (limited to 'recipes/dvsdk/ti-xdctools.inc') 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) +} + -- cgit v1.2.3