mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
display5: config: Add GPT verification and restoration code on SWUpdate entry
If GPT gets broken, then after N boot attempts we will run the SWUpdate restoration image. On its enter we will check GPT and restore it if needed. To test it: display5 > mmc write 0x12000000 4 8 It will overwrite the primary GPT table. Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
parent
bfb504bc7e
commit
0f05512d11
1 changed files with 10 additions and 0 deletions
|
@ -144,6 +144,16 @@
|
|||
"echo '#######################';" \
|
||||
"echo '# RECOVERY SWUupdate #';" \
|
||||
"echo '#######################';" \
|
||||
"echo '#######################';" \
|
||||
"echo '# GPT verify #';" \
|
||||
"if gpt verify mmc ${mmcdev} ${partitions}; then " \
|
||||
"echo '# OK ! #';" \
|
||||
"else " \
|
||||
"echo '# FAILED ! #';" \
|
||||
"echo '# GPT RESTORATION #';" \
|
||||
"gpt write mmc ${mmcdev} ${partitions};" \
|
||||
"fi;" \
|
||||
"echo '#######################';" \
|
||||
"setenv loadaddr_swu_initramfs 0x14000000;" \
|
||||
"setenv bootargs console=${console} " \
|
||||
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
|
||||
|
|
Loading…
Add table
Reference in a new issue