4

I made few changes in dts and when i gave make -j8 from my aosp-root-directory, I don't see the changes taking place after building it and booting up my board. It just quickly builds in a minute or so. For the changes to take place, i had to give make clean.

Giving make clean takes about 4 hours. Do i have to give make clean everytime i do any changes in my build/dts or can we somehow just clean kernel and build it without cleaning the whole OUT directory?

Sourabrt
  • 2,126
  • 2
  • 8
  • 22

3 Answers3

3

To enforce the changes and make sure that they are present in the images, I manually remove the system and vendor images before make:

find ./out -name vendor.img -delete -o -name system.img -delete

and then do make:

make -j8
Mykola Khyliuk
  • 1,234
  • 1
  • 9
  • 16
2

In most cases the changes should be picked up by the build system. But to be sure and keep build time a bit less, you can use make installclean instead of make clean and build again.

Also, consider enabling compiler cache (ccache) for speeding up subsequent builds.

Check the flags for ccache here: https://cs.android.com/android/platform/superproject/+/master:build/make/core/ccache.mk

Rajat Gupta
  • 419
  • 3
  • 10
1

You can try the following options:

  1. Recommended method would be to use make installclean and then make -j32. installclean will clear only the relevant output files.

  2. dts files are compiled using dtc compiler to a format called dtb. Remove the relevant dtb file in kernel folder and rebuild. dtb files are usually integrated to boot.img. So delete all boot.img in /out and /kernel folder.

    find out/ kernel/ -name boot.img | xargs rm

Second method would be more faster in this case. But a cleaner method would be the first method.

make clean wipes out the entire /out directory which will increase the build time than make installclean. Build time also depends on the host machine capability.