How to build without make clean after making changes in dts with AOSP?

Viewed 907

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?

3 Answers

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

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.

Related