mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq5018: Add support for ART partition recovery
This patch adds support for recovering ART calibrated data from older layout and copy to ART partition as per newer flash layout[partition offset changed]. Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org> Change-Id: Ie460754fc22f522e801336f6005056f31689734c
This commit is contained in:
parent
32f559df0c
commit
1a58ecf32e
1 changed files with 25 additions and 0 deletions
|
|
@ -1368,6 +1368,31 @@ class Pack(object):
|
|||
if ret == 0:
|
||||
return 0 #Stop packing this single-image
|
||||
|
||||
# ART partition back-up procedure
|
||||
if ARCH_NAME == "ipq5018" and (self.flash_type == "norplusnand" or self.flash_type == "norplusemmc"):
|
||||
script.append('if test "x$verbose" = "x"; then', fatal=False)
|
||||
script.append('setenv stdout nulldev', fatal=False)
|
||||
script.append('else', fatal=False)
|
||||
script.append('setenv stdout serial', fatal=False)
|
||||
script.append('fi', fatal=False)
|
||||
script.append('sf read 0x50000000 0x290000 0x4', fatal=False)
|
||||
script.append('mw.b 0x51000000 0xA505A505 0x4', fatal=False)
|
||||
script.append('cmp.b 0x50000000 0x51000000 0x4 || magic=1', fatal=False)
|
||||
script.append('if test "$magic" = "1"; then', fatal=False)
|
||||
script.append('sf read 0x52000000 0x2f0000 0x70000', fatal=False)
|
||||
script.append('sf erase 0x330000 0x70000', fatal=False)
|
||||
script.append('sf write 0x52000000 0x330000 0x70000', fatal=False)
|
||||
script.append('sf erase 0x290000 0x10000', fatal=False)
|
||||
script.append('sf write 0x51000000 0x290000 0x4', fatal=False)
|
||||
script.append('magic=0', fatal=False)
|
||||
script.append('setenv stdout serial', fatal=False)
|
||||
script.append('echo "Recovering ART partition: [ done ]"', fatal=False)
|
||||
script.append('else', fatal=False)
|
||||
script.append('setenv stdout serial', fatal=False)
|
||||
script.append('echo "Recovering ART partition: [ skipped ]"', fatal=False)
|
||||
script.append('fi', fatal=False)
|
||||
# end of ART partition back-up procedure
|
||||
|
||||
if QCN9000:
|
||||
script.end_if() #end if started for hk+pine
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue