OP-TEE / build

Makefiles to use OP-TEE on various platforms
106 stars 209 forks source link

toolchain.mk: Add support for Rust toolchain for aarch{32/64} #725

Closed b49020 closed 5 months ago

b49020 commented 5 months ago

Rather than invoking custom setup.sh script provided by OP-TEE Rust SDK, add Rust toolchain installation support as part of toolchain Makefile. This allows to separate OP-TEE specific Rust toolchain installation from default Rust toolchain installation. Now all OP-TEE specific Rust toolchains will be installed under: $(ROOT)/toolchains/rust/.

b49020 commented 5 months ago

@DemesneGH fyi..

jforissier commented 5 months ago

@jbech-linaro I believe IBART needs to have "make toolchains" run again.

b49020 commented 5 months ago

@jbech-linaro I believe IBART needs to have "make toolchains" run again.

Yeah that will fix the build error. BTW, shouldn't we run make toolchains by default in the CI? It will be a no-op if the toolchains are already present.

b49020 commented 5 months ago

Addressed comments and tag applied.

jbech-linaro commented 5 months ago

@jbech-linaro I believe IBART needs to have "make toolchains" run again.

Will fix!

Yeah that will fix the build error. BTW, shouldn't we run make toolchains by default in the CI? It will be a no-op if the toolchains are already present.

In theory yes, in practice no, since it's a slow operation and it rarely changes. I.e., I'd rather update that manually once a year or so, than having a few extra minutes added to every pull request.

jforissier commented 5 months ago

For "toolchain.mk: Add *-toolchain suffix to targets":

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

b49020 commented 5 months ago

Tag applied, thanks.

jforissier commented 5 months ago

@jbech-linaro I believe IBART needs to have "make toolchains" run again.

Will fix!

Yeah that will fix the build error. BTW, shouldn't we run make toolchains by default in the CI? It will be a no-op if the toolchains are already present.

In theory yes, in practice no, since it's a slow operation and it rarely changes. I.e., I'd rather update that manually once a year or so, than having a few extra minutes added to every pull request.

If you run make toolchains from the same directory every time, then it would not take any time at all because the files exist already. For example on my laptop:

build$ time make -j3 toolchains
[...]
real    1m19.484s
user    0m31.974s
sys     0m9.434s
build$ time make -j3 toolchains

real    0m0.056s
user    0m0.036s
sys     0m0.008s
jbech-linaro commented 5 months ago

If you run make toolchains from the same directory every time,

I always start from a completely clean folder and symlink to my toolchain folder, but I could of course start by adding the symlink and adding then run make toolchains to the flow. After seeing what's happening when running make toolchains with the rust patches, maybe I have to revise my comment above. It's seems like there was a lot going on when it was cloning the rust stuff. I.e., it's not just a compressed file as the other toolchains, so perhaps different packages for rust gets updated more frequently. I'll make some test and changes. In any case, the rust toolchain is in place now and I've restarted the build for this PR.

b49020 commented 5 months ago

Update

DemesneGH commented 5 months ago

Acked-by: Yuan Zhuang <yuanz@apache.org>

b49020 commented 5 months ago

Tags applied, thanks.