def check_bct(self): if os.path.isfile(ac100_bct_dump()): return 0 print "AC100 generate BCT DUMP" res = init() if res != 0: return res res = get_raw_data(0, 2, ac100_bct_dump()) if res != 0: return res return 0
def repart_vendor(self, bootloader, config): print "AC100 repartition for vendor scheme" self.bootloader = binaries() + bootloader self.config = configs() + config self.bct = ac100_bct_dump() if not self.check_files(): return 2 (res, self.bct) = gen_bct(self.bootloader, self.bct) if res != 0: return res res = self.repart() if res != 0: return res part_table = generated() + "partitiontable.txt" res = backup_partitiontable(part_table) if res != 0: return res res, gens = generate_new_partitions(part_table) if res != 0: return res #TODO: generate_new_partitions shoud return file names and IDs for g in gens: push_part(g[0], g[1]) return 0
def repart_gpt(self, bootloader, config): print "AC100 repartition for GPT" self.bootloader = binaries() + bootloader self.config = configs() + config self.bct = ac100_bct_dump() if not self.check_files(): return 2 (res, self.bct) = gen_bct(self.bootloader, self.bct) if res != 0: return res return self.repart()