make ARCH=arm msm_defconfig
make ARCH=arm CROSS_COMPILE=$SOURCE_FOLDER/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- zImage -j4
I would like to build android kernel, and I did find some tutorial on that. and I found the command above, I want to know how this command work? So if someone can explain it or give me some references on this, that will be better.
Thanks in advance !
make ARCH=armwill specify that this is an intended build for the ARM architecture since you are cross-compiling on a non-ARM system.CROSS_COMPILEis specifying the name to append to tools so that the correct tools are used to generate your resulting object files and binaries.ARCH=armis actually a local environment variable (for lack of the official term) – you could have set it as an environment variable. Same thing withCROSS_COMPILEThough if you did that, you might affect your environment for all
makecommands executed.edit The only resource that seemed useful in explaining those two flags to any extent, as everyone else basically says to copy what they do without fully explaining it: http://book.opensourceproject.org.cn/embedded/oreillybuildembed/opensource/belinuxsys-chp-5-sect-3.html