README.HOW_TO.txt: add info in README.HOW_TO.txt

Update files to introduce starter package update instructions

Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com>
Change-Id: I4a594dcd2e72fcf0e05e80599910071a71f8e7cc
This commit is contained in:
Romuald JEANNE authored and bernard PUEL committed 2022-11-17 17:19:20 +01:00
1 parent 2c5b00314f
commit 105bb0e41b
5 files changed
+132 -64

No files matched your search

@@ -5,6 +5,7 @@ Compilation of Optee-os (Trusted Execution Environment):
4. Manage optee-os source code
5. Compile optee-os source code
6. Update software on board
7. Update starter package with optee-os compilation outputs
----------------
1. Pre-requisite
@@ -32,7 +33,7 @@ Warning: the environment are valid only on the shell session where you have
3. Prepare optee-os source
--------------------------
If not already done, extract the sources from Developer Package tarball, for example:
$ tar xfJ en.SOURCES-stm32mp1-*.tar.xz
$ tar xf en.SOURCES-stm32mp1-*.tar.xz
In the optee-os source directory (sources/*/##BP##-##PR##),
you have one optee-os source tarball, the patches and one Makefile:
@@ -48,7 +49,7 @@ tarball now and apply the patch:
$> tar xf ##BP##-##PR##.tar.xz
$> cd ##BP##
$> tar xfz ../fonts.tar.gz
$> tar xf ../fonts.tar.gz
$> for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
You can now move to section 5 [Compile optee-os source code].
@@ -70,10 +71,11 @@ you have 3 solutions to use git
4.2 Create Git from tarball
---------------------------
$ cd <optee-os source>
$ tar xf ##BP##-##PR##.tar.xz
$ cd ##BP##
$ test -d .git || git init . && git add . && git commit -m "optee-os source code" && git gc
$ git checkout -b WORKING
$ tar xfz ../fonts.tar.gz
$ tar xf ../fonts.tar.gz
$ for p in `ls -1 ../*.patch`; do git am $p; done
MANDATORY: You must update sources
@@ -90,7 +92,7 @@ MANDATORY: You must update sources
$ git clone git://github.com/OP-TEE/optee_os.git
$ cd optee_os
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
$ tar xfz <path to patch>/fonts.tar.gz
$ tar xf <path to patch>/fonts.tar.gz
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
MANDATORY: You must update sources
@@ -104,24 +106,35 @@ Since OpenSTLinux activates FIP by default, FIP_artifacts directory path must be
- In case of using SOURCES-xxxx.tar.gz of Developer package the FIP_DEPLOYDIR_ROOT must be set as below:
$> export FIP_DEPLOYDIR_ROOT=$PWD/../../FIP_artifacts
To compile optee-os source code with default embedded config:
$> make -f $PWD/../Makefile.sdk all
You can check the configuration throught 'help' target:
$ make -f $PWD/../Makefile.sdk help
To compile only one of the provided devicetree:
$ make -f $PWD/../Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=stm32mp157f-ev1 all
For a specific devicetree file you need to force not only the devicetree but also the DRAM size settings:
$ make -f $PWD/../Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=<your_devicetree> OPTEE_DRAMSIZE=<dram_size_value_in_hexadecimal> all
By default, the build results for this component are available in $PWD/../deploy directory.
If needed, this deploy directory can be specified by added "DEPLOYDIR=<your_deploy_dir_path>" compilation option to the build command line above.
In case DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/optee it overwrites files directly in FIP artifacts directory.
The build results for this component are available in DEPLOYDIR (Default: $PWD/../deploy).
If needed, this deploy directory can be specified by adding "DEPLOYDIR=<your_deploy_dir_path>" compilation option to the build command line below.
The generated FIP images are available in $FIP_DEPLOYDIR_ROOT/fip
To list optee-os source code compilation configurations:
$ make -f $PWD/../Makefile.sdk help
To compile optee-os source code:
$ make -f $PWD/../Makefile.sdk all
To compile optee-os source code for a specific config:
$ make -f $PWD/../Makefile.sdk CFG_EMBED_DTB_SOURCE_FILE=stm32mp157c-ev1 all
To compile optee-os source code and overwrite the default FIP artifacts with built artifacts:
$> make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/optee all
---------------------------
6. Update software on board
---------------------------
Please use STM32CubeProgrammer and only tick the ssbl-boot and fip partitions (more informations on the wiki website http://wiki.st.com/stm32mpu)
---------------------------
7. Update Starter Package with optee-os compilation outputs
---------------------------
If not already done, extract the artifacts from Starter Package tarball, for example:
# tar xf en.FLASH-stm32mp1-*.tar.xz
Move to Starter Package root folder,
#> cd <your_starter_package_dir_path>
Cleanup Starter Package from original optee-os artifacts first
#> rm -rf images/stm32mp1/fip/*
Update Starter Package with new fip artifacts from <FIP_DEPLOYDIR_ROOT>/fip folder:
#> cp -rvf $FIP_DEPLOYDIR_ROOT/fip/* images/stm32mp1/fip/
Then the new Starter Package is ready to use for "Image flashing" on board (more information on wiki website https://wiki.st.com/stm32mpu).