From 136ea5b0850540f7335a1c19b3f41c5c8bf4afef Mon Sep 17 00:00:00 2001 From: Rajkumar Ayyasamy Date: Fri, 16 Jul 2021 08:52:28 +0530 Subject: [PATCH] pack: add layout switch for sbl partition This patch adds support for sbl partition layout switch on IPQ9574 Signed-off-by: Rajkumar Ayyasamy (cherry picked from commit aa841af6f70823ec782b6efb0ba459f58068f9c6) Signed-off-by: Praveenkumar I Change-Id: Idd950aef614a225c9cb6afd456967f53da6e4993 --- tools/pack.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/pack.py b/tools/pack.py index 5a4d38fa9c..28ed0d976e 100644 --- a/tools/pack.py +++ b/tools/pack.py @@ -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)