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 | |
| 27 | - tiboot3.bin |
| 28 | - sysfw.itb |
| 29 | - sysfw.itb_HS |
| 30 | - sysfw_sr2.itb |
| 31 | - sysfw_sr2.itb_HS |
| 32 | |
| 33 | Building |
| 34 | -------- |
| 35 | |
| 36 | Make sure that CROSS_COMPILE is set appropriately: |
| 37 | |
| 38 | .. code-block:: text |
| 39 | |
| 40 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 41 | |
| 42 | ATF: |
| 43 | |
| 44 | .. code-block:: text |
| 45 | |
| 46 | $ make PLAT=k3 SPD=opteed K3_USART=1 |
| 47 | |
| 48 | OP-TEE: |
| 49 | |
| 50 | .. code-block:: text |
| 51 | |
Ivan Mikhaylov | 07bc02a | 2021-11-28 21:57:01 +0000 | [diff] [blame] | 52 | $ 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] | 53 | |
| 54 | U-Boot: |
| 55 | |
| 56 | .. code-block:: text |
| 57 | |
| 58 | $ export ATF=/path/to/bl31.bin |
| 59 | $ export TEE=/path/to/tee-pager_v2.bin |
| 60 | $ make iot2050_defconfig |
| 61 | $ make |
| 62 | |
| 63 | Flashing |
| 64 | -------- |
| 65 | |
| 66 | Via U-Boot: |
| 67 | |
| 68 | .. code-block:: text |
| 69 | |
| 70 | IOT2050> sf probe |
| 71 | IOT2050> load mmc 0:1 $loadaddr /path/to/flash.bin |
| 72 | IOT2050> sf update $loadaddr 0x0 $filesize |
| 73 | |
| 74 | Via external programmer Dediprog SF100 or SF600: |
| 75 | |
| 76 | .. code-block:: text |
| 77 | |
| 78 | $ dpcmd --vcc 2 -v -u flash.bin |