Originally Posted by ixtab
See this post
for determining whether the kernel file has the correct size. Note: too large a file is no problem, too small is.
If a file is larger than the kernel storage area on mmc, it could potentially overwrite something beyond that storage area, but the kernels we have been working with are smaller than that. Beware that the main and diags kernel storage areas are not the same size, so flashing the wrong kernel could become an issue at some point.
As the linked post shows, some (or most) of our kernels are rounded up to the next 1024 bytes, so should not be too short. It is only when a kernel is from 1 to 64 bytes short of a full 1024 bytes that any bytes should get truncated (which is apparently the case for the new 5.1.x kernels).