summaryrefslogtreecommitdiffstats
path: root/conf/distro/include/tegra.inc
diff options
context:
space:
mode:
Diffstat (limited to 'conf/distro/include/tegra.inc')
-rw-r--r--conf/distro/include/tegra.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/conf/distro/include/tegra.inc b/conf/distro/include/tegra.inc
new file mode 100644
index 0000000..618a634
--- /dev/null
+++ b/conf/distro/include/tegra.inc
@@ -0,0 +1,17 @@
1python set_nv_drv_version () {
2 # Boiler plate code to setup bitbake objects
3 d = e.data
4
5 nv_drv_version = d.getVar('NV_DRV_VER', True)
6 if nv_drv_version != "ignore":
7 # FIXME: When we add support to internal builds, both debug and release
8 # builds will need to be considered
9 path = d.getVar('PLATFORM_TOPDIR', True)
10 get_nv_drv_cmd = "strings " + path + "/lib-target/nvidia_drv.so \
11| grep -o -P '(?<=Driver ).*(?=Release)' | awk {'print $1'}"
12 # Execute cmd
13 nv_drv_version = bb.process.run(get_nv_drv_cmd)[0].strip()
14 # Store returned value in NV_DRV_VER
15 d.setVar('NV_DRV_VER', nv_drv_version)
16}
17