-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build System: Resolve CPU-specific logic in common build files #457
Conversation
NOTE: Please review, verify, and merge if possible. I am not really set up to do verifcation on Spresense at this time. This should resolve Issue #442 and provide guidance for completion of #437 This is the same base solution that was used for another architecture so has a solid precedence, works very well, and is very simple. |
after typo fix +1 |
it was built and verified here with the local typo fix |
My preference would be to do the merge now. My only hesitation is that Xiang did offer a different solution. This solution is superior to the one Xiang offered, however. But perhaps he is not available due to the time difference. In that case, I would elect to continue with the merge. Then we can get the ESP32 PR on the way too. |
I have also verified that builds for a few other architectures that do no redefine POSTBUILD also build with not problem. |
@@ -35,6 +35,7 @@ | |||
|
|||
include ${TOPDIR}/.config | |||
include ${TOPDIR}/tools/Config.mk | |||
include ${TOPDIR}/boards/arm/cxd56xx/scripts/cxd56xx_Config.mk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about remove cxd56xx_ prefix? because:
1.The path already have cxd56xx
2.Align with tools/Config.mk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Doing that now. Should also change zds_Config.mk for the same reason. I was following the pattern set by zds_Config.mk. I will push new changes momentarily.
@@ -0,0 +1,41 @@ | |||
############################################################################ | |||
# board/arm/cxd56xx/script/cxd56xx_Config.defs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defs to mk
* tools/Config.mk - Add empty definition POSTBUILD * tools/Makefile.unix/win - Replace CXD56xx specific logic with $(call POSTBUILD) * boards/arm/cxd56xx/scripts/Config.mk - Add POSTBUILD definitions with logic removed from Makefile.unix/win * boards/arm/cxd56xx/spresense/scripts/Make.defs - Include the CXD56xx Config.mk immediately after tools/Config.mk so that the empty POSTBUILD definition will be replaced with the correct one NOTE: There is a precedent for this approach. This is the way that other architecture-specific build options are implemented. See, for example, tools/zds/Config.mk
@xiaoxiang781216 Updated. Please review and merge if possible. |
Thanks. Just saw the PR trigger running. Nice job guys! Congratulations! That was a lot of work. |
This solution look very good, I can migrate our internal post build process to this elegant mechanism now. |
Overriding the define's in tools/Config.mk is a very powerful customization technique. You could do many different things there, such as copying binaries onto and TFTP server, compressing binaries, etc. ... whatever meets the needs of the platform. |
NOTE: There is a precedent for this approach. This is the way that other architecture-specific build options are implemented. See, for example, tools/zds/zds_Config.mk