see in linux kernel compilation if just do make
make ARCH=xyz uImage
then it will compile files as per your .conf file and create .o or .ko in same folder where your .c file is there.
So is there any way so i can force to compilation so that all .o and .ko will be any in different folder specified by me
try using make O=/path/to/mydir
Here is the documentation from the kernel's Makefile:
# kbuild supports saving output files in a separate directory.
# To locate output files in a separate directory two syntaxes are supported.
# In both cases the working directory must be the root of the kernel src.
# 1) O=
# Use "make O=dir/to/store/output/files/"
#
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the directory
# where the output files shall be placed.
# export KBUILD_OUTPUT=dir/to/store/output/files/
# make
#
# The O= assignment takes precedence over the KBUILD_OUTPUT environment
# variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With