2

I'm trying to optimize the way our system is getting built and one of the problems I am faced with is the linux kernel getting rebuilt every time the build systems recompile.

There is a customized cache mechanism in place which allows our developers to patch the root fs at different point of the building process. Some applications are copied just before buildroot is rebuilt by updating the target root fs before buildroot can generate the target linux image (vmlinux, which includes the initramfs).

To avoid recompiling buildroot we have a system which copies all the object files from a previously compiled folder into a local folder and then make is invoked in the latest. It works fine for all packages in buildroot BUT for the linux kernel, which gets rebuilt every time.

After a long analysis of the makefile logs, I think this is happening because of absolute paths being present in some of the kernel dependencies (which forces some generated files to be re-generated again, thus recompiling almost everything).

I have multiple tracks to explore starting from there but I can't find any more info on neither of those:

  • Can I configure/compile the linux kernel so that it uses only relative paths ?

  • If not, can I patch those paths safely ?

  • If not, can I tell buildroot to use a previously compiled vmlinux image to build it's final package ?

Alex Garcia
  • 773
  • 7
  • 21

0 Answers0