mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: added insmod() method.
This allows to install a kernel module from a host-side path.
This commit is contained in:
parent
5a81fe9888
commit
10a80d2335
@ -448,12 +448,17 @@ class Target(object):
|
|||||||
size = int(parts[1])
|
size = int(parts[1])
|
||||||
use_count = int(parts[2])
|
use_count = int(parts[2])
|
||||||
if len(parts) > 3:
|
if len(parts) > 3:
|
||||||
used_by = ''.join(parts).split(',')
|
used_by = ''.join(parts[3:]).split(',')
|
||||||
else:
|
else:
|
||||||
used_by = []
|
used_by = []
|
||||||
entries.append(LsmodEntry(name, size, use_count, used_by))
|
entries.append(LsmodEntry(name, size, use_count, used_by))
|
||||||
return entries
|
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):
|
def _update_modules(self, stage):
|
||||||
for mod in self.modules:
|
for mod in self.modules:
|
||||||
if isinstance(mod, dict):
|
if isinstance(mod, dict):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user