pack: add layout switch for sbl partition

This patch adds support for sbl partition layout switch on IPQ9574

Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
(cherry picked from commit aa841af6f70823ec782b6efb0ba459f58068f9c6)
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>

Change-Id: Idd950aef614a225c9cb6afd456967f53da6e4993
This commit is contained in:
Rajkumar Ayyasamy 2021-07-16 08:52:28 +05:30 committed by Praveenkumar I
parent 0dc8c1c7a6
commit 136ea5b085

View file

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