On Tue, May 22, 2018 at 02:04:21AM +0300, Sam Protsenko wrote:

> In commit e163a931af34 ("cmd: gpt: backup boot code before writing MBR")
> there was added the procedure for storing old boot code when doing "gpt
> write". But instead of storing just backup code, the whole MBR was
> stored, and only specific fields were replaced further, keeping
> everything else intact. That's obviously not what we want.
> 
> Fix the code to actually store only old boot code and zero out
> everything else. This fixes next testing case:
> 
>     => mmc write $loadaddr 0x0 0x7b
>     => gpt write mmc 1 $partitions
> 
> In case when $loadaddr address and further memory contains 0xff, the
> board was bricked (ROM-code probably didn't like partition entries that
> were clobbered with 0xff). With this patch applied, commands above don't
> brick the board.
> 
> Signed-off-by: Sam Protsenko <semen.protse...@linaro.org>
> Cc: Alejandro Hernandez <ajhernan...@ti.com>
> Tested-by: Andy Shevchenko <andy.shevche...@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to