refactor tools/build.c again
Partially fix the Image generation

But still the kernel don't run, need further investigation.