1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01:00

target: added insmod() method.

This allows to install a kernel module from a host-side path.
This commit is contained in:
Sergei Trofimov 2016-01-27 17:02:59 +00:00
parent 5a81fe9888
commit 10a80d2335

View File

@ -448,12 +448,17 @@ class Target(object):
size = int(parts[1])
use_count = int(parts[2])
if len(parts) > 3:
used_by = ''.join(parts).split(',')
used_by = ''.join(parts[3:]).split(',')
else:
used_by = []
entries.append(LsmodEntry(name, size, use_count, used_by))
return entries
def insmod(self, path):
target_path = self.get_workpath(os.path.basename(path))
self.push(path, target_path)
self.execute('insmod {}'.format(target_path), as_root=True)
def _update_modules(self, stage):
for mod in self.modules:
if isinstance(mod, dict):