mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 21:25:03 +00:00
Let's future proof hammer a bit: current flash usage, after
applying uncommmited patches, is about 36/50 kB for RO/RW respectively.
Let's change the RO/RB/RW layout from 64/4/60 kB to 44/4/80 kB.
BRANCH=none
BUG=b:38489464
TEST=Enable CONFIG_CMD_FLASH and force WP_L low.
TEST=flashwrite 0xa000 0x100 => ok
flashwp true; reboot
flashinfo => ro_at_boot ro_now
YYYYYYYY YYY..... ........ ........
flashread 0xa000 0x100 => Incrementing numbers 0->255
flasherase 0xa000 0x800 => error
flashread 0xa000 0x800 => Incrementing numbers 0->255
TEST=(rollback)
rollbackupdate 2 => works, rollbackinfo is correct
flashwp rb; reboot
flashread 0xb000 0x100 => Rollback info followed by 0xff
flasherase 0xb000 0x800 => error
flashread 0xb000 0x800 => Unchanged
rollbackupdate 3 => fails
TEST=(rw)
flashwp rw; reboot
flashinfo => all_at_boot all_now
flashread 0x0c000 0x100
flasherase 0x0c000 0x800 => Access denied
flashread 0x0c000 0x100
flashread 0x1f800 0x100 => 0xff
flashwrite 0x1f800 0x100 => Access denied
flashread 0x1f800 0x100
TEST=(norw)
flashwp norw; reboot
flasherase 0x0c000 0x800 => ok
flashread 0x0c000 0x100 => 0xff
flashwrite 0x0c000 0x100
flashread 0x0c000 0x100 => Incrementing numbers 0->255
reboot => RW does not verify anymore
TEST=(norb)
flashwp norb
flasherase 0xb000 0x800
flashwrite 0xb000 0x100
rollbackinfo => block 0 shows incorrect values.
Change-Id: I915ffe3032e6a70f761c5f7ea2940feaae58366b
Reviewed-on: https://chromium-review.googlesource.com/510413
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>