mod_image_for_recovery: don't build kernel when --kernel_image specified

If --kernel_image is specified, the script still creates a kernel image
and doesn't use it at all. Move the build kernel step under if clause
to save a few minutes.

Also fixed some lint error

TEST=Run the script manually

Change-Id: Ia73c10cb1166e55d252af7c0dc5f048a349f0d59
Tested-by: Ting Shen <>
Commit-Queue: Ting Shen <>
Reviewed-by: Mike Frysinger <>
1 file changed