Jan Kiszka | 8ff2ff8 | 2021-09-18 08:17:53 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. sectionauthor:: Jan Kiszka <jan.kiszka@siemens.com> |
| 3 | |
| 4 | SIMATIC IOT2050 BASIC and ADVANCED |
| 5 | ================================== |
| 6 | |
| 7 | The SIMATIC IOT2050 is an open industrial IoT gateway that is using the TI |
| 8 | AM6528 GP (Basic variant) or the AM6548 HS (Advanced variant). The Advanced |
| 9 | variant is prepared for secure boot. |
| 10 | |
| 11 | The IOT2050 starts only from OSPI. It loads a Siemens-provided bootloader |
| 12 | called SE-Boot for the MCU domain (R5F cores), then hands over to ATF and |
| 13 | OP-TEE, before booting U-Boot on the A53 cores. This describes how to build all |
| 14 | open artifacts into a flashable image for the OSPI flash. The flash image will |
| 15 | work on both variants. |
| 16 | |
| 17 | Dependencies |
| 18 | ------------ |
| 19 | |
| 20 | ATF: Upstream release 2.4 or newer |
| 21 | OP-TEE: Upstream release 3.10.0 or newer |
| 22 | |
| 23 | Binary dependencies can be found in |
| 24 | https://github.com/siemens/meta-iot2050/tree/master/recipes-bsp/u-boot/files/prebuild. |
| 25 | The following binaries from that source need to be present in the build folder: |
| 26 | |
Su Baocheng | 0dcd337 | 2023-02-28 19:19:09 +0100 | [diff] [blame] | 27 | - seboot_pg1.bin |
Su Baocheng | 0dcd337 | 2023-02-28 19:19:09 +0100 | [diff] [blame] | 28 | - seboot_pg2.bin |
Jan Kiszka | 8ff2ff8 | 2021-09-18 08:17:53 +0200 | [diff] [blame] | 29 | |
| 30 | Building |
| 31 | -------- |
| 32 | |
| 33 | Make sure that CROSS_COMPILE is set appropriately: |
| 34 | |
| 35 | .. code-block:: text |
| 36 | |
| 37 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 38 | |
| 39 | ATF: |
| 40 | |
| 41 | .. code-block:: text |
| 42 | |
| 43 | $ make PLAT=k3 SPD=opteed K3_USART=1 |
| 44 | |
| 45 | OP-TEE: |
| 46 | |
| 47 | .. code-block:: text |
| 48 | |
Ivan Mikhaylov | 07bc02a | 2021-11-28 21:57:01 +0000 | [diff] [blame] | 49 | $ make PLATFORM=k3-am65x CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_CONSOLE_UART=1 CFG_USER_TA_TARGETS="ta_arm64" |
Jan Kiszka | 8ff2ff8 | 2021-09-18 08:17:53 +0200 | [diff] [blame] | 50 | |
| 51 | U-Boot: |
| 52 | |
| 53 | .. code-block:: text |
| 54 | |
| 55 | $ export ATF=/path/to/bl31.bin |
| 56 | $ export TEE=/path/to/tee-pager_v2.bin |
Su Baocheng | 0dcd337 | 2023-02-28 19:19:09 +0100 | [diff] [blame] | 57 | |
| 58 | # configure for PG1 |
| 59 | $ make iot2050_pg1_defconfig |
| 60 | |
| 61 | # or configure for PG2 |
| 62 | $ make iot2050_pg2_defconfig |
| 63 | |
Jan Kiszka | 8ff2ff8 | 2021-09-18 08:17:53 +0200 | [diff] [blame] | 64 | $ make |
| 65 | |
| 66 | Flashing |
| 67 | -------- |
| 68 | |
| 69 | Via U-Boot: |
| 70 | |
| 71 | .. code-block:: text |
| 72 | |
| 73 | IOT2050> sf probe |
| 74 | IOT2050> load mmc 0:1 $loadaddr /path/to/flash.bin |
| 75 | IOT2050> sf update $loadaddr 0x0 $filesize |
| 76 | |
| 77 | Via external programmer Dediprog SF100 or SF600: |
| 78 | |
| 79 | .. code-block:: text |
| 80 | |
| 81 | $ dpcmd --vcc 2 -v -u flash.bin |