Advertisement
Guest User

100-bl2-skip-badblocks.patch

a guest
Aug 10th, 2022
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Index: arm-trusted-firmware-mediatek-2021-05-08-d2c75b21/plat/mediatek/mt7622/bl2_boot_snand.c
  2. ===================================================================
  3. --- arm-trusted-firmware-mediatek-2021-05-08-d2c75b21.orig/plat/mediatek/mt7622/bl2_boot_snand.c
  4. +++ arm-trusted-firmware-mediatek-2021-05-08-d2c75b21/plat/mediatek/mt7622/bl2_boot_snand.c
  5. @@ -56,8 +56,13 @@ static size_t snand_read_range(int lba,
  6. chunksize = sizeremain;
  7.  
  8. ret = mtk_snand_read_page(snf, off, page_cache, NULL, false);
  9. - if (ret < 0)
  10. - break;
  11. + if (ret < 0) {
  12. + off += chunksize;
  13. + ptr += chunksize;
  14. + sizeremain -= chunksize;
  15. +
  16. + continue;
  17. + }
  18.  
  19. memcpy(ptr, page_cache, chunksize);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement