简体   繁体   中英

How to prevent recompile all of linux kernel objects when I have changed .config file or made kernel package?

From time to time, I have to recompile linux kernel. I already know linux Makefile prevents recompilation when object files exist, but sometimes there is an exception such as changing configuration file (.config) or making debian package.

Even if I have changed any minor contents in .config like adding new module which seems not to affect other files, 'make' command tried to clean all of objects and recompile.

Also, my kernel programming workflow usually is to make debian kernel package and to deploy other baremetal machine, so I have many chances to make debian kernel pakage. In this case, 'make' command always recompile all of the files even worse.

Is there any efficient way to prevent recompile linux kernel which is very time consuming? Any workaround would be helpful.

My target kernel is 4.4 + ubuntu 16.04. I used 'make debpkg' for debian packaging.

Make operates on time stamps of the files.

There is no way for make to detect if one of the variables set in config affects your code. It would have to parse the whole C-code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM