DemesneGH commented on code in PR #81:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/81#discussion_r882256171


##########
README.md:
##########
@@ -7,230 +7,205 @@
 Teaclave TrustZone SDK (Rust OP-TEE TrustZone SDK) provides abilities to build
 safe TrustZone applications in Rust. The SDK is based on the
 [OP-TEE](https://www.op-tee.org/) project which follows
-[GlobalPlatform](https://globalplatform.org/) TEE specifications and provides
-ergonomic APIs. In addition, it enables capability to write TrustZone
-applications with Rust's standard library and many third-party libraries (i.e.,
-crates). Teaclave TrustZone SDK is a sub-project of [Apache Teaclave
-(incubating)](https://teaclave.apache.org/).
-
-## Getting started
-
-### Quick start with the OP-TEE Repo for QEMUv8
+[GlobalPlatform](https://globalplatform.org/) [TEE
+specifications](https://globalplatform.org/specs-library/tee-internal-core-api-specification/)
+and provides ergonomic APIs. In addition, it enables the capability to write
+TrustZone applications with Rust's standard library (std) and many third-party
+libraries (i.e., crates). Teaclave TrustZone SDK is a sub-project of [Apache
+Teaclave (incubating)](https://teaclave.apache.org/).
+
+## Table of Contents
+
+- [Quick start with the OP-TEE Repo for 
QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8)
+- [Getting started](#getting-started)
+  - [Environment](#environment)
+    - [Develop with QEMUv8](#develop-with-qemuv8)
+    - [Develop on other platforms](#develop-on-other-platforms)
+  - [Build & Install](#build--install)
+  - [Run Rust Applications](#run-rust-applications)
+    - [Run Rust Applications in QEMUv8](#run-rust-applications-in-qemuv8)
+    - [Run Rust Applications on other 
platforms](#run-rust-applications-on-other-platforms)
+- [Documentation](#documentation)
+- [Publication](#publication)
+- [Contributing](#contributing)
+- [Community](#community)
+
+## Quick start with the OP-TEE Repo for QEMUv8
 
 Teaclave TrustZone SDK has been integrated into the OP-TEE Repo since OP-TEE
 Release 3.15.0 (18/Oct/21). The aarch64 Rust examples are built and installed
 into OP-TEE's default filesystem for QEMUv8. Follow [this
 
documentation](https://optee.readthedocs.io/en/latest/building/optee_with_rust.html)
 to set up the OP-TEE repo and try the Rust examples!
 
-### Develop your trusted applications in Rust
+## Getting started
+
+### Environment
+
+To get started with Teaclave TrustZone SDK, you could choose either [QEMU for
+Armv8-A](#develop-with-qemuv8) (QEMUv8) or [other
+platforms](#develop-on-other-platforms) ([platforms OP-TEE
+supported](https://optee.readthedocs.io/en/latest/general/platforms.html)) as
+your development environment.
+
+#### Develop with QEMUv8
 
 The OP-TEE libraries are needed when building Rust applications, so you should
-finish the `Quick start with the OP-TEE Repo for QEMUv8` part first. Then
+finish the [Quick start with the OP-TEE Repo for 
QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8) part first. Then
 initialize the building environment in Teaclave TrustZone SDK, build Rust
 applications and copy them into the target's filesystem.
 
-#### 1. Update the project 
-
-Teaclave TrustZone SDK is located in `YOUR_OPTEE_DIR/optee_rust/`.Teaclave
+Teaclave TrustZone SDK is located in `[YOUR_OPTEE_DIR]/optee_rust/`. Teaclave
 TrustZone SDK in OP-TEE repo is pinned to the release version. Alternatively,
 you can try the develop version using `git pull`:
 
-```
-$ cd [YOUR_OPTEE_DIR]/optee_rust/
-$ git pull github master
-```
-
-#### 2. Install Rust environment and initialize related submodules
-
-* Set the OP-TEE root directory:
-
-``` sh
-$ export OPTEE_DIR=[YOUR_OPTEE_DIR]
+```sh
+cd [YOUR_OPTEE_DIR]/optee_rust/
+git pull github master
 ```
 
-* Run the script as follows to install Rust environment and initialize
-  submodules:
+#### Develop on other platforms
 
-```
-$ ./setup.sh
-```
-
-#### 3. Set environment variables
+If you are building trusted applications for other platforms ([platforms OP-TEE
+supported](https://optee.readthedocs.io/en/latest/general/platforms.html)). 
QEMU
+and the filesystem in the OP-TEE repo are not needed.  You can follow these
+steps to clone the project and build applications independently from the
+complete OP-TEE repo. In this case, the necessary OP-TEE libraries are
+initialized in the setup process.
 
-Before building examples, the environment should be properly setup.
+The complete list of prerequisites can be found here: [OP-TEE
+Prerequisites](https://optee.readthedocs.io/en/latest/building/prerequisites.html).
 
 ``` sh
-$ source environment
-```
-
-By default, the target platform is `aarch64`. If you want to build for the 
`arm`
-target, you can setup `ARCH` before `source environment`:
-
-```sh
-$ export ARCH=arm
-$ source environment
+# install dependencies
+sudo apt-get install android-tools-adb android-tools-fastboot autoconf \
+  automake bc bison build-essential ccache cscope curl device-tree-compiler \
+  expect flex ftp-upload gdisk iasl libattr1-dev libc6:i386 libcap-dev \
+  libfdt-dev libftdi-dev libglib2.0-dev libhidapi-dev libncurses5-dev \
+  libpixman-1-dev libssl-dev libstdc++6:i386 libtool libz1:i386 make \
+  mtools netcat python-crypto python3-crypto python-pyelftools \
+  python3-pycryptodome python3-pyelftools python-serial python3-serial \
+  rsync unzip uuid-dev xdg-utils xterm xz-utils zlib1g-dev
 ```
 
-#### 4. Build Rust applications
-
-Before building built-in rust examples, you need to build OP-TEE libraries 
using:
-
-``` sh
-$ make optee
-```
+Alternatively, you can use a docker container built with our
+[Dockerfile](Dockerfile).
 
-Run this command to build all Rust examples:
+After installing dependencies or building the Docker image, fetch the source 
code from the official GitHub repository:
 
 ``` sh
-$ make examples
+# clone the project
+git clone https://github.com/apache/incubator-teaclave-trustzone-sdk.git
+cd incubator-teaclave-trustzone-sdk
 ```
 
-Or build your own CA and TA:
+### Build & Install
 
-```
-$ make -C examples/[YOUR_APPLICATION]
-```
+To build the project, the Rust environment and several related submodules are 
required.
 
-#### 5. Run Rust applications
+If you are working without QEMUv8, by default, the `OPTEE_DIR` is

Review Comment:
   Suggest removing "If you are working without QEMUv8".
   
   -> By default, xxxxxxx



##########
README.md:
##########
@@ -7,230 +7,212 @@
 Teaclave TrustZone SDK (Rust OP-TEE TrustZone SDK) provides abilities to build
 safe TrustZone applications in Rust. The SDK is based on the
 [OP-TEE](https://www.op-tee.org/) project which follows
-[GlobalPlatform](https://globalplatform.org/) TEE specifications and provides
-ergonomic APIs. In addition, it enables capability to write TrustZone
-applications with Rust's standard library and many third-party libraries (i.e.,
-crates). Teaclave TrustZone SDK is a sub-project of [Apache Teaclave
-(incubating)](https://teaclave.apache.org/).
-
-## Getting started
-
-### Quick start with the OP-TEE Repo for QEMUv8
+[GlobalPlatform](https://globalplatform.org/) [TEE
+specifications](https://globalplatform.org/specs-library/tee-internal-core-api-specification/)
+and provides ergonomic APIs. In addition, it enables the capability to write
+TrustZone applications with Rust's standard library (std) and many third-party
+libraries (i.e., crates). Teaclave TrustZone SDK is a sub-project of [Apache
+Teaclave (incubating)](https://teaclave.apache.org/).
+
+## Table of Contents
+
+- [Quick start with the OP-TEE Repo for 
QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8)
+- [Getting started](#getting-started)
+  - [Environment](#environment)
+    - [Develop with QEMUv8](#develop-with-qemuv8)
+    - [Develop on other platforms](#develop-on-other-platforms)
+  - [Build & Install](#build--install)
+  - [Run Rust Applications](#run-rust-applications)
+    - [Run Rust Applications in QEMUv8](#run-rust-applications-in-qemuv8)
+    - [Run Rust Applications on other 
platforms](#run-rust-applications-on-other-platforms)
+- [Documentation](#documentation)
+- [Publication](#publication)
+- [Contributing](#contributing)
+- [Community](#community)
+
+## Quick start with the OP-TEE Repo for QEMUv8
 
 Teaclave TrustZone SDK has been integrated into the OP-TEE Repo since OP-TEE
 Release 3.15.0 (18/Oct/21). The aarch64 Rust examples are built and installed
 into OP-TEE's default filesystem for QEMUv8. Follow [this
 
documentation](https://optee.readthedocs.io/en/latest/building/optee_with_rust.html)
 to set up the OP-TEE repo and try the Rust examples!
 
-### Develop your trusted applications in Rust
+## Getting started
+
+### Environment
+
+To get started with Teaclave TrustZone SDK, you could choose either [QEMU for
+Armv8-A](#develop-with-qemuv8) (QEMUv8) or [other
+platforms](#develop-on-other-platforms) ([platforms OP-TEE
+supported](https://optee.readthedocs.io/en/latest/general/platforms.html)) as
+your development environment.
+
+#### Develop with QEMUv8
 
 The OP-TEE libraries are needed when building Rust applications, so you should
-finish the `Quick start with the OP-TEE Repo for QEMUv8` part first. Then
+finish the [Quick start with the OP-TEE Repo for
+QEMUv8](#quick-start-with-the-op-tee-repo-for-qemuv8) part first. Then
 initialize the building environment in Teaclave TrustZone SDK, build Rust
 applications and copy them into the target's filesystem.
 
-#### 1. Update the project 
-
-Teaclave TrustZone SDK is located in `YOUR_OPTEE_DIR/optee_rust/`.Teaclave
+Teaclave TrustZone SDK is located in `[YOUR_OPTEE_DIR]/optee_rust/`. Teaclave
 TrustZone SDK in OP-TEE repo is pinned to the release version. Alternatively,
 you can try the develop version using `git pull`:
 
-```
-$ cd [YOUR_OPTEE_DIR]/optee_rust/
-$ git pull github master
-```
-
-#### 2. Install Rust environment and initialize related submodules
-
-* Set the OP-TEE root directory:
-
-``` sh
-$ export OPTEE_DIR=[YOUR_OPTEE_DIR]
+```sh
+cd [YOUR_OPTEE_DIR]/optee_rust/
+git pull github master
 ```
 
-* Run the script as follows to install Rust environment and initialize
-  submodules:
+#### Develop on other platforms
 
-```
-$ ./setup.sh
-```
-
-#### 3. Set environment variables
+If you are building trusted applications for other platforms ([platforms OP-TEE
+supported](https://optee.readthedocs.io/en/latest/general/platforms.html)). 
QEMU
+and the filesystem in the OP-TEE repo are not needed.  You can follow these
+steps to clone the project and build applications independently from the
+complete OP-TEE repo. In this case, the necessary OP-TEE libraries are
+initialized in the setup process.
 
-Before building examples, the environment should be properly setup.
+1. The complete list of prerequisites can be found here: [OP-TEE
+Prerequisites](https://optee.readthedocs.io/en/latest/building/prerequisites.html).
 
 ``` sh
-$ source environment
-```
-
-By default, the target platform is `aarch64`. If you want to build for the 
`arm`
-target, you can setup `ARCH` before `source environment`:
-
-```sh
-$ export ARCH=arm
-$ source environment
+# install dependencies
+sudo apt-get install android-tools-adb android-tools-fastboot autoconf \
+  automake bc bison build-essential ccache cscope curl device-tree-compiler \
+  expect flex ftp-upload gdisk iasl libattr1-dev libc6:i386 libcap-dev \
+  libfdt-dev libftdi-dev libglib2.0-dev libhidapi-dev libncurses5-dev \
+  libpixman-1-dev libssl-dev libstdc++6:i386 libtool libz1:i386 make \
+  mtools netcat python-crypto python3-crypto python-pyelftools \
+  python3-pycryptodome python3-pyelftools python-serial python3-serial \
+  rsync unzip uuid-dev xdg-utils xterm xz-utils zlib1g-dev
 ```
 
-#### 4. Build Rust applications
-
-Before building built-in rust examples, you need to build OP-TEE libraries 
using:
-
-``` sh
-$ make optee
-```
+Alternatively, you can use a docker container built with our
+[Dockerfile](Dockerfile).
 
-Run this command to build all Rust examples:
+2. After installing dependencies or building the Docker image, fetch the 
source code from the official GitHub repository:

Review Comment:
   rewrap this line



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to