New: Cannot skip post-image script with `make prepare-sdk`
https://bugs.busybox.net/show_bug.cgi?id=15576
Bug ID: 15576
Summary: Cannot skip post-image script with `make prepare-sdk`
Product: buildroot
Version: 2023.02.1
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]Target Milestone: ---
Generally in my post-image scripts I perform some intensive tasks that are strictly for the benefit of the preparation and creation of disk images or ISOs. However, if all I want to do is to prepare an SDK, I don't need to do any of these tasks because the SDK should just be building the toolchain, host packages, and (in my case) generating the environment-setup script.
It would be very useful to have an official/built-in way to bypass the post-image script (and possibly the other scripts) when doing make prepare-sdk (either implicitly or explicitly).
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
https://bugs.busybox.net/show_bug.cgi?id=15576
--- Comment #1 from mscdex <[email protected]> ---
My current workaround involves a special environment variable that allows my scripts to bail out early. However, that unfortunately doesn't do anything for when buildroot creates a (compressed) rootfs, which takes substantially longer than my post-* scripts.
If there is some way to prevent buildroot from unnecessarily creating the rootfs when preparing the SDK, I'd be set...
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15576
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #2 from Yann E. MORIN <[email protected]> --- mscdex, All,
Thanks for the report.
Quoted 2 lines
It would be very useful to have an official/built-in way to bypass the post-image script
That's indeed pretty surprising. Could you please try this patch (not sure if bugzilla keeps or removes TABs, so adapt if need be):
Makefile +1 -1
@@ -592,7 +592,7 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf world: target-post-image .PHONY: prepare-sdk -prepare-sdk: world +prepare-sdk: target-finalize staging-finalize host-finalize @$(call MESSAGE,"Rendering the SDK relocatable") PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath
host
PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath
staging
Quoted 2 lines
(and possibly the other scripts) when doing
make prepare-sdk(either implicitly or explicitly).
Post-fakeroot scripts are only caled when building an image, so the above patch should also cover that case.
As for the post-build scripts, they are supposed to actually fixup the build, and they may have to explixitly tweak host/ and staging/ for the purpose of doing small last-minute cleanups and tweaks of various sorts, some which may be needed to get a working SDK (I know of such a case). So I'm afraid that is not going to be possible to cover both cases.
In such a case, I'd suggest that what you are doing, setting an environment variable when you build the SDK and/or doing the full build, and checking that variable in your post-build scripts, is the correct thing to do. I would however argue that what your post-build scripts should not modify target/, staging/, and/or host/ in a way that is incomaptible with assembling an SDK.
Regards,
Yann E. MORIN.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15576
--- Comment #3 from mscdex <[email protected]> --- Yann,
Your suggested patch seems to do the trick. The post-image script is skipped and more importantly the generating and compressing of the rootfs is skipped!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15576
--- Comment #4 from Yann E. MORIN <[email protected]> --- mscdex, All,
Quoted 1 line
Your suggested patch seems to do the trick.
But in fact, it is not correct, because such an SDK would be missing the host tools needed to build the actual images.
Indeed, those host tools are only built as dependencies of the image targets; so, if the image targets are not built, those tools will not be either.
Now, one may argue that it would be perfectly valid that the SDK does not contain host tools to build images, but others may argue otherwise. And I tend to place myself in the second category.
So, I withdraw this patch of mine. We'll need a better solution...
Regards,
Yann E. MORIN.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=15576
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|NEW |RESOLVED--- Comment #5 from Yann E. MORIN <[email protected]> --- Thank you for your report.
The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues
We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.
Thank you!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot