From badaa1f6a7a910e9dc62c9a53af0997182261ecf Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 27 Jul 2023 06:34:54 +0200 Subject: boards: siemens: iot2050: Unify PG1 and PG2/M.2 configurations again This avoids having to maintain to defconfigs that are 99% equivalent. The approach is to use binman to generate two flash images, flash-pg1.bin and flash-pg2.bin. With the help of a template dtsi, we can avoid duplicating the common binman image definitions. Suggested-by: Andrew Davis Reviewed-by: Simon Glass Signed-off-by: Jan Kiszka --- doc/board/siemens/iot2050.rst | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/board/siemens/iot2050.rst b/doc/board/siemens/iot2050.rst index 074d6aa15a..0df11a950a 100644 --- a/doc/board/siemens/iot2050.rst +++ b/doc/board/siemens/iot2050.rst @@ -68,15 +68,14 @@ U-Boot: $ export ATF=/path/to/bl31.bin $ export TEE=/path/to/tee-pager_v2.bin - - # configure for PG1 - $ make iot2050_pg1_defconfig - - # or configure for PG2 or the M.2 variant - $ make iot2050_pg2_defconfig + $ make iot2050_defconfig $ make +This will generate two different flash images: flash-p1.bin that targets the +first generation of IOT2050 devices and flash-pg2.bin that runs on PG2 +including M.2 devices. + Flashing -------- @@ -85,20 +84,20 @@ Via U-Boot: .. code-block:: text IOT2050> sf probe - IOT2050> load mmc 0:1 $loadaddr /path/to/flash.bin + IOT2050> load mmc 0:1 $loadaddr /path/to/flash-pgX.bin IOT2050> sf update $loadaddr 0x0 $filesize Via external programmer Dediprog SF100 or SF600: .. code-block:: text - $ dpcmd --vcc 2 -v -u flash.bin + $ dpcmd --vcc 2 -v -u flash-pgX.bin Signing (optional) ------------------ To enable verified boot for the firmware artifacts after the Siemens-managed -first-stage loader (seboot_pg*.bin), the following steps need to be taken +first-stage loader (seboot_pgX.bin), the following steps need to be taken before and after the build: Generate dtsi holding the public key @@ -131,8 +130,8 @@ Build U-Boot See related section above. -Sign flash.bin -^^^^^^^^^^^^^^ +Sign flash-pgX.bin +^^^^^^^^^^^^^^^^^^ In the build folder still containing artifacts from step 3, invoke: @@ -140,10 +139,10 @@ In the build folder still containing artifacts from step 3, invoke: tools/iot2050-sign-fw.sh /path/to/key.pem -Flash signed flash.bin -^^^^^^^^^^^^^^^^^^^^^^ +Flash signed flash-pgX.bin +^^^^^^^^^^^^^^^^^^^^^^^^^^ -The signing has happen in-place in flash.bin, thus the flashing procedure +The signing has happen in-place in flash-pgX.bin, thus the flashing procedure described above. M.2 slot configuration -- cgit v1.2.3 From 4e0b8238eea83b71713230e67e781111ea897035 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 27 Jul 2023 06:34:55 +0200 Subject: doc: board: siemens: iot2050: Update build env vars ATF is now called BL31, and OP-TEE since 3.21 suggests to use tee-raw.bin instead of (the still identical) tee-pager_v2.bin. Signed-off-by: Jan Kiszka --- doc/board/siemens/iot2050.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/board/siemens/iot2050.rst b/doc/board/siemens/iot2050.rst index 0df11a950a..ee3c5c9584 100644 --- a/doc/board/siemens/iot2050.rst +++ b/doc/board/siemens/iot2050.rst @@ -66,8 +66,8 @@ U-Boot: .. code-block:: text - $ export ATF=/path/to/bl31.bin - $ export TEE=/path/to/tee-pager_v2.bin + $ export BL31=/path/to/bl31.bin + $ export TEE=/path/to/tee-raw.bin $ make iot2050_defconfig $ make -- cgit v1.2.3