user9969421
user9969421

Reputation:

Use post-build-scripts in buildroot

i use buildroot to build my own rootfs and use post-build.sh to customize it.

In concrete i create a textfile in /opt with

touch $TARGET_DIR/opt/testfile01.txt

and run the make command. I checked the out coming rootfs and testfile01.txt is in /opt. Everyting ok.

Then I change the content of my post-build-sh to

touch $TARGET_DIR/opt/testfile02.txt

and run the make command again.

The behaviour i observe is that both files (testfile01 and testfile02) exists in rootfs after the second make. Also removing rootfs and than run make command do not change this behavior.

In buildroot manual is written that there is no need for a full rebuild after make changes in post-build scripts.

How can in change this behaviour?

Thanks for helping

Edit: buildroot-2018.02.2, Ubuntu 18.04 LTS

Upvotes: 0

Views: 3798

Answers (1)

Thomas Petazzoni
Thomas Petazzoni

Reputation: 5956

Changes made to the post build scripts are done directly in TARGET_DIR. So if your post build script does one thing, and then you change it to do another thing, whatever the first version of the post build script is still visible.

What the manual says is that you do not need to do a complete rebuild to have the post-build script re-executed. It does not say that whatever the post-build script does is "cleaned up" between partial rebuilds. So you are observing the expected behavior.

Upvotes: 3

Related Questions