Hello All

Just discovered something, wanted to share, might be that many out there
will be knowing this, for the unknowns sharing this:

We do few source file change and then end up building the entire stuff
using "make" command. Mid way through the build we see that a single
annoying COMPILE ERROR and see its such a waste of time.

So the ideal thing is to just compile and link only the changed file which
will be quick and rest assured FULL the build will succeed. So here's how
it is to be done:

In my below example I am building the Sensor file which is in the path,
kernel/drivers/hwmon:
*The build command is:* make -C ../out/target/product/snowball/obj/kernel/
SUBDIRS=drivers/hwmon ARCH=arm CROSS_COMPILE=arm-eabi-

*Replace the "drivers/hwmon" to your location where the file you modified
is present and it builds.*

For eg:
venkatr@build1:~/snowball_board_branch_0.0.3/kernel$ vim
drivers/hwmon/lsm303dlh_m.c
venkatr@build1:~/snowball_board_branch_0.0.3/kernel$ make -C
../out/target/product/snowball/obj/kernel/ SUBDIRS=drivers/hwmon ARCH=arm
CROSS_COMPILE=arm-eabi-
make: Entering directory
`/u/home01/venkatr/snowball_board_branch_0.0.3/out/target/product/snowball/obj/kernel'
make -C /u/home01/venkatr/snowball_board_branch_0.0.3/kernel
O=/u/home01/venkatr/snowball_board_branch_0.0.3/out/target/product/snowball/obj/kernel/.

  CC      drivers/hwmon/lsm303dlh_m.o
  LD      drivers/hwmon/built-in.o
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory
`/u/home01/venkatr/snowball_board_branch_0.0.3/out/target/product/snowball/obj/kernel'
venkatr@build1:~/snowball_board_branch_0.0.3/kernel$


BR,
Venkat.
_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to