Skip to content
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

Add build framework #282

Merged

Conversation

ionut-arm
Copy link
Member

Adding components for creating an FFI wrapper and protobuf code, a
Cargo feature, and a Docker image.

Signed-off-by: Ionut Mihalcea ionut.mihalcea@arm.com

Adding components for creating an FFI wrapper and protobuf code, a
Cargo feature, and a Docker image.

Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
@ionut-arm ionut-arm added enhancement New feature or request firmware framework Issues related to compatibility with Arm FF-A labels Nov 6, 2020
@ionut-arm ionut-arm requested a review from hug-dev November 6, 2020 10:55
@ionut-arm ionut-arm self-assigned this Nov 6, 2020
Comment on lines +27 to +35
// TODO: Remove once we can use the full TS stack and this isn't needed
println!("cargo:rustc-link-search=native=/usr/lib");
println!("cargo:rustc-link-lib=dylib=c++");

println!("cargo:rustc-link-search=native=/usr/local/lib");
println!("cargo:rustc-link-lib=static=ts-lib");
// TODO: Remove once we can use the full TS stack and this isn't needed
println!("cargo:rustc-link-lib=static=mbedcrypto");
println!("cargo:rustc-link-lib=static=protobuf-nanopb");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need to figure out how to make these more sensible

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think I'll leave them as they are - we'll need to remove them before we properly release this provider anyway so they'll only be used for testing

Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this early work! I know that this is going to change as we go, but I put some comments

@@ -49,6 +49,10 @@ anyhow = "1.0.32"
[dev-dependencies]
rand = { version = "0.7.3", features = ["small_rng"] }

[build-dependencies]
bindgen = "0.54.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has the header a stable ABI? If so, I think it would be better to generate the bindings once and for all to save some compile time and avoid the bindgen dependency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could replace both this and the protobuf stuff with hardcoded dependencies once the whole thing stabilizes - which I'm not sure is guaranteed for a while

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, ok makes sense!

@@ -49,6 +49,10 @@ anyhow = "1.0.32"
[dev-dependencies]
rand = { version = "0.7.3", features = ["small_rng"] }

[build-dependencies]
bindgen = "0.54.0"
prost-build = "0.6.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question here, but maybe protobuf files also have stable ABIs and it's not necessary to generate them everytime?

@@ -58,3 +62,4 @@ mbed-crypto-provider = ["psa-crypto"]
pkcs11-provider = ["pkcs11", "picky-asn1-der", "picky-asn1", "picky-asn1-x509", "psa-crypto", "rand"]
tpm-provider = ["tss-esapi", "picky-asn1-der", "picky-asn1", "picky-asn1-x509", "hex"]
all-providers = ["tpm-provider", "pkcs11-provider", "mbed-crypto-provider"]
trusted-service-provider = ["psa-crypto"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic question: is this trusted service (singular) or trusted serviceS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if I have to call it Trusted Services - to me it makes no sense to call it that because we only use one of them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked Julian, he said it's a bit premature so I might leave as is and come back and change things once things settle.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok I don't really mind. I thought this was like a whole project name as opposed as a particular thing

@ionut-arm ionut-arm merged commit 3dc71dd into parallaxsecond:trusted-service-provider Nov 9, 2020
@ionut-arm ionut-arm deleted the ts-build branch November 9, 2020 14:55
@ionut-arm ionut-arm mentioned this pull request Jan 4, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request firmware framework Issues related to compatibility with Arm FF-A
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants