0

I'm using buildroot 2018.05 and I'm noticing that if I remove some files in my overlay that the files are still being copied into the rootfs. I thought that any changes made in the overlay would automatically propagate when running make again without requiring me to do make clean and then make again?

I want to avoid having to re-download all packages and at least avoid re-compiling the toolchain each time I make changes to the overlay.

b20000
  • 995
  • 1
  • 12
  • 30

1 Answers1

1

Buildroot cannot "know" when files have been removed from the overlay; it just copies the files from the overlay into the target rootfs.

Although Buildroot does do some tracking of where each file comes from, this information is not definitive so it can't be used to remove files again. In particular, files created or overwritten by the rootfs overlay or by a post-build script are (currently) not tracked.

It is true that the information in the (current) manual is misleading: "when changes to the root filesystem overlay, a post-build script or a post-image script are made, there is no need for a full rebuild". This is a bug in the manual and should be fixed. Feel free to submit a patch.

Arnout
  • 2,927
  • 16
  • 24
  • OK, got it. I totally understand the requirement to do a full rebuild if options are changed such as the compiler optimization level or other stuff that affects potentially all packages. However it makes no sense to ask a user to do a full rebuild (including toolchain!) if all that has changed is a file in a rootfs overlay. Is there a workaround for this situation such that at least the packages/toolchain doesn't have to be rebuilt? – b20000 Jun 13 '18 at 18:32
  • 1
    You can use a separate configuration for building the toolchain, and then import it as an external toolchain. – Arnout Jun 15 '18 at 10:00
  • 1
    ok, would that require building into 2 different output directories? – b20000 Jun 16 '18 at 11:34
  • 1
    Yes indeed it does. – Arnout Jun 17 '18 at 15:43