def connect(self, timeout=None): self.platform.init_target_connection(self) tid = id(threading.current_thread()) self._connections[tid] = self.get_connection(timeout=timeout) self.busybox = self.get_installed('busybox') self.platform.update_from_target(self) self._update_modules('connected') if self.platform.big_core and self.load_default_modules: self._install_module(get_module('bl'))
def connect(self, timeout=None): self.platform.init_target_connection(self) tid = id(threading.current_thread()) self._connections[tid] = self.get_connection(timeout=timeout) self._resolve_paths() self.busybox = self.get_installed("busybox") self.platform.update_from_target(self) self._update_modules("connected") if self.platform.big_core and self.load_default_modules: self._install_module(get_module("bl"))
def _update_modules(self, stage): for mod in self.modules: if isinstance(mod, dict): mod, params = mod.items()[0] else: params = {} mod = get_module(mod) if not mod.stage == stage: continue if mod.probe(self): self._install_module(mod, **params) else: self.logger.debug('Module {} is not supported by the target'.format(mod.name))
def _update_modules(self, stage): for mod in self.modules: if isinstance(mod, dict): mod, params = mod.items()[0] else: params = {} mod = get_module(mod) if not mod.stage == stage: continue if mod.probe(self): self._install_module(mod, **params) else: self.logger.debug( 'Module {} is not supported by the target'.format( mod.name))