Lines Matching refs:section
84 def dump_kernel(self, section, kernel_path):
87 @param section: The kernel to dump. May be A or B.
90 dev = self.partition_map[section.upper()]['device']
95 def write_kernel(self, section, kernel_path):
96 """Write a kernel image to the specified section.
98 @param section: The kernel to write. May be A or B.
101 dev = self.partition_map[section.upper()]['device']
106 def _modify_kernel(self, section,
124 self.dump_kernel(section, self.dump_file_name)
155 self.write_kernel(section, kernel_to_write)
157 def corrupt_kernel(self, section):
158 """Corrupt a kernel section (add DELTA to the first byte)."""
159 self._modify_kernel(section.upper(), self.DELTA)
161 def restore_kernel(self, section):
163 self._modify_kernel(section.upper(), -self.DELTA)
165 def get_version(self, section):
166 """Return version read from this section blob's header."""
167 return self.partition_map[section.upper()]['version']
169 def get_datakey_version(self, section):
170 """Return datakey version read from this section blob's header."""
171 return self.partition_map[section.upper()]['datakey_version']
173 def get_sha(self, section):
174 """Return the SHA1 hash of the section blob."""
176 dev = self.partition_map[section.upper()]['device']
180 def set_version(self, section, version):
184 self._modify_kernel(section.upper(), version, KERNEL_VERSION_MOD)
186 def resign_kernel(self, section, key_path=None):
188 self._modify_kernel(section.upper(),
189 self.get_version(section),