script : add apply patch script for simplify build sequence

The current build system is so confused that is submodule patch.
so make the apply_patch script.