The function get_kernelversion uses generated header files to extract the
version number. But those files are not available until do_compile, and
do_compileconfigs is injected before that, hence the version becomes None
and breaks in several places.
Introduce a new task do_preparekernel that calls "make prepare" in the
kernel tree to generate all the necessary files. It's also safer to call
do_configure early on.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>