DemesneGH commented on issue #189:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/189#issuecomment-2892816205

   Thanks for the proposal!
   
   Since this Docker image is primarily used for cross-compilation, most 
dependencies are shared across architectures and configurations. To reduce 
maintenance overhead, how about using a **single image** and passing 
configuration via environment variables at runtime?
   
   For example:
   
   ```bash
   git clone https://github.com/apache/incubator-teaclave-trustzone-sdk.git
   cd incubator-teaclave-trustzone-sdk
   
   docker run -it -v $(pwd):/root/teaclave-sdk \
     -e TA_ARCH=aarch64 \
     -e CA_ARCH=arm \
     -e STD=y \
     -e OPTEE_VER=4.5.0 \
     teaclave-trustzone-sdk-v0.2.0 bash
   ```
   
   A `start.sh` script inside the image can configure the environment based on 
these variables. Once set up, users can simply run:
   
   ```bash
   make examples
   ```
   
   ### On Build vs. Dev Scenarios
   
   We should clarify the goals of **build** and **dev** scenarios. Is the 
following description correct?
   
   * **Build**: Focused on quick start and testing to confirm that the building 
env works and examples compile.
   * **Dev**: Involves writing a new TA, building it, and testing it on QEMU.
   
   If that distinction makes sense, then it's not necessarily something the 
Docker image needs to separate. Instead, we could:
   
   * Provide a script like `quick_testing.sh` for the build/validation scenario
   * Offer developer guidance for the dev/debug workflow, including running 
QEMU and using debug scripts we provided.
   
   ### Other Config Options
   
   * **SDK_VER**: I suggest we encode this in the image tag (e.g., 
`teaclave-trustzone-sdk:v0.2.0`).
   * **PLATFORM**: Since we currently only support `qemu-v8` for dev, we can 
omit this as a runtime option and instead document it. For other hardware, 
developers can use their own `TA_DEV_KIT_DIR` to build, but testing would need 
to happen on their board. It's an advanced topic and  can have some document 
about it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org
For additional commands, e-mail: dev-h...@teaclave.apache.org

Reply via email to