Merge "pack: add layout switch for sbl partition"

This commit is contained in:
Linux Build Service Account 2021-11-15 21:38:19 -08:00 committed by Gerrit - the friendly Code Review server
commit 29a1ce8b54

View file

@ -533,6 +533,9 @@ class Flash_Script(FlashScript):
else: else:
pass pass
def switch_layout_qpic(self, layout):
self.append("qpic_nand %s" % layout)
its_tmpl = Template(""" its_tmpl = Template("""
/dts-v1/; /dts-v1/;
@ -1098,7 +1101,13 @@ class Pack(object):
if part_info.which_flash == 0: if part_info.which_flash == 0:
offset = part_info.offset offset = part_info.offset
script.erase(offset, part_info.length) script.erase(offset, part_info.length)
if ARCH_NAME in ["ipq9574", "ipq9574_64"]:
if self.flash_type == "nand-4k" and section_conf == "sbl1":
script.switch_layout_qpic("sbl")
script.write(offset, img_size) script.write(offset, img_size)
if ARCH_NAME in ["ipq9574", "ipq9574_64"]:
if self.flash_type == "nand-4k" and section_conf == "sbl1":
script.switch_layout_qpic("linux")
else: else:
offset = part_info.offset offset = part_info.offset
script.nand_write(offset, part_info.length, img_size, spi_nand) script.nand_write(offset, part_info.length, img_size, spi_nand)