From eaabe01fa5a90ffdde76a15f116c90e3f4d6cb68 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Wed, 27 Jan 2016 17:03:52 +0000 Subject: [PATCH] BaseLinuxDevice: added insmod() method. Allows insting a kernel module on the target from a .ko located on the host. --- wlauto/common/linux/device.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wlauto/common/linux/device.py b/wlauto/common/linux/device.py index 8c63d8b7..12191f95 100644 --- a/wlauto/common/linux/device.py +++ b/wlauto/common/linux/device.py @@ -840,6 +840,12 @@ class LinuxDevice(BaseLinuxDevice): entries.append(LsmodEntry(name, size, use_count, used_by)) return entries + def insmod(self, path): + """Install a kernel module located on the host on the target device.""" + target_path = self.path.join(self.working_directory, os.path.basename(path)) + self.push_file(path, target_path) + self.execute('insmod {}'.format(target_path), as_root=True) + def ping(self): try: # May be triggered inside initialize()