update_kernel: Use fixed partition numbers as fallback
When updating kernel on a device with a R57 image, update_kernel
succeeds without any error, but the kernel is mysteriously not
The issue is that older images built before
has no PARTITION_NUM_* in /usr/sbin/write_gpt.sh which is
read by update_kernel since
So new_kern.bin is dd-ed to /dev/mmcblk0p instead of
/dev/mmcblk0p2 or /dev/mmcblk0p4.
This patch adds the fixed partition numbers as fallback
in case the target image provides none.
TEST=update_kernel to a R57 image on Kip and see local
kernel changes are applied on device.
Signed-off-by: Ben Zhang <email@example.com>
Reviewed-by: Mike Frysinger <firstname.lastname@example.org>
1 file changed