Search code examples
linux-kernelandroid-buildandroid-kernel

How to speed up android build system


Generally, is there any steps/tricks to speed up the android build, apart from -jN option. Even for a single line change in kernel, running 'make bootimage', the android build system scans all Android.mk. Any ways to skip this at least ?


Solution

  • By referring build/core/Makefile, It shows that, we can see the sequence of commands running while building by passing SHOW_COMMANDS=1 while building Android as below,

    SHOW_COMMANDS=1 V=1 make bootimage -j1 -n >bootimage.txt 
    

    From this we can extract the commands which are necessary for our case, and we can put into a script to build. eg, bootimage.sh