top of page

Stop typing make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=... when building the Linux kernel

Updated: May 14, 2023



This post shows you stop typing make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=... -j2 and just type make when building the Linux kernel.


Versions Used


GNU Make 4.1 Built for x86_64-pc-linux-gnu (type make --version to list this)



Steps


Instead of typing:


make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=$TOP/obj/linux-arm-versatile_defconfig -j2


You can set ARCH, CROSS_COMPILE, the output directory (O) and the number of make jobs (-j2) using environment variables (bash):


Type the following in your terminal:


export ARCH=arm

export CROSS_COMPILE=arm-linux-gnueabi-

export KBUILD_OUTPUT=$TOP/obj/linux-arm-versatile_defconfig

export MAKEFLAGS=j2


Then you can just type make



References


GNU Make @ [link]

bottom of page