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 2022-11-02 12:31:44 +01:00 committed by bernard PUEL
parent 2c5b00314f
commit 105bb0e41b
5 changed files with 132 additions and 64 deletions

View File

@ -2,6 +2,7 @@ Compilation of the gcnano kernel module:
1. Pre-requisite
2. Compile the gcnano kernel module
3. Update software on board
4. Update Starter Package with gcnano kernel module compilation outputs
----------------
1. Pre-requisite
@ -37,3 +38,19 @@ OpenSTLinux SDK must be installed.
$ ssh root@<ip of board> sync
Reboot the board in order to take update into account
$ ssh root@<ip of board> reboot
---------------------------
4. Update Starter Package with gcnano kernel module compilation outputs
---------------------------
<-- Section under construction -->
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 gcnano kernel module artifacts first
#> echo "*** Section under construction ***"
<-- Section under construction -->

View File

@ -5,6 +5,7 @@ Compilation of TF-A (Trusted Firmware-A):
4. Manage TF-A source code with GIT
5. Compile TF-A source code
6. Update software on board
7. Update starter package with TF-A compilation outputs
----------------
1. Pre-requisite
@ -37,7 +38,7 @@ sourced the sdk environment.
3. Prepare TF-A 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 TF-A source directory (sources/*/##BP##-##PR##),
you have one TF-A source tarball, the patches and one Makefile:
@ -74,7 +75,8 @@ have 3 solutions to use git:
4.2 Create Git from tarball
---------------------------
$ cd <directory to tf-a source code>
$ tar xf ##BP##-##PR##.tar.xz
$ cd ##BP##
$ test -d .git || git init . && git add . && git commit -m "tf-a source code" && git gc
$ git checkout -b WORKING
$ for p in `ls -1 ../*.patch`; do git am $p; done
@ -97,21 +99,40 @@ 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 TF-A source code
$> make -f $PWD/../Makefile.sdk all
or for a specific config :
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 TF-A source code compilation configurations:
$ make -f $PWD/../Makefile.sdk help
To compile TF-A source code:
$ make -f $PWD/../Makefile.sdk all
To compile TF-A source code for a specific config:
$ make -f $PWD/../Makefile.sdk TF_A_DEVICETREE=stm32mp157c-ev1 TF_A_CONFIG=trusted ELF_DEBUG_ENABLE='1' all
NB: TF_A_DEVICETREE flag must be set to switch to correct board configuration.
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/arm-trusted-firmware it overwrites files directly in FIP artifacts directory.
The generated FIP images are available in $FIP_DEPLOYDIR_ROOT/fip
To compile TF-A source code and overwrite the default FIP artifacts with built artifacts:
$> make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware all
---------------------------
6. Update software on board
---------------------------
Please use STM32CubeProgrammer then only tick the boot partitions means patitions 0x1 to 0x6 (more informations on the wiki website http://wiki.st.com/stm32mpu)
Please use STM32CubeProgrammer to update the boot partitions, find more informations on the wiki website https://wiki.st.com/stm32mpu
---------------------------
7. Update Starter Package with TF-A 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 TF-A artifacts first
#> rm -rf images/stm32mp1/arm-trusted-firmware/*
#> rm -rf images/stm32mp1/fip/*
Update Starter Package with new FSBL binaries from <DEPLOYDIR> folder
#> DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/arm-trusted-firmware && cp -rvf $DEPLOYDIR/* images/stm32mp1/arm-trusted-firmware/
NB: if <DEPLOYDIR> has not been overide at compilation step, use default path: <tf-a source code folder>/../deploy
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).

View File

@ -5,6 +5,7 @@ Compilation of U-Boot:
4. Manage of U-Boot source code with GIT
5. Compile U-Boot source code
6. Update software on board
7. Update starter package with U-Boot compilation outputs
----------------
1. Pre-requisite
@ -40,7 +41,7 @@ Warning: the environment are valid only on the shell session where you have
3. Prepare U-Boot 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 U-Boot source directory (sources/*/##BP##-##PR##),
you have one U-Boot source tarball, the patches and one Makefile:
@ -137,41 +138,42 @@ To compile U-Boot source code, first move to U-Boot source:
5.2 Compilation for several targets: use Makefile.sdk (with FIP)
----------------------------------------------------------------
Calls the specific 'Makefile.sdk' provided to compile U-Boot:
- Display 'Makefile.sdk' file default configuration and targets:
$ make -f $PWD/../Makefile.sdk help
Since OpenSTLinux activates FIP by default, FIP_artifacts directory path must be specified before launching compilation
- 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
- Compile default U-Boot configuration:
$> make -f $PWD/../Makefile.sdk all
Default U-Boot configuration is done in 'Makefile.sdk' file through specific variables
'BOOT_CONFIG', 'UBOOT_DEFCONFIG', 'UBOOT_BINARY' and 'UBOOT_DEVICETREE':
- 'UBOOT_CONFIG' is the name to append to U-boot binaries (ex: 'trusted', etc).
ex: UBOOT_CONFIG=trusted
- 'UBOOT_DEFCONFIG' is the name of U-Boot defconfig to build
ex: UBOOT_DEFCONFIG=stm32mp15_trusted_defconfig
- 'UBOOT_BINARY' is the U-Boot binary to export (ex: 'u-boot.dtb', 'u-boot.img', etc)
ex: UBOOT_BINARY=u-boot.dtb
- 'UBOOT_DEVICETREE' is a list of device tree to build, using 'space' as separator.
ex: UBOOT_DEVICETREE="<devicetree1> <devicetree2>"
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/u-boot 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
You can override the default U-Boot configuration if you specify these variables:
To list U-Boot source code compilation configurations:
$ make -f $PWD/../Makefile.sdk help
To compile U-Boot source code:
$ make -f $PWD/../Makefile.sdk all
To compile U-Boot source code for a specific config:
- Compile default U-Boot configuration but applying specific devicetree(s):
$ make -f $PWD/../Makefile.sdk all DEVICETREE="<devicetree1> <devicetree2>"
$ make -f $PWD/../Makefile.sdk DEVICETREE="<devicetree1> <devicetree2>" all
- Compile for a specific U-Boot configuration:
$ make -f $PWD/../Makefile.sdk all UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_trusted_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157f-dk2
$ make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157f-dk2 all
To compile U-Boot source code and overwrite the default FIP artifacts with built artifacts:
$> make -f $PWD/../Makefile.sdk DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/u-boot all
---------------------------
6. Update software on board
---------------------------
Please use STM32CubeProgrammer and only tick the ssbl-boot and fip partition (more informations on the wiki website http://wiki.st.com/stm32mpu)
---------------------------
7. Update Starter Package with U-Boot 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 U-Boot 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).

View File

@ -6,6 +6,7 @@ Compilation of kernel:
5. Configure kernel source code
6. Compile kernel source code
7. Update software on board
8. Update Starter Package with kernel compilation outputs
----------------
1. Pre-requisite
@ -51,7 +52,7 @@ sourced the SDK environment.
3. Prepare kernel 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 kernel source directory (sources/*/##BP##-##PR##),
you have one kernel source tarball, the patches and one Makefile:
@ -65,7 +66,7 @@ to section 4 [Management of kernel source code with GIT].
Otherwise, to manage kernel source code without git, you must extract the
tarball now and apply the patch:
$> tar xfJ ##LINUX_TARNAME##.tar.xz
$> tar xf ##LINUX_TARNAME##.tar.xz
$> cd ##LINUX_TARNAME##
$> for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
@ -227,8 +228,8 @@ inside the dedicated build directory).
$ cp $PWD/arch/arm/boot/dts/st*.dtb $PWD/install_artifact/boot/
Generated files are :
#> $PWD/install_artifact/boot/uImage
#> $PWD/install_artifact/boot/<stm32-boards>.dtb
- $PWD/install_artifact/boot/uImage
- $PWD/install_artifact/boot/<stm32-boards>.dtb
---------------------------
7. Update software on board
@ -355,8 +356,7 @@ For USB Disk: ums 0 usb 0
Reboot the board in order to take update into account
$on board> reboot
---------------------
8. Useful information
7.5 Useful information
---------------------
* How to re-generate kernel database on board:
$on board> depmod -a
@ -377,3 +377,18 @@ intree: Y
name: led_class_flash
vermagic: 5.4.31 SMP preempt mod_unload modversions ARMv7 p2v8
---------------------------
8. Update Starter Package with kernel compilation outputs
---------------------------
<-- Section under construction -->
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 kernel artifacts first
#> echo "*** Section under construction ***"
<-- Section under construction -->

View File

@ -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).