blob: 618a634aac377f8ba1225581830912650e9dcf8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
python set_nv_drv_version () {
# Boiler plate code to setup bitbake objects
d = e.data
nv_drv_version = d.getVar('NV_DRV_VER', True)
if nv_drv_version != "ignore":
# FIXME: When we add support to internal builds, both debug and release
# builds will need to be considered
path = d.getVar('PLATFORM_TOPDIR', True)
get_nv_drv_cmd = "strings " + path + "/lib-target/nvidia_drv.so \
| grep -o -P '(?<=Driver ).*(?=Release)' | awk {'print $1'}"
# Execute cmd
nv_drv_version = bb.process.run(get_nv_drv_cmd)[0].strip()
# Store returned value in NV_DRV_VER
d.setVar('NV_DRV_VER', nv_drv_version)
}
|