0

I’m experimenting with linux-kernel/net/ipv4/igmp.c. To compile I use buildroot. When I make a change on igmp.c, is a full rebuid necessary?

The easiest way to rebuild a single package from scratch is to remove its build directory in output/build. Buildroot will then re-extract, re-configure, re-compile and re-install this package from scratch. You can ask buildroot to do this with the make -dirclean command.

https://buildroot.org/downloads/manual/manual.html#rebuild-pkg

The documentation talks only about packages, but I think it doesn’t include changes on the kernel itself? How can I avoid a full rebuild?

Olaf4342
  • 1
  • 2
  • "*is a full rebuid necessary?*" -- No. "*How can I avoid a full rebuild?*" -- Buildroot uses **make** files, which will automatically "*avoid a rebuild*" unless source changes have been made. You're overthinking this. The Linux kernel is treated as a package, albeit a special one. More likely the issue will be that a recompile is not performed when you want/need it. Always *verify* that changes are actually incorporated in your "latest" build. If not, then you need to explicitly delete the appropriate **.stamp_xxx** status files in the output/build/ directory to trigger a rebuild. – sawdust Jan 06 '23 at 23:29

2 Answers2

0

Linux is treated like any other package and you can rebuild it with:

$ make linux-rebuild

This is true for all packages.

-rebuild make recipe suffix means something like:

$ make all

in the build/linux/ package directory. So if you change a file and issue that command only that file or its dependencies is built again.

Another useful recipe suffix is -menuconfig that is also available for u-boot (-rebuild too).

buddemat
  • 4,552
  • 14
  • 29
  • 49
0

Probably the simplest way to force a rebuild of the Linux package (or any other package) is to remove the .stamp_built file in the output/build/linux-version directory. After that just make again and it will be rebuilt and installed.

In my case :

rm output/build/linux-v4.19.253/.stamp_built
make
Matt
  • 509
  • 2
  • 14