-
Notifications
You must be signed in to change notification settings - Fork 3k
Check-in PSA related auto-generated files to support online compiler. #11685
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
Conversation
@jainvikas8, thank you for your changes. |
3fe983b
to
7451445
Compare
a8df8dd
to
56ef8f3
Compare
Needs a preceding PR merge #11775 Tested with: |
Merged, this can proceed? |
Yes, please start CI. |
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.
This will change both the online and offline (mbed-cli) builds. It looks like the change removes all of the auto generation in favor of checked-in files for both online and offline building (ie the generator will not now be used at all). Is this intentional. If so, can you add a note to the PR description to indicate that offline builds are affected too?
@@ -44,7 +44,6 @@ | |||
from tools.utils import argparse_dir_not_parent | |||
from tools.utils import NoValidToolchainException | |||
from tools.utils import print_end_warnings | |||
from tools.psa import generate_psa_sources, clean_psa_autogen | |||
from tools.resources import OsAndSpeResourceFilter |
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.
@jainvikas8 Do we still need OsAndSpeResourceFilter
?
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.
I'm not sure about this, as the main objective is to not make drastic changes to the offline build system and only remove auto-generation of header files.
source_dirs=options.source_dir, | ||
ignore_paths=[options.build_dir] | ||
) | ||
|
||
resource_filter = None | ||
if target.is_PSA_secure_target: |
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.
PSA secure target is built by tools/psa/release.py
. Can we remove this?
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.
Same comment as #11685 (comment)
source_dirs=options.source_dir, | ||
ignore_paths=[options.build_dir] | ||
) | ||
|
||
resource_filter = None | ||
if target.is_PSA_secure_target: |
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.
PSA secure target is built by tools/psa/release.py
right. Can we remove this?
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.
Same comment as #11685 (comment)
generate_psa_sources(source_dirs=options.source_dir, | ||
ignore_paths=[] | ||
) | ||
|
||
resource_filter = None | ||
if target.is_PSA_secure_target: |
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.
PSA secure target is built by tools/psa/release.py
right. Can we remove this?
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.
Same comment as #11685 (comment)
@@ -244,12 +240,6 @@ def main(): | |||
if target.is_PSA_secure_target: |
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.
Will mbed test
be run on secure targets? If not then can we remove this?
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.
@jainvikas8 The |
Thank you for adding the comment about offline. I've no further objections. |
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.
LGTM
@jainvikas8 Can you update your first comment based on the latest PR template (it should specify PR type) - to be certain about the release version. |
Started CI |
@0xc0170 I'm looking to resolve this above comment, so there will be tool/psa/release.py changes when any secure target is built, it will freshly generate those PSA autogenerate files as part of new mbed-os-release. This would save us time to maintain these files. |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
To support online compiler build for PSA targets, some files are auto-generated (LPC55S69_NS and ARM_MUSCA_A1_NS) by the script from offline build system. Since these files are identical for these V8-M targets it would be good to check them in to support online compiler as they are COMPONENT_SPE and services related. In folder: components/TARGET_PSA/ --TARGET_MBED_SPM --COMPONENT_SPE psa_setup.c --TARGET_TFM --COMPONENT_SPE --inc tfm_partition_defs.inc tfm_partition_list.inc tfm_service_list.inc tfm_spm_signal_defs.h --services --inc autogen_sid.h mbed_spm_partitions.h Signed-off-by: Vikas Katariya <[email protected]>
Only generate PSA headers/source related to components and services when Secure build is initiated during compile time of PSA targets. Let the Non-secure build rely on the checked-in files already present. Signed-off-by: Vikas Katariya <[email protected]>
Since the offline build is made to auto-generate PSA related components and services for Secure targets, we can change the output directory to update the files in the respective locations. TARGET_PSA --TARGET_MBED_SPM --COMPONENT_SPE psa_setup.c --TARGET_TFM --COMPONENT_SPE --inc tfm_partition_defs.inc tfm_partition_list.inc tfm_service_list.inc tfm_spm_signal_defs.h --services --inc autogen_sid.h mbed_spm_partitions.h The release script is been modified to commit these files if there are any changes detected when `--commit` argument is passed. Cleaning of auto-generated is been removed as it uses the main directory for its operations, but PSA auto-generation will work if any of the service and application-based manifests are updated. Signed-off-by: Vikas Katariya <[email protected]>
Signed-off-by: Vikas Katariya <[email protected]>
56ef8f3
to
cdb5ebd
Compare
@0xc0170 Please, can you start the CI. Thanks. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
This PR is to add support for an online compiler which is currently failing LPC55S69 (PSA target).
Support the online compiler build for PSA targets, some files are auto-generated (LPC55S69_NS and ARM_MUSCA_A1_NS) by the script from the offline build system. Since these files are identical for these V8-M targets it would be good to check them in to support online compiler as they are COMPONENT_SPE and services related.
Offline build system only for PSA related targets will be affected, as the files are checked in, it will use those files instead of auto-generating them.