Migration to using binman for bootloader
Subsystems (3)
v3 cover Migration to using binman for bootloader
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.
Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devices
Series intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
Changes in v3:
- added support for HS-FS devices
- added support for AM68-sk
- added back dropped documentation patch
- changed prefix for SYSFW and DM files to expected directory name
- extended test coverage to 100%
- documentation fixes
- corrected formatting changes
Changes in v2:
- removed all external scripts
- created ti-board-config etype to support generation of board config binaries
- created ti-secure and ti-secure-rom etypes to handle signing instead of using external TI_SECURE_DEV_PKG
- updated openssl btool to support x509 certificate generation
- dropped Makefile changes to obtain external binary components, moving to using BINMAN_INDIRS to achieve the same
v1: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
v2: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
Neha Malcom Francis (19):
binman: ti-board-config: Add support for TI board config binaries
binman: ti-secure: Add support for TI signing
ti: sysfw: tiboot3: Add support for packaging sysfw.itb and
tiboot3.bin
j721e: schema: yaml: Add general schema and J721E board config files
j721e: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin,
u-boot.img
j7200: yaml: Add J7200 board config files
j7200: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
am65x: yaml: Add AM65x board config files
am65: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin,
u-boot.img
am64x: yaml: Add board configs for AM64x
am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
j721s2: yaml: Add board configs for J721S2
j721s2: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
am62: yaml: Add board configs for AM62
am625: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
am62a: yaml: Add board configs for AM62ax
am62a: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
k3: tools: config.mk: Update makefile and remove scripts
doc: board: ti: Update documentation for binman flow
arch/arm/dts/k3-am625-r5-sk.dts | 1 + arch/arm/dts/k3-am625-sk-binman.dtsi | 529 +++ arch/arm/dts/k3-am625-sk-u-boot.dtsi | 2 + arch/arm/dts/k3-am62a-sk-binman.dtsi | 528 +++ arch/arm/dts/k3-am62a7-r5-sk.dts | 1 + arch/arm/dts/k3-am62a7-sk.dts | 1 + arch/arm/dts/k3-am642-evm-u-boot.dtsi | 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++ arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 1 + .../dts/k3-am654-r5-base-board-u-boot.dtsi | 1 + arch/arm/dts/k3-am65x-binman.dtsi | 551 ++++ arch/arm/dts/k3-j7200-binman.dtsi | 529 +++ .../k3-j7200-common-proc-board-u-boot.dtsi | 2 + arch/arm/dts/k3-j721e-binman.dtsi | 732 +++++ .../k3-j721e-common-proc-board-u-boot.dtsi | 1 + .../arm/dts/k3-j721e-r5-common-proc-board.dts | 1 + arch/arm/dts/k3-j721s2-binman.dtsi | 613 ++++ .../k3-j721s2-common-proc-board-u-boot.dtsi | 2 + .../dts/k3-j721s2-r5-common-proc-board.dts | 1 + arch/arm/mach-k3/config.mk | 126 +- board/ti/am62ax/Kconfig | 2 + board/ti/am62ax/board-cfg.yaml | 36 + board/ti/am62ax/pm-cfg.yaml | 12 + board/ti/am62ax/rm-cfg.yaml | 1151 +++++++ board/ti/am62ax/sec-cfg.yaml | 375 +++ board/ti/am62x/Kconfig | 2 + board/ti/am62x/board-cfg.yaml | 36 + board/ti/am62x/pm-cfg.yaml | 12 + board/ti/am62x/rm-cfg.yaml | 1088 +++++++ board/ti/am62x/sec-cfg.yaml | 375 +++ board/ti/am64x/Kconfig | 2 + board/ti/am64x/board-cfg.yaml | 37 + board/ti/am64x/pm-cfg.yaml | 12 + board/ti/am64x/rm-cfg.yaml | 1400 ++++++++ board/ti/am64x/sec-cfg.yaml | 378 +++ board/ti/am65x/Kconfig | 2 + board/ti/am65x/board-cfg.yaml | 36 + board/ti/am65x/pm-cfg.yaml | 12 + board/ti/am65x/rm-cfg.yaml | 2068 ++++++++++++ board/ti/am65x/sec-cfg.yaml | 375 +++ board/ti/common/schema.yaml | 355 ++ board/ti/j721e/Kconfig | 4 + board/ti/j721e/board-cfg.yaml | 37 + board/ti/j721e/board-cfg_j7200.yaml | 36 + board/ti/j721e/pm-cfg.yaml | 13 + board/ti/j721e/pm-cfg_j7200.yaml | 12 + board/ti/j721e/rm-cfg.yaml | 2757 ++++++++++++++++ board/ti/j721e/rm-cfg_j7200.yaml | 2065 ++++++++++++ board/ti/j721e/sec-cfg.yaml | 379 +++ board/ti/j721e/sec-cfg_j7200.yaml | 378 +++ board/ti/j721s2/Kconfig | 2 + board/ti/j721s2/board-cfg.yaml | 37 + board/ti/j721s2/pm-cfg.yaml | 12 + board/ti/j721s2/rm-cfg.yaml | 2901 +++++++++++++++++ board/ti/j721s2/sec-cfg.yaml | 375 +++ board/ti/keys/custMpk.pem | 51 + board/ti/keys/ti-degenerate-key.pem | 10 + doc/board/ti/am62x_sk.rst | 20 +- doc/board/ti/j721e_evm.rst | 37 +- doc/board/ti/k3.rst | 67 +- scripts/Makefile.spl | 2 + tools/binman/btool/openssl.py | 244 ++ tools/binman/entries.rst | 113 + tools/binman/etype/ti_board_config.py | 269 ++ tools/binman/etype/ti_secure.py | 82 + tools/binman/etype/ti_secure_rom.py | 250 ++ tools/binman/etype/x509_cert.py | 87 +- tools/binman/ftest.py | 84 + tools/binman/pyproject.toml | 2 +- tools/binman/test/277_ti_board_cfg.dts | 11 + .../binman/test/278_ti_board_cfg_combined.dts | 25 + .../binman/test/279_ti_board_cfg_no_type.dts | 11 + tools/binman/test/279_ti_secure.dts | 17 + .../binman/test/280_ti_board_cfg_no_file.dts | 11 + tools/binman/test/280_ti_secure_rom.dts | 17 + .../281_ti_board_cfg_combined_no_file.dts | 13 + .../test/281_ti_secure_rom_combined.dts | 25 + .../test/282_ti_secure_rom_combined_a.dts | 24 + .../test/283_ti_secure_rom_combined_b.dts | 24 + .../test/284_ti_secure_rom_combined_c.dts | 21 + tools/binman/test/285_ti_secure_a.dts | 17 + tools/binman/test/286_ti_secure_b.dts | 18 + tools/binman/test/288_ti_secure_rom_a.dts | 19 + tools/binman/test/289_ti_secure_rom_b.dts | 18 + tools/binman/test/yaml/config.yaml | 19 + tools/binman/test/yaml/schema.yaml | 51 + tools/binman/test/yaml/schema_notype.yaml | 40 + tools/k3_fit_atf.sh | 123 - tools/k3_gen_x509_cert.sh | 262 -- 90 files changed, 22488 insertions(+), 564 deletions(-) create mode 100644 arch/arm/dts/k3-am625-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am62a-sk-binman.dtsi create mode 100644 arch/arm/dts/k3-am64x-binman.dtsi create mode 100644 arch/arm/dts/k3-am65x-binman.dtsi create mode 100644 arch/arm/dts/k3-j7200-binman.dtsi create mode 100644 arch/arm/dts/k3-j721e-binman.dtsi create mode 100644 arch/arm/dts/k3-j721s2-binman.dtsi create mode 100644 board/ti/am62ax/board-cfg.yaml create mode 100644 board/ti/am62ax/pm-cfg.yaml create mode 100644 board/ti/am62ax/rm-cfg.yaml create mode 100644 board/ti/am62ax/sec-cfg.yaml create mode 100644 board/ti/am62x/board-cfg.yaml create mode 100644 board/ti/am62x/pm-cfg.yaml create mode 100644 board/ti/am62x/rm-cfg.yaml create mode 100644 board/ti/am62x/sec-cfg.yaml create mode 100644 board/ti/am64x/board-cfg.yaml create mode 100644 board/ti/am64x/pm-cfg.yaml create mode 100644 board/ti/am64x/rm-cfg.yaml create mode 100644 board/ti/am64x/sec-cfg.yaml create mode 100644 board/ti/am65x/board-cfg.yaml create mode 100644 board/ti/am65x/pm-cfg.yaml create mode 100644 board/ti/am65x/rm-cfg.yaml create mode 100644 board/ti/am65x/sec-cfg.yaml create mode 100644 board/ti/common/schema.yaml create mode 100644 board/ti/j721e/board-cfg.yaml create mode 100644 board/ti/j721e/board-cfg_j7200.yaml create mode 100644 board/ti/j721e/pm-cfg.yaml create mode 100644 board/ti/j721e/pm-cfg_j7200.yaml create mode 100644 board/ti/j721e/rm-cfg.yaml create mode 100644 board/ti/j721e/rm-cfg_j7200.yaml create mode 100644 board/ti/j721e/sec-cfg.yaml create mode 100644 board/ti/j721e/sec-cfg_j7200.yaml create mode 100644 board/ti/j721s2/board-cfg.yaml create mode 100644 board/ti/j721s2/pm-cfg.yaml create mode 100644 board/ti/j721s2/rm-cfg.yaml create mode 100644 board/ti/j721s2/sec-cfg.yaml create mode 100644 board/ti/keys/custMpk.pem create mode 100644 board/ti/keys/ti-degenerate-key.pem create mode 100644 tools/binman/etype/ti_board_config.py create mode 100644 tools/binman/etype/ti_secure.py create mode 100644 tools/binman/etype/ti_secure_rom.py create mode 100644 tools/binman/test/277_ti_board_cfg.dts create mode 100644 tools/binman/test/278_ti_board_cfg_combined.dts create mode 100644 tools/binman/test/279_ti_board_cfg_no_type.dts create mode 100644 tools/binman/test/279_ti_secure.dts create mode 100644 tools/binman/test/280_ti_board_cfg_no_file.dts create mode 100644 tools/binman/test/280_ti_secure_rom.dts create mode 100644 tools/binman/test/281_ti_board_cfg_combined_no_file.dts create mode 100644 tools/binman/test/281_ti_secure_rom_combined.dts create mode 100644 tools/binman/test/282_ti_secure_rom_combined_a.dts create mode 100644 tools/binman/test/283_ti_secure_rom_combined_b.dts create mode 100644 tools/binman/test/284_ti_secure_rom_combined_c.dts create mode 100644 tools/binman/test/285_ti_secure_a.dts create mode 100644 tools/binman/test/286_ti_secure_b.dts create mode 100644 tools/binman/test/288_ti_secure_rom_a.dts create mode 100644 tools/binman/test/289_ti_secure_rom_b.dts create mode 100644 tools/binman/test/yaml/config.yaml create mode 100644 tools/binman/test/yaml/schema.yaml create mode 100644 tools/binman/test/yaml/schema_notype.yaml delete mode 100755 tools/k3_fit_atf.sh delete mode 100755 tools/k3_gen_x509_cert.sh
Signature · 1 line
2.34.1
PATCH v3 1/19 binman: ti-board-config: Add support for TI board config binaries
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images.
--- tools/binman/entries.rst | 48 ++++ tools/binman/etype/ti_board_config.py | 269 ++++++++++++++++++ tools/binman/ftest.py | 32 +++ tools/binman/pyproject.toml | 2 +- tools/binman/test/277_ti_board_cfg.dts | 11 + .../binman/test/278_ti_board_cfg_combined.dts | 25 ++ .../binman/test/279_ti_board_cfg_no_type.dts | 11 + .../binman/test/280_ti_board_cfg_no_file.dts | 11 + .../281_ti_board_cfg_combined_no_file.dts | 13 + tools/binman/test/yaml/config.yaml | 19 ++ tools/binman/test/yaml/schema.yaml | 51 ++++ tools/binman/test/yaml/schema_notype.yaml | 40 +++ 12 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 tools/binman/etype/ti_board_config.py create mode 100644 tools/binman/test/277_ti_board_cfg.dts create mode 100644 tools/binman/test/278_ti_board_cfg_combined.dts create mode 100644 tools/binman/test/279_ti_board_cfg_no_type.dts create mode 100644 tools/binman/test/280_ti_board_cfg_no_file.dts create mode 100644 tools/binman/test/281_ti_board_cfg_combined_no_file.dts create mode 100644 tools/binman/test/yaml/config.yaml create mode 100644 tools/binman/test/yaml/schema.yaml create mode 100644 tools/binman/test/yaml/schema_notype.yaml
tools/binman/entries.rst +48 -0
@@ -1658,6 +1658,54 @@ by setting the size of the entry to something larger than the text. +.. _etype_ti_board_config: + +Entry: ti-board-config: An entry containing a TI schema validated board config binary +------------------------------------------------------------------------------------- + +This etype supports generation of two kinds of board configuration +binaries: singular board config binary as well as combined board config +binary. + +Properties / Entry arguments: + - config-file: File containing board configuration data in YAML + - schema-file: File containing board configuration YAML schema against + which the config file is validated + +Output files: + - board config binary: File containing board configuration binary + +These above parameters are used only when the generated binary is +intended to be a single board configuration binary. Example:: + + my-ti-board-config { + ti-board-config { + config = "board-config.yaml"; + schema = "schema.yaml"; + }; + }; + +To generate a combined board configuration binary, we pack the +needed individual binaries into a ti-board-config binary. In this case, +the available supported subnode names are board-cfg, pm-cfg, sec-cfg and +rm-cfg. The final binary is prepended with a header containing details about +the included board config binaries. Example:: + + my-combined-ti-board-config { + ti-board-config { + board-cfg { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + sec-cfg { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + } + } + + + .. _etype_u_boot: Entry: u-boot: U-Boot flat binary
tools/binman/etype/ti_board_config.py new file +269 -0
269 lines not on this page · raw message
tools/binman/ftest.py +32 -0
@@ -97,6 +97,7 @@ ENV_DATA = b'var1=1\nvar2="2"' PRE_LOAD_MAGIC = b'UBSH' PRE_LOAD_VERSION = 0x11223344.to_bytes(4, 'big') PRE_LOAD_HDR_SIZE = 0x00001000.to_bytes(4, 'big') +TI_BOARD_CONFIG_DATA = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' # Subdirectory of the input dir to use to put test FDTs TEST_FDT_SUBDIR = 'fdts'
@@ -6676,6 +6677,37 @@ fdt fdtmap Extract the devicetree blob from the fdtmap ['fit']) self.assertIn("Node '/fit': Missing tool: 'mkimage'", str(e.exception)) + def testTIBoardConfig(self): + """Test that a schema validated board config file can be generated""" + data = self._DoReadFile('277_ti_board_cfg.dts') + self.assertEqual(TI_BOARD_CONFIG_DATA, data) + + def testTIBoardConfigCombined(self): + """Test that a schema validated combined board config file can be generated""" + data = self._DoReadFile('278_ti_board_cfg_combined.dts') + configlen_noheader = TI_BOARD_CONFIG_DATA * 4 + self.assertGreater(data, configlen_noheader) + + def testTIBoardConfigNoDataType(self): + """Test that error is thrown when data type is not supported""" + with test_util.capture_sys_output() as (_, stderr): + data = self._DoReadFile('279_ti_board_cfg_no_type.dts') + err = stderr.getvalue() + self.assertRegex(err, "Schema validation error") + + def testTIBoardConfigNoFile(self): + """Test that error is thrown when YAML config file does not exist for board config""" + with test_util.capture_sys_output() as (_, stderr): + data = self._DoReadFile('280_ti_board_cfg_no_file.dts') + err = stderr.getvalue() + self.assertRegex(err, "Board config binary was not generated properly") + + def testTIBoardConfigCombinedNoFile(self): + """Test that error is thrown when YAML config file does not exist for combined config""" + with test_util.capture_sys_output() as (_, stderr): + data = self._DoReadFile('281_ti_board_cfg_combined_no_file.dts') + err = stderr.getvalue() + self.assertRegex(err, "Board config binary was not generated properly") if __name__ == "__main__": unittest.main()
tools/binman/pyproject.toml +1 -1
@@ -8,7 +8,7 @@ version = "0.0.2" authors = [ { name="Simon Glass", email="[email protected]" }, ] -dependencies = ["pylibfdt", "u_boot_pylib", "dtoc"] +dependencies = ["pylibfdt", "u_boot_pylib", "dtoc", "jsonschema"] description = "Binman firmware-packaging tool" readme = "README.rst" requires-python = ">=3.7"
tools/binman/test/277_ti_board_cfg.dts new file +11 -0
@@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + binman { + ti-board-config { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema.yaml"; + }; + }; +};
tools/binman/test/278_ti_board_cfg_combined.dts new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + binman { + ti-board-config { + board-cfg { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema.yaml"; + }; + sec-cfg { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema.yaml"; + }; + rm-cfg { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema.yaml"; + }; + pm-cfg { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema.yaml"; + }; + }; + }; +};
tools/binman/test/279_ti_board_cfg_no_type.dts new file +11 -0
@@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + binman { + ti-board-config { + config = "tools/binman/test/yaml/config.yaml"; + schema = "tools/binman/test/yaml/schema_notype.yaml"; + }; + }; +};
tools/binman/test/280_ti_board_cfg_no_file.dts new file +11 -0
@@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + binman { + ti-board-config { + config = "tools/binman/test/yaml/do_not_exist.yaml"; + schema = "tools/binman/test/yaml/not_here.yaml"; + }; + }; +};
tools/binman/test/281_ti_board_cfg_combined_no_file.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +/ { + binman { + ti-board-config { + board-cfg { + config = "tools/binman/test/yaml/do_not_exist.yaml"; + schema = "tools/binman/test/yaml/not_here.yaml"; + }; + }; + }; +};
tools/binman/test/yaml/config.yaml new file +19 -0
@@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Test config +# +--- + +main-branch: + obj: + a: 0x0 + b: 0 + arr: [0, 0, 0, 0] + another-arr: + - #1 + c: 0 + d: 0 + - #2 + c: 0 + d: 0
tools/binman/test/yaml/schema.yaml new file +51 -0
51 lines not on this page · raw message
tools/binman/test/yaml/schema_notype.yaml new file +40 -0
@@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Test schema +# +--- + +definitions: + u8: + type: integer + minimum: 0 + maximum: 0xff + u16: + type: integer + minimum: 0 + maximum: 0xffff + u32: + type: integer + minimum: 0 + maximum: 0xffffffff + +type: object +properties: + main-branch: + type: object + properties: + obj: + type: object + properties: + a: + $ref: "#/definitions/u4" + b: + $ref: "#/definitions/u16" + arr: + type: array + minItems: 4 + maxItems: 4 + items: + $ref: "#/definitions/u8" +
Signature · 1 line
2.34.1
Re: [PATCH v3 01/19] binman: ti-board-config: Add support for TI board config binaries
Hi Neha,
Quoted 22 lines · Neha Malcom Francis
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images.
Signed-off-by Neha Malcom Francis <[email protected]>--- tools/binman/entries.rst | 48 ++++ tools/binman/etype/ti_board_config.py | 269 ++++++++++++++++++ tools/binman/ftest.py | 32 +++ tools/binman/pyproject.toml | 2 +- tools/binman/test/277_ti_board_cfg.dts | 11 + .../binman/test/278_ti_board_cfg_combined.dts | 25 ++ .../binman/test/279_ti_board_cfg_no_type.dts | 11 + .../binman/test/280_ti_board_cfg_no_file.dts | 11 + .../281_ti_board_cfg_combined_no_file.dts | 13 + tools/binman/test/yaml/config.yaml | 19 ++ tools/binman/test/yaml/schema.yaml | 51 ++++ tools/binman/test/yaml/schema_notype.yaml | 40 +++ 12 files changed, 531 insertions(+), 1 deletion(-) create mode 100644 tools/binman/etype/ti_board_config.py
Quoted 9 lines
create mode 100644 tools/binman/test/277_ti_board_cfg.dts create mode 100644 tools/binman/test/278_ti_board_cfg_combined.dts create mode 100644 tools/binman/test/279_ti_board_cfg_no_type.dts create mode 100644 tools/binman/test/280_ti_board_cfg_no_file.dts create mode 100644 tools/binman/test/281_ti_board_cfg_combined_no_file.dts create mode 100644 tools/binman/test/yaml/config.yaml create mode 100644 tools/binman/test/yaml/schema.yaml create mode 100644 tools/binman/test/yaml/schema_notype.yaml
My only real comment is that errors should produce an error rather than just a warning. E.g. a schema-validation error should be fatal, since it won't work.
You can call self.Raise() when something goes wrong. The tests should check for that instead of a warning.
Regards,
Simon
Re: [PATCH v3 01/19] binman: ti-board-config: Add support for TI board config binaries
Hi Simon
Quoted 35 lines · Simon Glass
Hi Neha,
Quoted 21 lines · Neha Malcom Francis
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images.
Signed-off-by Neha Malcom Francis <[email protected]>--- tools/binman/entries.rst | 48 ++++ tools/binman/etype/ti_board_config.py | 269 ++++++++++++++++++ tools/binman/ftest.py | 32 +++ tools/binman/pyproject.toml | 2 +- tools/binman/test/277_ti_board_cfg.dts | 11 + .../binman/test/278_ti_board_cfg_combined.dts | 25 ++ .../binman/test/279_ti_board_cfg_no_type.dts | 11 + .../binman/test/280_ti_board_cfg_no_file.dts | 11 + .../281_ti_board_cfg_combined_no_file.dts | 13 + tools/binman/test/yaml/config.yaml | 19 ++ tools/binman/test/yaml/schema.yaml | 51 ++++ tools/binman/test/yaml/schema_notype.yaml | 40 +++ 12 files changed, 531 insertions(+), 1 deletion(-)Quoted 10 lines
create mode 100644
tools/binman/etype/ti_board_config.pycreate mode 100644tools/binman/test/277_ti_board_cfg.dtscreate mode 100644tools/binman/test/278_ti_board_cfg_combined.dtscreate mode 100644tools/binman/test/279_ti_board_cfg_no_type.dtscreate mode 100644tools/binman/test/280_ti_board_cfg_no_file.dtscreate mode 100644tools/binman/test/281_ti_board_cfg_combined_no_file.dtscreate mode 100644tools/binman/test/yaml/config.yaml
create mode 100644tools/binman/test/yaml/schema.yaml
create mode 100644tools/binman/test/yaml/schema_notype.yaml
Quoted 9 lines
Reviewed-by Simon Glass <[email protected]>My only real comment is that errors should produce an error rather than just a warning. E.g. a schema-validation error should be fatal, since it won't work.
You can call
self.Raise()when something goes wrong. The tests should check for that instead of a warning.
Makes sense. But I'm not sure I understand when we create an fake binary and when we choose to throw errors? Either case we end up with non-working binary or no binary at all. I see both styles in existing etypes and I can't form a reasoning for when to do what.
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH v3 01/19] binman: ti-board-config: Add support for TI board config binaries
Hi Neha,
Quoted 45 lines · Neha Malcom Francis
Hi Simon
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 21 lines · Neha Malcom Francis
The ti-board-config entry loads and validates a given YAML config file against a given schema, and generates the board config binary. K3 devices require these binaries to be packed into the final system firmware images.
Signed-off-by Neha Malcom Francis <[email protected]>--- tools/binman/entries.rst | 48 ++++ tools/binman/etype/ti_board_config.py | 269 ++++++++++++++++++ tools/binman/ftest.py | 32 +++ tools/binman/pyproject.toml | 2 +- tools/binman/test/277_ti_board_cfg.dts | 11 + .../binman/test/278_ti_board_cfg_combined.dts | 25 ++ .../binman/test/279_ti_board_cfg_no_type.dts | 11 + .../binman/test/280_ti_board_cfg_no_file.dts | 11 + .../281_ti_board_cfg_combined_no_file.dts | 13 + tools/binman/test/yaml/config.yaml | 19 ++ tools/binman/test/yaml/schema.yaml | 51 ++++ tools/binman/test/yaml/schema_notype.yaml | 40 +++ 12 files changed, 531 insertions(+), 1 deletion(-)Quoted 10 lines
create mode 100644
tools/binman/etype/ti_board_config.pycreate mode 100644tools/binman/test/277_ti_board_cfg.dtscreate mode 100644tools/binman/test/278_ti_board_cfg_combined.dtscreate mode 100644tools/binman/test/279_ti_board_cfg_no_type.dtscreate mode 100644tools/binman/test/280_ti_board_cfg_no_file.dtscreate mode 100644tools/binman/test/281_ti_board_cfg_combined_no_file.dtscreate mode 100644tools/binman/test/yaml/config.yaml
create mode 100644tools/binman/test/yaml/schema.yaml
create mode 100644tools/binman/test/yaml/schema_notype.yamlReviewed-by Simon Glass <[email protected]>My only real comment is that errors should produce an error rather than just a warning. E.g. a schema-validation error should be fatal, since it won't work.
Quoted 8 lines
Quoted 3 lines
You can call
self.Raise()when something goes wrong. The tests should check for that instead of a warning.Makes sense. But I'm not sure I understand when we create an fake binary and when we choose to throw errors? Either case we end up with non-working binary or no binary at all. I see both styles in existing etypes and I can't form a reasoning for when to do what.
OK I see.
If -M is not provided, we should produce an error
If -M is provided, entries with missing external blobs should set 'self.missing' to True, so binman knows and can report it.
When you output a warning, it really doesn't do anything. So far as the user is concerned the thing succeeded. We need the exit code to indicate the right thing here.
In other words, we have support in Binman for handling missing blobs and we should use that.
Regards,
Simon
PATCH 1/2 buildman: Create a requirements.txt file
In reply to Neha Malcom FrancisAt this point, buildman requires a few different modules and so we need a requirements.txt to track what modules are needed.
--- tools/buildman/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tools/buildman/requirements.txt
tools/buildman/requirements.txt new file +2 -0
@@ -0,0 +1,2 @@ +jsonschema==4.17.3 +pyyaml==6.0
Signature · 1 line
2.34.1
PATCH 2/2 CI: Make use of buildman requirements.txt
Now that buildman has a requirements.txt file we need to make use of it.
--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)
.azure-pipelines.yml +3 -0
@@ -162,6 +162,7 @@ stages: virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install -r test/py/requirements.txt + pip install -r tools/buildman/requirements.txt export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
@@ -209,6 +210,7 @@ stages: git config --global --add safe.directory $(work_dir) export USER=azure pip install -r test/py/requirements.txt + pip install -r tools/buildman/requirements.txt pip install asteval pylint==2.12.2 pyopenssl export PATH=${PATH}:~/.local/bin echo "[MASTER]" >> .pylintrc
@@ -404,6 +406,7 @@ stages: if [ -n "${BUILD_ENV}" ]; then export ${BUILD_ENV}; fi + pip install -r tools/buildman/requirements.txt tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE} cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/ cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
.gitlab-ci.yml +4 -0
@@ -97,6 +97,7 @@ build all 32bit ARM platforms: script: - ret=0; git config --global --add safe.directory "${CI_PROJECT_DIR}"; + pip install -r tools/buildman/requirements.txt; ./tools/buildman/buildman -o /tmp -PEWM arm -x aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP;
@@ -110,6 +111,7 @@ build all 64bit ARM platforms: - . /tmp/venv/bin/activate - ret=0; git config --global --add safe.directory "${CI_PROJECT_DIR}"; + pip install -r tools/buildman/requirements.txt; ./tools/buildman/buildman -o /tmp -PEWM aarch64 || ret=$?; if [[ $ret -ne 0 ]]; then ./tools/buildman/buildman -o /tmp -seP;
@@ -208,6 +210,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites: virtualenv -p /usr/bin/python3 /tmp/venv; . /tmp/venv/bin/activate; pip install -r test/py/requirements.txt; + pip install -r tools/buildman/requirements.txt; export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl; export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"; export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
@@ -240,6 +243,7 @@ Run pylint: script: - git config --global --add safe.directory "${CI_PROJECT_DIR}" - pip install -r test/py/requirements.txt + - pip install -r tools/buildman/requirements.txt - pip install asteval pylint==2.12.2 pyopenssl - export PATH=${PATH}:~/.local/bin - echo "[MASTER]" >> .pylintrc
Signature · 1 line
2.34.1
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
Quoted 9 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
In reply to Tom RiniHi Tom
Thanks for these patches!
Quoted 8 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)
However, while trying to ensure CI/CD coverage, I'm running into this " error 'No module named 'jsonschema'" for am62ax [1], any idea why after building successfully for other devices?
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
Quoted 14 lines · Neha Malcom Francis
Hi Tom
Thanks for these patches!
Quoted 8 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)
Quoted 6 lines
However, while trying to ensure CI/CD coverage, I'm running into this " error 'No module named 'jsonschema'" for am62ax [1], any idea why after building successfully for other devices?
o
We need to have the requirements.txt file installed in any job that's using this part of binman now and I guess my patch above wasn't complete? I didn't fully check what happened on Azure due to the other problems (ie iot2050 boards not building).
Signature · 1 line
Tom
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 19 lines · Neha Malcom Francis
Hi Tom
Thanks for these patches!
Quoted 8 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)However, while trying to ensure CI/CD coverage, I'm running into this " error 'No module named 'jsonschema'" for am62ax [1], any idea why after building successfully for other devices?
Quoted 8 lines
o
We need to have the requirements.txt file installed in any job that's using this part of binman now and I guess my patch above wasn't complete? I didn't fully check what happened on Azure due to the other problems (ie iot2050 boards not building).
Probably, I'm not sure about how to rectify this. Could you have a look if possible? Regarding iot2050, I have started working on it.
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
Quoted 26 lines · Neha Malcom Francis
Hi Tom,
Quoted 23 lines · Tom Rini
Quoted 14 lines · Neha Malcom Francis
Hi Tom
Thanks for these patches!
Quoted 8 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)Quoted 6 lines
However, while trying to ensure CI/CD coverage, I'm running into this " error 'No module named 'jsonschema'" for am62ax [1], any idea why after building successfully for other devices?
o
Quoted 8 lines
Quoted 5 lines
We need to have the requirements.txt file installed in any job that's using this part of binman now and I guess my patch above wasn't complete? I didn't fully check what happened on Azure due to the other problems (ie iot2050 boards not building).
Probably, I'm not sure about how to rectify this. Could you have a look if possible? Regarding iot2050, I have started working on it.
I see it now. The "script" section at the bottom of .azure-pipelines.yml needs the pip install as well, I had missed that. Go ahead and take that up with your reposting of the series :)
Signature · 1 line
Tom
Re: [PATCH 2/2] CI: Make use of buildman requirements.txt
Hi Tom
Quoted 33 lines · Tom Rini
Quoted 32 lines · Neha Malcom Francis
Hi Tom,
Quoted 28 lines · Tom Rini
Quoted 14 lines · Neha Malcom Francis
Hi Tom
Thanks for these patches!
Quoted 8 lines · Tom Rini
Now that buildman has a requirements.txt file we need to make use of it.
Signed-off-by Tom Rini <[email protected]>--- .azure-pipelines.yml | 3 +++ .gitlab-ci.yml | 4 ++++ 2 files changed, 7 insertions(+)Quoted 6 lines
However, while trying to ensure CI/CD coverage, I'm running into this " error 'No module named 'jsonschema'" for am62ax [1], any idea why after building successfully for other devices?
o
We need to have the requirements.txt file installed in any job that's using this part of binman now and I guess my patch above wasn't complete? I didn't fully check what happened on Azure due to the other problems (ie iot2050 boards not building).
Quoted 7 lines
Quoted 2 lines
Probably, I'm not sure about how to rectify this. Could you have a look if possible? Regarding iot2050, I have started working on it.
I see it now. The "script" section at the bottom of .azure-pipelines.yml needs the pip install as well, I had missed that. Go ahead and take that up with your reposting of the series :)
Thanks for catching that! Will add it in
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH 1/2] buildman: Create a requirements.txt file
In reply to Tom RiniHi Tom,
Quoted 11 lines · Tom Rini
At this point, buildman requires a few different modules and so we need a requirements.txt to track what modules are needed.
Cc Simon Glass <[email protected]>Cc Neha Malcom Francis <[email protected]>Signed-off-by Tom Rini <[email protected]>--- tools/buildman/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tools/buildman/requirements.txt
PATCH v3 2/19 binman: ti-secure: Add support for TI signing
In reply to Neha Malcom FrancisThe ti-secure entry contains certificate for binaries that will be loaded or booted by system firmware whereas the ti-secure-rom entry contains certificate for binaries that will be booted by ROM. Support for both these types of certificates is necessary for booting of K3 devices.
--- board/ti/keys/custMpk.pem | 51 ++++ board/ti/keys/ti-degenerate-key.pem | 10 + tools/binman/btool/openssl.py | 244 +++++++++++++++++ tools/binman/entries.rst | 65 +++++ tools/binman/etype/ti_secure.py | 82 ++++++ tools/binman/etype/ti_secure_rom.py | 250 ++++++++++++++++++ tools/binman/etype/x509_cert.py | 87 +++++- tools/binman/ftest.py | 52 ++++ tools/binman/test/279_ti_secure.dts | 17 ++ tools/binman/test/280_ti_secure_rom.dts | 17 ++ .../test/281_ti_secure_rom_combined.dts | 25 ++ .../test/282_ti_secure_rom_combined_a.dts | 24 ++ .../test/283_ti_secure_rom_combined_b.dts | 24 ++ .../test/284_ti_secure_rom_combined_c.dts | 21 ++ tools/binman/test/285_ti_secure_a.dts | 17 ++ tools/binman/test/286_ti_secure_b.dts | 18 ++ tools/binman/test/288_ti_secure_rom_a.dts | 19 ++ tools/binman/test/289_ti_secure_rom_b.dts | 18 ++ 18 files changed, 1033 insertions(+), 8 deletions(-) create mode 100644 board/ti/keys/custMpk.pem create mode 100644 board/ti/keys/ti-degenerate-key.pem create mode 100644 tools/binman/etype/ti_secure.py create mode 100644 tools/binman/etype/ti_secure_rom.py create mode 100644 tools/binman/test/279_ti_secure.dts create mode 100644 tools/binman/test/280_ti_secure_rom.dts create mode 100644 tools/binman/test/281_ti_secure_rom_combined.dts create mode 100644 tools/binman/test/282_ti_secure_rom_combined_a.dts create mode 100644 tools/binman/test/283_ti_secure_rom_combined_b.dts create mode 100644 tools/binman/test/284_ti_secure_rom_combined_c.dts create mode 100644 tools/binman/test/285_ti_secure_a.dts create mode 100644 tools/binman/test/286_ti_secure_b.dts create mode 100644 tools/binman/test/288_ti_secure_rom_a.dts create mode 100644 tools/binman/test/289_ti_secure_rom_b.dts
board/ti/keys/custMpk.pem new file +51 -0
@@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3 +tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJrOk2eCpVUEa+z5bJ2y/ysBx +ry9yIu5GASVirT7HBPaxGLYswBJuD+KbPuWmoKgGRQNBF04WH6l01oRO1nmnELgR +qQ6SHyXdf7Hy0bnyaNgzWUuCfXfM0Zz6I7T7WIjyzerVFvIsdS36YsPBCW7gBnDg +tQcJmWLZ1uTnbG3IggdQk/fi2O3RX+PQns+TVNlf3V3ON2DxqxSKBHtlp7p/30VF +fEuhW65OxpQ9jE6H0pQ8pPOf2vzyNnznDa1aQjfxKoHQbqGnZwMeh+0Au3NKaCgx +ooKaowTB6If/RX6qwZ/UOwXHg/0hcf69fzjJFhlSDuYDM40dHsk2HM1OnYIpiM2b +Kr5sX3uysjp5AGp99a0anR7NWCrPXvROgKs7T9341N40osQg2VkZLYUCXh9osUyN +uREG6S12tViMUKg3bmZ4b4MwRk00n7QYSrm7+nvFrtYyEISEbD+agDM1/E281W5g +VFDPfm2AlwT6jwsg/b2YK6E3vVn9SuxFoQmLF8lyFDO3BV4SXeJaHc4hVPbh6tVV +qifrTQnfGUCCLmaJF2XZbrPWOE6NYRbWdNTeFl9RGdVCuIPSyN5LqWmXto0CAwEA +AQKCAgAzkAwcJ0z1GnId/lJQZno8NhGckRoJuEKbR8dwlCP8VUz6Ca5H7Y9kvXDa +Hs/hn+rYgP6hYOz7XyrIX2rmJ/T6dxEwqGeC1+o59FConcIRWHpE5zuGT6JYJL5F +TuZa48bm4v8VMQvQZOjIZpkIFwao8c6HTwKAnHTB5IN/48I2hCt+Cn3RhfoOZ7Rm +4gkpaSkt+7GXlhXHb82YfujNO+hbktEamhUYlQ9EK70Wa8aqmf3gHxO0JgsEFjW8 +lJaSnultlTW8SDcx3LMUUjCYumECk4oX/VlJfmKYjPlVjkr3QQ+Cm3nNucb4K4hc +c+JL+2ERhSj8RjXL7VgbNgdPnIjvQDJuTNqecTU8xWPYrkOLQpNibbLjnutLkhJz +fMyRtmDtrsey8WiCDuCHkPJ8/f8RjL2zWI9fzTDDIzdlEKouUFGOovaHVnbua6pn +hymcu9d9FV3p2rcbj0ivCs7e8j+vhSxFJEJoAbcQdXCTi/n2uR7pLtoMNiUzsejy +d46Uz+KEU920NTwE2z6JJq8I2vegnxjc7PDDrV3/5rK04B93aXiqvwWseCpxelrI +xaMkRHbXrIXRO6MXQ3N+zNq8Dg3hjGTTvaBKuwgvqLwlXY8+Aa3ooFzEOInIOSsI +XcWqXxt/tgZgsj9RwpC42t8kbA+BkbNk9EIUa+P5kEr2P/fO7QKCAQEA4EtArnOX +D6tQF8uTw8USOZC2P9s/ez1z4jRq3oKP0Kv4tJiuIObJ/dUvGVD7aM5v2xaCfhm8 +xpk09VPUgghfG5jR5qVvQr75kCNToJQudWi4ngk1HwKJzzTO11giFEdybvTUA+Pj +fmxCM0dYYqRWZoj0hLqXlUCwxE74BFIhJVjeYbf+nTQrqpllTLoW7MTZHzGx5SXx +4dNzyVAUH49Yt2D8mgXXCkf5sGLh762wj34b/rR10Kr4O5utGMZrfTRIbuQ1pNjU +m66baPzq+mC0BzqZEW70TgEb7lOr8rcVXLOi3r36omfd9/MHx7iZD6o3K1axSO15 +grD4ZrN7Ac3QJwKCAQEA2heCoBdpvy6YUk8AO2k8qDygTdmPQRuwjjT+Z2fMslBt +D7DkpKwZ6Bl9OclcpiiLHmH+hv65KqYg+tR0RRb7PcogB9El9x7yKkGTPZEYWGky +n8P84rJpKwjnwWQvPQktI1cs3YGvZA9DQTFBavRrwuzgd1oSJq5aPQ2tme0kMvWp +l1/B/cPK+PKCi/Wfisaze1TjijP9qIeUwkdNN6WLrLU3QgsGppcg2I7RQtAIikT6 +GkuiOQAvWMsrJVV6PNrVKz4fJDJ59Rz6jbDHZNi1MEYNxQoB/Pl7QIakbfjWpHLv +8Ey7cB2JKxjQy8tmyl8WNQVbXbE6daPXcMTUmaRAKwKCAQBv1lYMJmq+T2eCVen6 +BbvOpE+bi5EdvEiaFBTtmiBnpjg+pJq+oRU60h/H+c9CNR0lGxY6Fk9An4f+g6xE +ojP6KLsQzJCrsVny+wpp2TlJJcxYULMCIVvhy60PR0zG29E9biqBPhJjKUvhEcQK +e3LxcXyq6fdHXphFajLUxLbuTl+kTgBRFoBnclFGbsubh5PTsA3J+p+fQLZNPPar +veg4l82cZykQYU8pGkUaI3sUMYd3+zd7sqRP5JHs9pMGPRmY4YW2CsAIWIn5UZNB +ARMDP76vKKn8cyUgMuxb+9pU/OVLN2NPs4bEaZQJjAwV+YPEwldny7F47xEM9JVz +EtKlAoIBAQDUt62u3GdGE/p5/ZgqWoDRTyDEDfmN9aYFbmbdEP80xQE7FrxMaZhz +K7laja6SWmUm40nQ/c45bQQp4uLtKHcxU15egX7YRBTLZl5o5IasZR79ebnEm2O8 +l9kEZeU1USf3mmWmP4GExOZCRfqaiYA6BbUCdJXTqKdXeWnkAssV8UrS3JFoJHpq +yo7OWGqefyQ8nRW6jO9SW7uaqtUD+7H6aF5XSk3YWvusfdBZrHNH+fM/hpnZovaL +Us7ogTDS/laA8PyK37jYfMVdQhmZoU1Iomt3zkUWK3gt/aWPpfAlQf4Jka4YspZB +tNiijefaZ1hPqsPs5Joyd/YAhdsfaHc1AoIBAQCn/9j6RRjRaw0ip756oad4AXHz +XBwVB2CrY96qT6Hj9Sq7tGgdskqGkOQkAivBLBizUdcWv0t1yenOsSgasQeMlvlh +B8md9cLvpKXPB3HM3rTDH/xNXe0TpVKLf7SXC8HfDyIweHwMW3QgO2DWrvI4BV/T +ckBatRNQ90HxkqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ +h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3 +NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF +-----END RSA PRIVATE KEY-----
board/ti/keys/ti-degenerate-key.pem new file +10 -0
@@ -0,0 +1,10 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBWwIBAAKBgQDRfrnXQaP0k6vRK/gZ+bDflSU6y1JagGeQ/b+QYuiDz14japog +8fRSu5WBsAxaSaySAUwS3L9Ppw+hGMecmyIJ494aMfZTtk1g49gU58joduiRnu7e +QSZHMnehhuNlfD7A2tAAKnxIYuabs8zHYM/SS9Ne7t3kIQMbKfUSzNy6qQIBAQIB +AQJBAOelUA376o6w3HkShXfN+shaOZYqFuTJ9exLMwsLp7DZKXB5F9I4JJ+Vkvho +k6QWs7vkhleLSYUZknXHYm26ZE0CQQDnhTtd4PTBoZPjPXOeYMJFtEdMNy0XP6ey +bcce389ugoY7BEkvASrd8PHgJQHziepgWOG4DGp33c64Hfq4zI3NAgEBAgEBAkA0 +RbK4uqoLciQluesTPU6lBy7Se3Dw0F9xBqlF5SR4KI6q+zQrHpBKyFOofMHZgizR +iCrL55cxEM146zMw3AnF +-----END RSA PRIVATE KEY-----
tools/binman/btool/openssl.py +244 -0
256 lines not on this page · raw message
tools/binman/entries.rst +65 -0
71 lines not on this page · raw message
tools/binman/etype/ti_secure.py new file +82 -0
82 lines not on this page · raw message
tools/binman/etype/ti_secure_rom.py new file +250 -0
250 lines not on this page · raw message
tools/binman/etype/x509_cert.py +79 -8
111 lines not on this page · raw message
tools/binman/ftest.py +52 -0
69 lines not on this page · raw message
tools/binman/test/279_ti_secure.dts new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure { + content = <&unsecure_binary>; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/280_ti_secure_rom.dts new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/281_ti_secure_rom_combined.dts new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + content-sbl = <&unsecure_binary>; + content-sysfw = <&unsecure_binary>; + content-sysfw-data = <&unsecure_binary>; + content-sysfw-inner-cert = <&unsecure_binary>; + content-dm-data = <&unsecure_binary>; + combined; + sysfw-inner-cert; + dm-data; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/282_ti_secure_rom_combined_a.dts new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + content-sbl = <&unsecure_binary>; + content-sysfw = <&unsecure_binary>; + content-sysfw-data = <&unsecure_binary>; + content-dm-data = <&unsecure_binary>; + combined; + sysfw-inner-cert; + dm-data; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/283_ti_secure_rom_combined_b.dts new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + content-sbl = <&unsecure_binary>; + content-sysfw = <&unsecure_binary>; + content-sysfw-data = <&unsecure_binary>; + content-sysfw-inner-cert = <&unsecure_binary>; + combined; + sysfw-inner-cert; + dm-data; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/284_ti_secure_rom_combined_c.dts new file +21 -0
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + content-sbl = <&unsecure_binary>; + content-sysfw = <&unsecure_binary>; + content-sysfw-data = <&unsecure_binary>; + combined; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/285_ti_secure_a.dts new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure { + content = <&unsecure_binary>; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/286_ti_secure_b.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure { + content = <&unsecure_binary>; + countersign; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/288_ti_secure_rom_a.dts new file +19 -0
@@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + core = "secure"; + countersign; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
tools/binman/test/289_ti_secure_rom_b.dts new file +18 -0
@@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + + binman { + ti-secure-rom { + content = <&unsecure_binary>; + core = "public"; + }; + unsecure_binary: blob-ext { + filename = "ti_unsecure.bin"; + }; + }; +};
Signature · 1 line
2.34.1
Re: [PATCH v3 02/19] binman: ti-secure: Add support for TI signing
Quoted 34 lines · Neha Malcom Francis
The ti-secure entry contains certificate for binaries that will be loaded or booted by system firmware whereas the ti-secure-rom entry contains certificate for binaries that will be booted by ROM. Support for both these types of certificates is necessary for booting of K3 devices.
Signed-off-by Neha Malcom Francis <[email protected]>--- board/ti/keys/custMpk.pem | 51 ++++ board/ti/keys/ti-degenerate-key.pem | 10 + tools/binman/btool/openssl.py | 244 +++++++++++++++++ tools/binman/entries.rst | 65 +++++ tools/binman/etype/ti_secure.py | 82 ++++++ tools/binman/etype/ti_secure_rom.py | 250 ++++++++++++++++++ tools/binman/etype/x509_cert.py | 87 +++++- tools/binman/ftest.py | 52 ++++ tools/binman/test/279_ti_secure.dts | 17 ++ tools/binman/test/280_ti_secure_rom.dts | 17 ++ .../test/281_ti_secure_rom_combined.dts | 25 ++ .../test/282_ti_secure_rom_combined_a.dts | 24 ++ .../test/283_ti_secure_rom_combined_b.dts | 24 ++ .../test/284_ti_secure_rom_combined_c.dts | 21 ++ tools/binman/test/285_ti_secure_a.dts | 17 ++ tools/binman/test/286_ti_secure_b.dts | 18 ++ tools/binman/test/288_ti_secure_rom_a.dts | 19 ++ tools/binman/test/289_ti_secure_rom_b.dts | 18 ++ 18 files changed, 1033 insertions(+), 8 deletions(-) create mode 100644 board/ti/keys/custMpk.pem create mode 100644 board/ti/keys/ti-degenerate-key.pem create mode 100644 tools/binman/etype/ti_secure.py create mode 100644 tools/binman/etype/ti_secure_rom.py create mode 100644 tools/binman/test/279_ti_secure.dts create mode 100644 tools/binman/test/280_ti_secure_rom.dts
Quoted 8 lines
create mode 100644 tools/binman/test/281_ti_secure_rom_combined.dts create mode 100644 tools/binman/test/282_ti_secure_rom_combined_a.dts create mode 100644 tools/binman/test/283_ti_secure_rom_combined_b.dts create mode 100644 tools/binman/test/284_ti_secure_rom_combined_c.dts create mode 100644 tools/binman/test/285_ti_secure_a.dts create mode 100644 tools/binman/test/286_ti_secure_b.dts create mode 100644 tools/binman/test/288_ti_secure_rom_a.dts create mode 100644 tools/binman/test/289_ti_secure_rom_b.dts
Same comment about warnings/errors
PATCH v3 3/19 ti: sysfw: tiboot3: Add support for packaging sysfw.itb and tiboot3.bin
In reply to Neha Malcom FrancisBoard config binary artifacts must be populated in the R5 output directory to be used by binman to package sysfw.itb and tiboot3.bin.
For devices that follow combined flow, these board configuration binaries must again be packaged into a combined board configuration blobs to be used by binman to package tiboot3.bin.
Modify config.mk to generate all the board configuration binaries needed.
--- arch/arm/mach-k3/config.mk | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
arch/arm/mach-k3/config.mk +50 -0
@@ -39,6 +39,56 @@ $(warning "WARNING: Software revision file not found. Default may not work on HS endif endif +O ?= . + +# Board config binary artifacts necessary for packaging of tiboot3.bin +# and sysfw.itb by binman, currently for general purpose devices and +# devices that require sysfw.itb in ROM boot image. + +ifdef CONFIG_BINMAN + +ifndef CONFIG_TARGET_J7200_R5_EVM +BOARD_YAML = $(srctree)/board/ti/$(BOARD)/board-cfg.yaml +RM_YAML = $(srctree)/board/ti/$(BOARD)/rm-cfg.yaml +SEC_YAML = $(srctree)/board/ti/$(BOARD)/sec-cfg.yaml +PM_YAML = $(srctree)/board/ti/$(BOARD)/pm-cfg.yaml +else +BOARD_YAML = $(srctree)/board/ti/$(BOARD)/board-cfg_j7200.yaml +RM_YAML = $(srctree)/board/ti/$(BOARD)/rm-cfg_j7200.yaml +SEC_YAML = $(srctree)/board/ti/$(BOARD)/sec-cfg_j7200.yaml +PM_YAML = $(srctree)/board/ti/$(BOARD)/pm-cfg_j7200.yaml +endif + +CUSTOMER_KEY = $(srctree)/board/ti/keys/custMpk.pem +TI_DEGENERATE_KEY = $(srctree)/board/ti/keys/ti-degenerate-key.pem + +SCHEMA_YAML = $(srctree)/board/ti/common/schema.yaml + +board-cfg.yaml: $(BOARD_YAML) + @cp $< $@ +rm-cfg.yaml: $(RM_YAML) + @cp $< $@ +sec-cfg.yaml: $(SEC_YAML) + @cp $< $@ +pm-cfg.yaml: $(PM_YAML) + @cp $< $@ + +schema.yaml: $(SCHEMA_YAML) + @cp $< $@ +custMpk.pem: $(CUSTOMER_KEY) + @cp $< $@ +ti-degenerate-key.pem: $(TI_DEGENERATE_KEY) + @cp $< $@ + +INPUTS-y += board-cfg.yaml +INPUTS-y += rm-cfg.yaml +INPUTS-y += sec-cfg.yaml +INPUTS-y += pm-cfg.yaml +INPUTS-y += schema.yaml +INPUTS-y += custMpk.pem +INPUTS-y += ti-degenerate-key.pem +endif + # tiboot3.bin is mandated by ROM and ROM only supports R5 boot. # So restrict tiboot3.bin creation for CPU_V7R. ifdef CONFIG_CPU_V7R
Signature · 1 line
2.34.1
Re: [PATCH v3 03/19] ti: sysfw: tiboot3: Add support for packaging sysfw.itb and tiboot3.bin
Hi Neha,
Quoted 8 lines · Neha Malcom Francis
Board config binary artifacts must be populated in the R5 output directory to be used by binman to package sysfw.itb and tiboot3.bin.
For devices that follow combined flow, these board configuration binaries must again be packaged into a combined board configuration blobs to be used by binman to package tiboot3.bin.
Quoted 7 lines
Modify config.mk to generate all the board configuration binaries needed.
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/mach-k3/config.mk | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
For follow-up: it would be nice if binman could just pick up these files from where they are, e.g. by having the filenames in the .dts description. It seems odd to have to copy them in a config.mk file.
Regards,
Simon
Re: [PATCH v3 03/19] ti: sysfw: tiboot3: Add support for packaging sysfw.itb and tiboot3.bin
Hi Simon
Quoted 19 lines · Simon Glass
Hi Neha,
Quoted 8 lines · Neha Malcom Francis
Board config binary artifacts must be populated in the R5 output directory to be used by binman to package sysfw.itb and tiboot3.bin.
For devices that follow combined flow, these board configuration binaries must again be packaged into a combined board configuration blobs to be used by binman to package tiboot3.bin.
Quoted 7 lines
Modify config.mk to generate all the board configuration binaries needed.
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/mach-k3/config.mk | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
Quoted 6 lines
Reviewed-by Simon Glass <[email protected]>For follow-up: it would be nice if binman could just pick up these files from where they are, e.g. by having the filenames in the .dts description. It seems odd to have to copy them in a config.mk file.
Yes I believe that is possible, I'll do that.
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
PATCH v3 4/19 j721e: schema: yaml: Add general schema and J721E board config files
In reply to Neha Malcom FrancisSchema file in YAML must be provided in board/ti/common for validating input config files and packaging system firmware. The schema includes entries for rm-cfg, board-cfg, pm-cfg and sec-cfg.
Board config files must be provided in board/ti/<devicename> in YAML. These can then be consumed for generation of binaries to package system firmware. Added YAML configs for J721E in particular.
--- board/ti/common/schema.yaml | 355 +++++ board/ti/j721e/board-cfg.yaml | 37 + board/ti/j721e/pm-cfg.yaml | 13 + board/ti/j721e/rm-cfg.yaml | 2757 +++++++++++++++++++++++++++++++++ board/ti/j721e/sec-cfg.yaml | 379 +++++ 5 files changed, 3541 insertions(+) create mode 100644 board/ti/common/schema.yaml create mode 100644 board/ti/j721e/board-cfg.yaml create mode 100644 board/ti/j721e/pm-cfg.yaml create mode 100644 board/ti/j721e/rm-cfg.yaml create mode 100644 board/ti/j721e/sec-cfg.yaml
board/ti/common/schema.yaml new file +355 -0
@@ -0,0 +1,355 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Config schema for TI K3 devices +# + +--- + +definitions: + u8: + type: integer + minimum: 0 + maximum: 0xff + u16: + type: integer + minimum: 0 + maximum: 0xffff + u32: + type: integer + minimum: 0 + maximum: 0xffffffff + + + +type: object +properties: + pm-cfg: + type: object + properties: + rev: + type: object + properties: + boardcfg_abi_maj: + $ref: "#/definitions/u8" + boardcfg_abi_min: + $ref: "#/definitions/u8" + board-cfg: + type: object + properties: + rev: + type: object + properties: + boardcfg_abi_maj: + $ref: "#/definitions/u8" + boardcfg_abi_min: + $ref: "#/definitions/u8" + control: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + main_isolation_enable: + $ref: "#/definitions/u8" + main_isolation_hostid: + $ref: "#/definitions/u16" + + + secproxy: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + scaling_factor: + $ref: "#/definitions/u8" + scaling_profile: + $ref: "#/definitions/u8" + disable_main_nav_secure_proxy: + $ref: "#/definitions/u8" + + msmc: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + msmc_cache_size: + $ref: "#/definitions/u8" + debug_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + trace_dst_enables: + $ref: "#/definitions/u16" + trace_src_enables: + $ref: "#/definitions/u16" + + sec-cfg: + type: object + properties: + rev: + type: object + properties: + boardcfg_abi_maj: + $ref: "#/definitions/u8" + boardcfg_abi_min: + $ref: "#/definitions/u8" + + processor_acl_list: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + proc_acl_entries: + type: array + minItems: 32 + maxItems: 32 + items: + type: object + properties: + processor_id: + $ref: "#/definitions/u8" + proc_access_master: + $ref: "#/definitions/u8" + proc_access_secondary: + type: array + minItems: 3 + maxItems: 3 + items: + $ref: "#/definitions/u8" + host_hierarchy: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + host_hierarchy_entries: + type: array + minItems: 32 + maxItems: 32 + items: + type: object + properties: + host_id: + $ref: "#/definitions/u8" + supervisor_host_id: + $ref: "#/definitions/u8" + + otp_config: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + otp_entry: + type: array + minItems: 32 + maxItems: 32 + items: + type: object + properties: + host_id: + $ref: "#/definitions/u8" + host_perms: + $ref: "#/definitions/u8" + write_host_id: + $ref: "#/definitions/u8" + + dkek_config: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + allowed_hosts: + type: array + minItems: 4 + maxItems: 4 + items: + $ref: "#/definitions/u8" + allow_dkek_export_tisci: + $ref: "#/definitions/u8" + rsvd: + type: array + minItems: 3 + maxItems: 3 + items: + $ref: "#/definitions/u8" + + sa2ul_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + rsvd: + type: array + minItems: 4 + maxItems: 4 + items: + $ref: "#/definitions/u8" + sec_dbg_config: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + allow_jtag_unlock: + $ref: "#/definitions/u8" + allow_wildcard_unlock: + $ref: "#/definitions/u8" + allowed_debug_level_rsvd: + $ref: "#/definitions/u8" + rsvd: + $ref: "#/definitions/u8" + min_cert_rev: + $ref: "#/definitions/u32" + jtag_unlock_hosts: + type: array + minItems: 4 + maxItems: 4 + items: + $ref: "#/definitions/u8" + + + sec_handover_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + handover_msg_sender: + $ref: "#/definitions/u8" + handover_to_host_id: + $ref: "#/definitions/u8" + rsvd: + type: array + minItems: 4 + maxItems: 4 + items: + $ref: "#/definitions/u8" + + rm-cfg: + type: object + properties: + rm_boardcfg: + type: object + properties: + rev: + type: object + properties: + boardcfg_abi_maj: + $ref: "#/definitions/u8" + boardcfg_abi_min: + $ref: "#/definitions/u8" + + host_cfg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + host_cfg_entries: + type: array + minItems: 0 + maxItems: 32 + items: + type: object + properties: + host_id: + $ref: "#/definitions/u8" + allowed_atype: + $ref: "#/definitions/u8" + allowed_qos: + $ref: "#/definitions/u16" + allowed_orderid: + $ref: "#/definitions/u32" + allowed_priority: + $ref: "#/definitions/u16" + allowed_sched_priority: + $ref: "#/definitions/u8" + resasg: + type: object + properties: + subhdr: + type: object + properties: + magic: + $ref: "#/definitions/u16" + size: + $ref: "#/definitions/u16" + resasg_entries_size: + $ref: "#/definitions/u16" + reserved: + $ref: "#/definitions/u16" + + resasg_entries: + type: array + minItems: 0 + maxItems: 418 + items: + type: object + properties: + start_resource: + $ref: "#/definitions/u16" + num_resource: + $ref: "#/definitions/u16" + type: + $ref: "#/definitions/u16" + host_id: + $ref: "#/definitions/u8" + reserved: + $ref: "#/definitions/u8"
board/ti/j721e/board-cfg.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for J721E +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable: 0x5A + main_isolation_hostid: 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor: 0x1 + scaling_profile: 0x1 + disable_main_nav_secure_proxy: 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size: 0x0 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables: 0x00 + trace_src_enables: 0x00 +
board/ti/j721e/pm-cfg.yaml new file +13 -0
@@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for J721E +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj: 0x0 + boardcfg_abi_min: 0x1 +
board/ti/j721e/rm-cfg.yaml new file +2757 -0
2,595 lines not on this page · raw message
board/ti/j721e/sec-cfg.yaml new file +379 -0
379 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
PATCH v3 5/19 j721e: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
In reply to Neha Malcom FrancisBy providing entries in the binman node of the device tree, binman will be able to find and package board config artifacts generated by TIBoardConfig with sysfw.bin and generate the final image sysfw.itb. It will also pick out the R5 SPL and sign it with the help of TI signing entry and generate the final tiboot3.bin.
Entries for A72 build have been added to k3-j721e-binman.dtsi to generate tispl.bin and u-boot.img.
Support has been added for both HS-SE(SR 1.1), HS-FS(SR 2.0) and GP images In HS-SE, the encrypted system firmware binary must be signed along with the signed certificate binary.
tiboot3.bin and sysfw-j721e_sr1_1-hs.itb: For HS-SE devices tiboot3.bin_fs and sysfw-j721e_sr2-hs-fs.itb: For HS-FS devices tiboot3.bin_unsigned and sysfw-j721e-gp-evm.itb: For GP devices <filename>.bin/img: For HS devices <filename>.bin_unsigned/img_unsigned: For GP devices
Intention of patch is to move signing and packaging to binman, thus making makefile target only if binman is not enabled.
It is to be noted that the bootflow followed by J721E requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
sysfw.itb:
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbs
u-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
--- arch/arm/dts/k3-j721e-binman.dtsi | 732 ++++++++++++++++++ .../k3-j721e-common-proc-board-u-boot.dtsi | 1 + .../arm/dts/k3-j721e-r5-common-proc-board.dts | 1 + arch/arm/mach-k3/config.mk | 4 + board/ti/j721e/Kconfig | 2 + scripts/Makefile.spl | 2 + 6 files changed, 742 insertions(+) create mode 100644 arch/arm/dts/k3-j721e-binman.dtsi
arch/arm/dts/k3-j721e-binman.dtsi new file +732 -0
@@ -0,0 +1,732 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +#ifdef CONFIG_TARGET_J721E_R5_EVM + +&binman { + board-cfg { + filename = "board-cfg.bin"; + ti-board-config { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + pm-cfg { + filename = "pm-cfg.bin"; + ti-board-config { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + rm-cfg { + filename = "rm-cfg.bin"; + ti-board-config { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + sec-cfg { + filename = "sec-cfg.bin"; + ti-board-config { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + tiboot3 { + filename = "tiboot3.bin"; + ti-secure-rom { + content = <&u_boot_spl>; + core = "public"; + load = <CONFIG_SPL_TEXT_BASE>; + keyfile = "custMpk.pem"; + }; + u_boot_spl: u-boot-spl { + no-expanded; + }; + }; + sysfw { + filename = "sysfw.bin"; + ti-secure-rom { + content = <&ti_fs_cert>; + core = "secure"; + load = <0x40000>; + keyfile = "custMpk.pem"; + countersign; + }; + ti_fs_cert: ti-fs-cert.bin { + filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + ti-fs-firmware-j721e_sr1_1-hs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + }; + itb { + filename = "sysfw-j721e_sr1_1-hs.itb"; + fit { + description = "SYSFW and Config fragments"; + #address-cells = <1>; + images { + sysfw.bin { + description = "sysfw"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sysfw.bin"; + }; + }; + board-cfg.bin { + description = "board-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&board_cfg>; + keyfile = "custMpk.pem"; + }; + board_cfg: board-cfg { + filename = "board-cfg.bin"; + type = "blob-ext"; + }; + + }; + pm-cfg.bin { + description = "pm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&pm_cfg>; + keyfile = "custMpk.pem"; + }; + pm_cfg: pm-cfg { + filename = "pm-cfg.bin"; + type = "blob-ext"; + }; + }; + rm-cfg.bin { + description = "rm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&rm_cfg>; + keyfile = "custMpk.pem"; + }; + rm_cfg: rm-cfg { + filename = "rm-cfg.bin"; + type = "blob-ext"; + }; + }; + sec-cfg.bin { + description = "sec-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&sec_cfg>; + keyfile = "custMpk.pem"; + }; + sec_cfg: sec-cfg { + filename = "sec-cfg.bin"; + type = "blob-ext"; + }; + }; + }; + }; + }; +}; + +&binman { + tiboot3_fs { + filename = "tiboot3.bin_fs"; + ti-secure-rom { + content = <&u_boot_spl_fs>; + core = "public"; + load = <CONFIG_SPL_TEXT_BASE>; + keyfile = "custMpk.pem"; + }; + u_boot_spl_fs: u-boot-spl { + no-expanded; + }; + }; + sysfw_fs { + filename = "sysfw.bin_fs"; + ti-fs-cert-fs.bin { + filename = "ti-sysfw/ti-fs-firmware-j721e_sr2-hs-fs-cert.bin"; + type = "blob-ext"; + optional; + }; + ti-fs-firmware-j721e-hs-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j721e_sr2-hs-fs-enc.bin"; + type = "blob-ext"; + optional; + }; + }; + itb_fs { + filename = "sysfw-j721e_sr2-hs-fs.itb"; + fit { + description = "SYSFW and Config fragments"; + #address-cells = <1>; + images { + sysfw.bin { + description = "sysfw"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sysfw.bin_fs"; + }; + }; + board-cfg.bin { + description = "board-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + board-cfg { + filename = "board-cfg.bin"; + type = "blob-ext"; + }; + + }; + pm-cfg.bin { + description = "pm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + pm-cfg { + filename = "pm-cfg.bin"; + type = "blob-ext"; + }; + }; + rm-cfg.bin { + description = "rm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + rm-cfg { + filename = "rm-cfg.bin"; + type = "blob-ext"; + }; + }; + sec-cfg.bin { + description = "sec-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + sec-cfg { + filename = "sec-cfg.bin"; + type = "blob-ext"; + }; + }; + }; + }; + }; +}; + +&binman { + tiboot3_unsigned { + filename = "tiboot3.bin_unsigned"; + ti-secure-rom { + content = <&u_boot_spl_unsigned>; + core = "public"; + load = <CONFIG_SPL_TEXT_BASE>; + sw-rev = <CONFIG_K3_X509_SWRV>; + keyfile = "ti-degenerate-key.pem"; + }; + u_boot_spl_unsigned: u-boot-spl { + no-expanded; + }; + }; + sysfw_gp { + filename = "sysfw.bin_gp"; + ti-secure-rom { + content = <&ti_fs>; + core = "secure"; + load = <0x40000>; + sw-rev = <CONFIG_K3_X509_SWRV>; + keyfile = "ti-degenerate-key.pem"; + }; + ti_fs: ti-fs.bin { + filename = "ti-sysfw/ti-fs-firmware-j721e-gp.bin"; + type = "blob-ext"; + optional; + }; + }; + itb_gp { + filename = "sysfw-j721e-gp-evm.itb"; + symlink = "sysfw.itb"; + fit { + description = "SYSFW and Config fragments"; + #address-cells = <1>; + images { + sysfw.bin { + description = "sysfw"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sysfw.bin_gp"; + }; + }; + board-cfg.bin { + description = "board-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "board-cfg.bin"; + }; + }; + pm-cfg.bin { + description = "pm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "pm-cfg.bin"; + }; + }; + rm-cfg.bin { + description = "rm-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "rm-cfg.bin"; + }; + }; + sec-cfg.bin { + description = "sec-cfg"; + type = "firmware"; + arch = "arm"; + compression = "none"; + blob-ext { + filename = "sec-cfg.bin"; + }; + }; + }; + }; + }; +}; +#endif + +#ifdef CONFIG_TARGET_J721E_A72_EVM + +#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" +#define SPL_J721E_EVM_DTB "spl/dts/k3-j721e-common-proc-board.dtb" +#define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb" + +#define UBOOT_NODTB "u-boot-nodtb.bin" +#define J721E_EVM_DTB "arch/arm/dts/k3-j721e-common-proc-board.dtb" +#define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb" + +&binman { + ti-dm { + filename = "ti-dm.bin"; + blob-ext { + filename = "ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f"; + }; + }; + ti-spl { + filename = "tispl.bin"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + ti-secure { + content = <&atf>; + keyfile = "custMpk.pem"; + }; + atf: atf-bl31 { + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + ti-secure { + content = <&tee>; + keyfile = "custMpk.pem"; + }; + tee: tee-os { + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + ti-secure { + content = <&dm>; + keyfile = "custMpk.pem"; + }; + dm: blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + ti-secure { + content = <&u_boot_spl_nodtb>; + keyfile = "custMpk.pem"; + + }; + u_boot_spl_nodtb: blob-ext { + filename = SPL_NODTB; + }; + }; + + fdt-0 { + description = "k3-j721e-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_j721e_evm_dtb>; + keyfile = "custMpk.pem"; + }; + spl_j721e_evm_dtb: blob-ext { + filename = SPL_J721E_EVM_DTB; + }; + }; + + fdt-1 { + description = "k3-j721e-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_j721e_sk_dtb>; + keyfile = "custMpk.pem"; + + }; + spl_j721e_sk_dtb: blob-ext { + filename = SPL_J721E_SK_DTB; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721e-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + + conf-1 { + description = "k3-j721e-sk"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + u-boot { + filename = "u-boot.img"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for j721e board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + ti-secure { + content = <&u_boot_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_nodtb: u-boot-nodtb { + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-j721e-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&j721e_evm_dtb>; + keyfile = "custMpk.pem"; + + }; + j721e_evm_dtb: blob-ext { + filename = J721E_EVM_DTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-1 { + description = "k3-j721e-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&j721e_sk_dtb>; + keyfile = "custMpk.pem"; + + }; + j721e_sk_dtb: blob-ext { + filename = J721E_SK_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721e-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + + conf-1 { + description = "k3-j721e-sk"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + ti-spl_unsigned { + filename = "tispl.bin_unsigned"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + tee-os { + filename = "tee-pager_v2.bin"; + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + blob-ext { + filename = SPL_NODTB; + }; + }; + + fdt-0 { + description = "k3-j721e-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_J721E_EVM_DTB; + }; + }; + + fdt-1 { + description = "k3-j721e-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_J721E_SK_DTB; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721e-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + + conf-1 { + description = "k3-j721e-sk"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + u-boot_unsigned { + filename = "u-boot.img_unsigned"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for j721e board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + blob { + filename = UBOOT_NODTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-j721e-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = J721E_EVM_DTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-1 { + description = "k3-j721e-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = J721E_SK_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721e-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + + conf-1 { + description = "k3-j721e-sk"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; +#endif
arch/arm/dts/k3-j721e-common-proc-board-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include <dt-bindings/net/ti-dp83867.h> +#include "k3-j721e-binman.dtsi" / { chosen {
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +1 -0
@@ -8,6 +8,7 @@ #include "k3-j721e-som-p0.dtsi" #include "k3-j721e-ddr-evm-lp4-4266.dtsi" #include "k3-j721e-ddr.dtsi" +#include "k3-j721e-binman.dtsi" #include <dt-bindings/phy/phy-cadence.h> / {
arch/arm/mach-k3/config.mk +4 -0
@@ -91,6 +91,7 @@ endif # tiboot3.bin is mandated by ROM and ROM only supports R5 boot. # So restrict tiboot3.bin creation for CPU_V7R. +ifndef CONFIG_BINMAN ifdef CONFIG_CPU_V7R image_check: $(obj)/u-boot-spl.bin FORCE @if [ $(IMAGE_SIZE) -gt $(MAX_SIZE) ]; then \
@@ -107,6 +108,7 @@ tiboot3.bin: image_check FORCE INPUTS-y += tiboot3.bin endif +endif ifdef CONFIG_ARM64
@@ -114,6 +116,7 @@ ifeq ($(CONFIG_SOC_K3_J721E),) export DM := /dev/null endif +ifndef CONFIG_BINMAN ifeq ($(CONFIG_TI_SECURE_DEVICE),y) SPL_ITS := u-boot-spl-k3_HS.its $(SPL_ITS): export IS_HS=1
@@ -122,6 +125,7 @@ else SPL_ITS := u-boot-spl-k3.its INPUTS-y += tispl.bin endif +endif ifeq ($(CONFIG_SPL_OF_LIST),) LIST_OF_DTB := $(CONFIG_DEFAULT_DEVICE_TREE)
board/ti/j721e/Kconfig +2 -0
@@ -13,6 +13,7 @@ config TARGET_J721E_A72_EVM select BOARD_LATE_INIT imply TI_I2C_BOARD_DETECT select SYS_DISABLE_DCACHE_OPS + select BINMAN config TARGET_J721E_R5_EVM bool "TI K3 based J721E EVM running on R5"
@@ -22,6 +23,7 @@ config TARGET_J721E_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
scripts/Makefile.spl +2 -0
@@ -593,6 +593,8 @@ $(obj)/$(SPL_BIN).multidtb.fit.lzo: $(obj)/$(SPL_BIN).multidtb.fit @lzop -f9 $< > $@ ifdef CONFIG_ARCH_K3 +ifndef CONFIG_BINMAN tispl.bin: $(obj)/u-boot-spl-nodtb.bin $(SHRUNK_ARCH_DTB) $(SPL_ITS) FORCE $(call if_changed,mkfitimage) endif +endif
Signature · 1 line
2.34.1
Re: [PATCH v3 05/19] j721e: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
Quoted 48 lines · Neha Malcom Francis
By providing entries in the binman node of the device tree, binman will be able to find and package board config artifacts generated by TIBoardConfig with sysfw.bin and generate the final image sysfw.itb. It will also pick out the R5 SPL and sign it with the help of TI signing entry and generate the final tiboot3.bin.
Entries for A72 build have been added to
k3-j721e-binman.dtsito generate tispl.bin and u-boot.img.Support has been added for both HS-SE(SR 1.1), HS-FS(SR 2.0) and GP images In HS-SE, the encrypted system firmware binary must be signed along with the signed certificate binary.
tiboot3.bin and sysfw-j721e_sr1_1-hs.itb: For HS-SE devices tiboot3.bin_fs and sysfw-j721e_sr2-hs-fs.itb: For HS-FS devices tiboot3.bin_unsigned and sysfw-j721e-gp-evm.itb: For GP devices <filename>.bin/img: For HS devices <filename>.bin_unsigned/img_unsigned: For GP devices
Intention of patch is to move signing and packaging to binman, thus making makefile target only if binman is not enabled.
It is to be noted that the bootflow followed by J721E requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbssysfw.itb:
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbsu-boot.img:
* A72 U-Boot
* A72 U-Boot dtbsSigned-off-by Neha Malcom Francis <[email protected]>
Quoted 9 lines
--- arch/arm/dts/k3-j721e-binman.dtsi | 732 ++++++++++++++++++ .../k3-j721e-common-proc-board-u-boot.dtsi | 1 + .../arm/dts/k3-j721e-r5-common-proc-board.dts | 1 + arch/arm/mach-k3/config.mk | 4 + board/ti/j721e/Kconfig | 2 + scripts/Makefile.spl | 2 + 6 files changed, 742 insertions(+) create mode 100644 arch/arm/dts/k3-j721e-binman.dtsi
Wow this is complicated!
PATCH v3 6/19 j7200: yaml: Add J7200 board config files
In reply to Neha Malcom FrancisAdded YAML configs for J7200
--- board/ti/j721e/board-cfg_j7200.yaml | 36 + board/ti/j721e/pm-cfg_j7200.yaml | 12 + board/ti/j721e/rm-cfg_j7200.yaml | 2065 +++++++++++++++++++++++++++ board/ti/j721e/sec-cfg_j7200.yaml | 378 +++++ 4 files changed, 2491 insertions(+) create mode 100644 board/ti/j721e/board-cfg_j7200.yaml create mode 100644 board/ti/j721e/pm-cfg_j7200.yaml create mode 100644 board/ti/j721e/rm-cfg_j7200.yaml create mode 100644 board/ti/j721e/sec-cfg_j7200.yaml
board/ti/j721e/board-cfg_j7200.yaml new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for J7200 +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x10 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00
board/ti/j721e/pm-cfg_j7200.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for J7200 +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/j721e/rm-cfg_j7200.yaml new file +2065 -0
2,065 lines not on this page · raw message
board/ti/j721e/sec-cfg_j7200.yaml new file +378 -0
378 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 7/19 j7200: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for J7200.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned and u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by J7200 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbs
u-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
--- arch/arm/dts/k3-j7200-binman.dtsi | 529 ++++++++++++++++++ .../k3-j7200-common-proc-board-u-boot.dtsi | 2 + board/ti/j721e/Kconfig | 2 + 3 files changed, 533 insertions(+) create mode 100644 arch/arm/dts/k3-j7200-binman.dtsi
arch/arm/dts/k3-j7200-binman.dtsi new file +529 -0
@@ -0,0 +1,529 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +#ifdef CONFIG_TARGET_J7200_R5_EVM + +&binman { + board-cfg { + filename = "board-cfg.bin"; + ti-board-config { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + pm-cfg { + filename = "pm-cfg.bin"; + ti-board-config { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + rm-cfg { + filename = "rm-cfg.bin"; + ti-board-config { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + sec-cfg { + filename = "sec-cfg.bin"; + ti-board-config { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + + combined-tifs-cfg { + filename = "combined-tifs-cfg.bin"; + ti-board-config { + board-cfg { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + sec-cfg { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + }; + combined-dm-cfg { + filename = "combined-dm-cfg.bin"; + ti-board-config { + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + }; + + tiboot3 { + filename = "tiboot3.bin"; + ti-secure-rom { + content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>, + <&combined_dm_cfg>, <&sysfw_inner_cert>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl>; + content-sysfw = <&ti_fs_enc>; + content-sysfw-data = <&combined_tifs_cfg>; + content-sysfw-inner-cert = <&sysfw_inner_cert>; + content-dm-data = <&combined_dm_cfg>; + load = <0x41c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x7f000>; + load-dm-data = <0x41c80000>; + }; + u_boot_spl: u-boot-spl { + no-expanded; + }; + ti_fs_enc: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j7200-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-j7200-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +&binman { + tiboot3_fs { + filename = "tiboot3.bin_fs"; + ti-secure-rom { + content = <&u_boot_spl_fs>, <&ti_fs_enc_fs>, <&combined_tifs_cfg_fs>, + <&combined_dm_cfg_fs>, <&sysfw_inner_cert_fs>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl_fs>; + content-sysfw = <&ti_fs_enc_fs>; + content-sysfw-data = <&combined_tifs_cfg_fs>; + content-sysfw-inner-cert = <&sysfw_inner_cert_fs>; + content-dm-data = <&combined_dm_cfg_fs>; + load = <0x41c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x7f000>; + load-dm-data = <0x41c80000>; + }; + u_boot_spl_fs: u-boot-spl { + no-expanded; + }; + ti_fs_enc_fs: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j7200-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_fs: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert_fs: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-j7200-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg_fs: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +&binman { + tiboot3_unsigned { + filename = "tiboot3.bin_unsigned"; + ti-secure-rom { + content = <&u_boot_spl_unsigned>, <&ti_fs_gp>, + <&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>; + combined; + dm-data; + content-sbl = <&u_boot_spl_unsigned>; + load = <0x41c00000>; + content-sysfw = <&ti_fs_gp>; + load-sysfw = <0x40000>; + content-sysfw-data = <&combined_tifs_cfg_gp>; + load-sysfw-data = <0x7f000>; + content-dm-data = <&combined_dm_cfg_gp>; + load-dm-data = <0x41c80000>; + sw-rev = <1>; + keyfile = "ti-degenerate-key.pem"; + }; + u_boot_spl_unsigned: u-boot-spl { + no-expanded; + }; + ti_fs_gp: ti-fs-gp.bin { + filename = "ti-sysfw/ti-fs-firmware-j7200-gp.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + combined_dm_cfg_gp: combined-dm-cfg-gp.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +#endif + +#ifdef CONFIG_TARGET_J7200_A72_EVM + +#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" +#define SPL_J7200_EVM_DTB "spl/dts/k3-j7200-common-proc-board.dtb" + +#define UBOOT_NODTB "u-boot-nodtb.bin" +#define J7200_EVM_DTB "arch/arm/dts/k3-j7200-common-proc-board.dtb" + +&binman { + ti-dm { + filename = "ti-dm.bin"; + blob-ext { + filename = "ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f"; + }; + }; + ti-spl { + filename = "tispl.bin"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + ti-secure { + content = <&atf>; + keyfile = "custMpk.pem"; + }; + atf: atf-bl31 { + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + ti-secure { + content = <&tee>; + keyfile = "custMpk.pem"; + }; + tee: tee-os { + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + ti-secure { + content = <&dm>; + keyfile = "custMpk.pem"; + }; + + dm: blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + ti-secure { + content = <&u_boot_spl_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_spl_nodtb: blob-ext { + filename = SPL_NODTB; + }; + }; + + fdt-0 { + description = "k3-j7200-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_j7200_evm_dtb>; + keyfile = "custMpk.pem"; + }; + spl_j7200_evm_dtb: blob-ext { + filename = SPL_J7200_EVM_DTB; + }; + }; + + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j7200-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + }; + }; + }; +}; + +&binman { + u-boot { + filename = "u-boot.img"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for J7200 board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + ti-secure { + content = <&u_boot_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_nodtb: u-boot-nodtb { + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-j7200-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&j7200_evm_dtb>; + keyfile = "custMpk.pem"; + }; + j7200_evm_dtb: blob-ext { + filename = J7200_EVM_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j7200-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + + }; + }; + }; +}; + +&binman { + ti-spl_unsigned { + filename = "tispl.bin_unsigned"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + tee-os { + filename = "tee-pager_v2.bin"; + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + blob { + filename = SPL_NODTB; + }; + }; + + fdt-1 { + description = "k3-j7200-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_J7200_EVM_DTB; + }; + }; + }; + + configurations { + default = "conf-1"; + + conf-1 { + description = "k3-j7200-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + u-boot_unsigned { + filename = "u-boot.img_unsigned"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for J7200 board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + blob { + filename = UBOOT_NODTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-1 { + description = "k3-j7200-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = J7200_EVM_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-1"; + + conf-1 { + description = "k3-j7200-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; +#endif
arch/arm/dts/k3-j7200-common-proc-board-u-boot.dtsi +2 -0
@@ -3,6 +3,8 @@ * Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ */ +#include "k3-j7200-binman.dtsi" + / { chosen { stdout-path = "serial2:115200n8";
board/ti/j721e/Kconfig +2 -0
@@ -33,6 +33,7 @@ config TARGET_J7200_A72_EVM select BOARD_LATE_INIT imply TI_I2C_BOARD_DETECT select SYS_DISABLE_DCACHE_OPS + select BINMAN config TARGET_J7200_R5_EVM bool "TI K3 based J7200 EVM running on R5"
@@ -42,6 +43,7 @@ config TARGET_J7200_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
Signature · 1 line
2.34.1
Re: [PATCH v3 07/19] j7200: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
Quoted 30 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for J7200.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned and u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by J7200 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbsu-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
Quoted 7 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-j7200-binman.dtsi | 529 ++++++++++++++++++ .../k3-j7200-common-proc-board-u-boot.dtsi | 2 + board/ti/j721e/Kconfig | 2 + 3 files changed, 533 insertions(+) create mode 100644 arch/arm/dts/k3-j7200-binman.dtsi
PATCH v3 8/19 am65x: yaml: Add AM65x board config files
In reply to Neha Malcom FrancisAdded YAML configs for AM65x
--- board/ti/am65x/board-cfg.yaml | 36 + board/ti/am65x/pm-cfg.yaml | 12 + board/ti/am65x/rm-cfg.yaml | 2068 +++++++++++++++++++++++++++++++++ board/ti/am65x/sec-cfg.yaml | 375 ++++++ 4 files changed, 2491 insertions(+) create mode 100644 board/ti/am65x/board-cfg.yaml create mode 100644 board/ti/am65x/pm-cfg.yaml create mode 100644 board/ti/am65x/rm-cfg.yaml create mode 100644 board/ti/am65x/sec-cfg.yaml
board/ti/am65x/board-cfg.yaml new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for AM65x +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x10 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00
board/ti/am65x/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for AM65x +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/am65x/rm-cfg.yaml new file +2068 -0
2,068 lines not on this page · raw message
board/ti/am65x/sec-cfg.yaml new file +375 -0
375 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 9/19 am65: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for AM65x.
tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img: For HS devices tiboot3.bin_unsigned, sysfw.itb, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM65x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
sysfw.itb:
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbs
u-boot.img:
* A53 U-Boot
* A53 U-Boot dtbs
--- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 1 + .../dts/k3-am654-r5-base-board-u-boot.dtsi | 1 + arch/arm/dts/k3-am65x-binman.dtsi | 551 ++++++++++++++++++ board/ti/am65x/Kconfig | 2 + 4 files changed, 555 insertions(+) create mode 100644 arch/arm/dts/k3-am65x-binman.dtsi
arch/arm/dts/k3-am654-base-board-u-boot.dtsi +1 -0
@@ -4,6 +4,7 @@ */ #include "k3-am654-r5-base-board-u-boot.dtsi" +#include "k3-am65x-binman.dtsi" &pru0_0 { remoteproc-name = "pru0_0";
arch/arm/dts/k3-am654-r5-base-board-u-boot.dtsi +1 -0
@@ -5,6 +5,7 @@ #include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/net/ti-dp83867.h> +#include "k3-am65x-binman.dtsi" / { chosen {
arch/arm/dts/k3-am65x-binman.dtsi new file +551 -0
551 lines not on this page · raw message
board/ti/am65x/Kconfig +2 -0
@@ -12,6 +12,7 @@ config TARGET_AM654_A53_EVM select ARM64 select SYS_DISABLE_DCACHE_OPS select BOARD_LATE_INIT + select BINMAN imply TI_I2C_BOARD_DETECT config TARGET_AM654_R5_EVM
@@ -20,6 +21,7 @@ config TARGET_AM654_R5_EVM select SYS_THUMB_BUILD select K3_LOAD_SYSFW select K3_AM654_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
Signature · 1 line
2.34.1
Re: [PATCH v3 09/19] am65: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM65x.
tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img: For HS devices tiboot3.bin_unsigned, sysfw.itb, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM65x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
sysfw.itb:
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbs
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 1 + .../dts/k3-am654-r5-base-board-u-boot.dtsi | 1 + arch/arm/dts/k3-am65x-binman.dtsi | 551 ++++++++++++++++++ board/ti/am65x/Kconfig | 2 + 4 files changed, 555 insertions(+) create mode 100644 arch/arm/dts/k3-am65x-binman.dtsi
Is there any way that these boards could share a .dtsi with just the different bits in each board's dtsi? There seems to be a lot of duplicate.
Regards,
Simon
Re: [PATCH v3 09/19] am65: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
Hi Simon,
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM65x.
tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img: For HS devices tiboot3.bin_unsigned, sysfw.itb, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM65x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
sysfw.itb:
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbsQuoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 1 + .../dts/k3-am654-r5-base-board-u-boot.dtsi | 1 + arch/arm/dts/k3-am65x-binman.dtsi | 551 ++++++++++++++++++ board/ti/am65x/Kconfig | 2 + 4 files changed, 555 insertions(+)create mode 100644
arch/arm/dts/k3-am65x-binman.dtsi
Quoted 6 lines
Reviewed-by Simon Glass <[email protected]>Is there any way that these boards could share a .dtsi with just the different bits in each board's dtsi? There seems to be a lot of duplicate.
Maybe a common k3-binman.dtsi, but the common nodes (where the filenames of both the generated file as well as component files are all common) would be the ti-board-config ones... and if we change that as per last review comment to point to board/ti/<device>/config.bin then we'd have that particular to each device as well right?
Or do you mean to say we use #defines for all?
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH v3 09/19] am65: dts: binman: Package tiboot3.bin, sysfw.itb, tispl.bin, u-boot.img
Hi Neha,
Quoted 52 lines · Neha Malcom Francis
Hi Simon,
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM65x.
tiboot3.bin, sysfw.itb, tispl.bin and u-boot.img: For HS devices tiboot3.bin_unsigned, sysfw.itb, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM65x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
sysfw.itb:
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbsQuoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 1 + .../dts/k3-am654-r5-base-board-u-boot.dtsi | 1 + arch/arm/dts/k3-am65x-binman.dtsi | 551 ++++++++++++++++++ board/ti/am65x/Kconfig | 2 + 4 files changed, 555 insertions(+)create mode 100644
arch/arm/dts/k3-am65x-binman.dtsiQuoted 6 lines
Reviewed-by Simon Glass <[email protected]>Is there any way that these boards could share a .dtsi with just the different bits in each board's dtsi? There seems to be a lot of duplicate.
Quoted 7 lines
Maybe a common
k3-binman.dtsi, but the common nodes (where the filenames of both the generated file as well as component files are all common) would be the ti-board-config ones... and if we change that as per last review comment to point to board/ti/<device>/config.bin then we'd have that particular to each device as well right?Or do you mean to say we use #defines for all?
No I just mean having a common .dtsi as you say above.
You can still override things in that if you want to, by adding a phandle and then referencing it in the board-specific file.
Regards,
Simon
PATCH v3 10/19 am64x: yaml: Add board configs for AM64x
In reply to Neha Malcom FrancisAdded YAML configs for AM64xx
--- board/ti/am64x/board-cfg.yaml | 37 + board/ti/am64x/pm-cfg.yaml | 12 + board/ti/am64x/rm-cfg.yaml | 1400 +++++++++++++++++++++++++++++++++ board/ti/am64x/sec-cfg.yaml | 378 +++++++++ 4 files changed, 1827 insertions(+) create mode 100644 board/ti/am64x/board-cfg.yaml create mode 100644 board/ti/am64x/pm-cfg.yaml create mode 100644 board/ti/am64x/rm-cfg.yaml create mode 100644 board/ti/am64x/sec-cfg.yaml
board/ti/am64x/board-cfg.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for AM64x +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x0 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00 +
board/ti/am64x/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for AM64x +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/am64x/rm-cfg.yaml new file +1400 -0
1,400 lines not on this page · raw message
board/ti/am64x/sec-cfg.yaml new file +378 -0
378 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 11/19 am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for AM64x.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM64x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbs
u-boot.img:
* A53 U-Boot
* A53 U-Boot dtbs
--- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++++++++++++++++++++++++ board/ti/am64x/Kconfig | 2 + 4 files changed, 574 insertions(+) create mode 100644 arch/arm/dts/k3-am64x-binman.dtsi
arch/arm/dts/k3-am642-evm-u-boot.dtsi +2 -0
@@ -3,6 +3,8 @@ * Copyright (C) 2020-2021 Texas Instruments Incorporated - https://www.ti.com/ */ +#include "k3-am64x-binman.dtsi" + / { chosen { stdout-path = "serial2:115200n8";
arch/arm/dts/k3-am642-r5-evm.dts +1 -0
@@ -8,6 +8,7 @@ #include "k3-am642.dtsi" #include "k3-am64-evm-ddr4-1600MTs.dtsi" #include "k3-am64-ddr.dtsi" +#include "k3-am64x-binman.dtsi" / { chosen {
arch/arm/dts/k3-am64x-binman.dtsi new file +569 -0
569 lines not on this page · raw message
board/ti/am64x/Kconfig +2 -0
@@ -9,6 +9,7 @@ choice config TARGET_AM642_A53_EVM bool "TI K3 based AM642 EVM running on A53" select ARM64 + select BINMAN imply BOARD imply SPL_BOARD imply TI_I2C_BOARD_DETECT
@@ -21,6 +22,7 @@ config TARGET_AM642_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
Signature · 1 line
2.34.1
Re: [PATCH v3 11/19] am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM64x.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM64x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbs
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++++++++++++++++++++++++ board/ti/am64x/Kconfig | 2 + 4 files changed, 574 insertions(+) create mode 100644 arch/arm/dts/k3-am64x-binman.dtsi
I notice that some of the entries are optional. Do you actual make use of this (i.e. that when they are missing binman removes the entries)?
Regards,
Simon
Re: [PATCH v3 11/19] am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
Hi Simon
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM64x.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM64x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbsQuoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++++++++++++++++++++++++ board/ti/am64x/Kconfig | 2 + 4 files changed, 574 insertions(+)create mode 100644
arch/arm/dts/k3-am64x-binman.dtsi
Quoted 5 lines
Reviewed-by Simon Glass <[email protected]>I notice that some of the entries are optional. Do you actual make use of this (i.e. that when they are missing binman removes the entries)?
So right now the build generates binaries for all three types: HS-FS, HS-SE and GP devices. It's not necessary for the user to provide component binaries for all three of them, say they only have GP SYSFW binaries available with them. So that was the reasoning behind putting those binaries as optional, we should not have a failed build in those cases. However binaries like DM and board-config binaries that are common between all three needs to be there so it's not optional.
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH v3 11/19] am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
Quoted 44 lines · Neha Malcom Francis
Hi Simon
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 37 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM64x.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM64x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbsSigned-off-by Neha Malcom Francis <[email protected]>---
arch/arm/dts/k3-am642-evm-u-boot.dtsi| 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++++++++++++++++++++++++ board/ti/am64x/Kconfig | 2 +4 files changed, 574 insertions(+)create mode 100644
arch/arm/dts/k3-am64x-binman.dtsi
Quoted 7 lines
Quoted 5 lines
Reviewed-by Simon Glass <[email protected]>I notice that some of the entries are optional. Do you actual make use of this (i.e. that when they are missing binman removes the entries)?
So right now the build generates binaries for all three types: HS-FS, HS-SE and GP devices. It's not necessary for the user to provide component binaries for all three of them, say they only have GP SYSFW binaries available with them.
Would this ever need to happen? We provide all three firmware types for all our SoCs out in public[0], why would anyone only have one type of firmware available?
Andrew
[0] https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/tree/ti-sysfw?h=ti-linux-firmware
Quoted 5 lines
So that was the reasoning behind putting those binaries as optional, we should not have a failed build in those cases. However binaries like DM and board-config binaries that are common between all three needs to be there so it's not optional.
Quoted 2 lines
Regards,
Simon
Re: [PATCH v3 11/19] am64x: dts: binman: Package tiboot3.bin, tispl.bin u-boot.img
In reply to Neha Malcom FrancisHi Neha,
Quoted 51 lines · Neha Malcom Francis
Hi Simon
Quoted 41 lines · Simon Glass
Hi Neha,
Quoted 29 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM64x.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
Note that the bootflow followed by AM64x requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* sysfw
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* ATF
* OPTEE
* A53 SPL
* A53 SPL dtbsu-boot.img:
* A53 U-Boot
* A53 U-Boot dtbsQuoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am642-evm-u-boot.dtsi | 2 + arch/arm/dts/k3-am642-r5-evm.dts | 1 + arch/arm/dts/k3-am64x-binman.dtsi | 569 ++++++++++++++++++++++++++ board/ti/am64x/Kconfig | 2 + 4 files changed, 574 insertions(+)create mode 100644
arch/arm/dts/k3-am64x-binman.dtsiQuoted 5 lines
Reviewed-by Simon Glass <[email protected]>I notice that some of the entries are optional. Do you actual make use of this (i.e. that when they are missing binman removes the entries)?
Quoted 7 lines
So right now the build generates binaries for all three types: HS-FS, HS-SE and GP devices. It's not necessary for the user to provide component binaries for all three of them, say they only have GP SYSFW binaries available with them. So that was the reasoning behind putting those binaries as optional, we should not have a failed build in those cases. However binaries like DM and board-config binaries that are common between all three needs to be there so it's not optional.
The way 'optional' is supposed to work is that an etype decides that an optional entry is absent and so marks it as absent. Then when drop_absent() is called, the entry is removed from its section.
You can certainly add that functionality if you like.
But we must have a reliable signal for whether an image is valid or not.
Regards,
Simon
PATCH v3 12/19 j721s2: yaml: Add board configs for J721S2
In reply to Neha Malcom FrancisAdded YAML configs for J721S2
--- board/ti/j721s2/board-cfg.yaml | 37 + board/ti/j721s2/pm-cfg.yaml | 12 + board/ti/j721s2/rm-cfg.yaml | 2901 ++++++++++++++++++++++++++++++++ board/ti/j721s2/sec-cfg.yaml | 375 +++++ 4 files changed, 3325 insertions(+) create mode 100644 board/ti/j721s2/board-cfg.yaml create mode 100644 board/ti/j721s2/pm-cfg.yaml create mode 100644 board/ti/j721s2/rm-cfg.yaml create mode 100644 board/ti/j721s2/sec-cfg.yaml
board/ti/j721s2/board-cfg.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for J721S2 +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x0 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00 +
board/ti/j721s2/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for J721S2 +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/j721s2/rm-cfg.yaml new file +2901 -0
2,901 lines not on this page · raw message
board/ti/j721s2/sec-cfg.yaml new file +375 -0
50 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
PATCH v3 13/19 j721s2: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for J721S2.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by J721S2 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbs
u-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
--- arch/arm/dts/k3-j721s2-binman.dtsi | 613 ++++++++++++++++++ .../k3-j721s2-common-proc-board-u-boot.dtsi | 2 + .../dts/k3-j721s2-r5-common-proc-board.dts | 1 + board/ti/j721s2/Kconfig | 2 + 4 files changed, 618 insertions(+) create mode 100644 arch/arm/dts/k3-j721s2-binman.dtsi
arch/arm/dts/k3-j721s2-binman.dtsi new file +613 -0
@@ -0,0 +1,613 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +#ifdef CONFIG_TARGET_J721S2_R5_EVM + +&binman { + board-cfg { + filename = "board-cfg.bin"; + ti-board-config { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + pm-cfg { + filename = "pm-cfg.bin"; + ti-board-config { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + rm-cfg { + filename = "rm-cfg.bin"; + ti-board-config { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + sec-cfg { + filename = "sec-cfg.bin"; + ti-board-config { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + combined-tifs-cfg { + filename = "combined-tifs-cfg.bin"; + ti-board-config { + board-cfg { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + sec-cfg { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + }; + combined-dm-cfg { + filename = "combined-dm-cfg.bin"; + ti-board-config { + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + + }; + }; + + tiboot3 { + filename = "tiboot3.bin"; + ti-secure-rom { + content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>, + <&combined_dm_cfg>, <&sysfw_inner_cert>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl>; + content-sysfw = <&ti_fs_enc>; + content-sysfw-data = <&combined_tifs_cfg>; + content-sysfw-inner-cert = <&sysfw_inner_cert>; + content-dm-data = <&combined_dm_cfg>; + load = <0x41c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x67000>; + load-dm-data = <0x41c80000>; + }; + u_boot_spl: u-boot-spl { + no-expanded; + }; + ti_fs_enc: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j721s2-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-j721s2-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +&binman { + tiboot3_fs { + filename = "tiboot3.bin_fs"; + ti-secure-rom { + content = <&u_boot_spl_fs>, <&ti_fs_enc_fs>, <&combined_tifs_cfg_fs>, + <&combined_dm_cfg_fs>, <&sysfw_inner_cert_fs>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl_fs>; + content-sysfw = <&ti_fs_enc_fs>; + content-sysfw-data = <&combined_tifs_cfg_fs>; + content-sysfw-inner-cert = <&sysfw_inner_cert_fs>; + content-dm-data = <&combined_dm_cfg_fs>; + load = <0x41c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x67000>; + load-dm-data = <0x41c80000>; + }; + u_boot_spl_fs: u-boot-spl { + no-expanded; + }; + ti_fs_enc_fs: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-j721s2-hs-fs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_fs: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert_fs: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-j721s2-hs-fs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg_fs: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +&binman { + tiboot3_unsigned { + filename = "tiboot3.bin_unsigned"; + ti-secure-rom { + content = <&u_boot_spl_unsigned>, <&ti_fs_gp>, + <&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>; + combined; + dm-data; + content-sbl = <&u_boot_spl_unsigned>; + load = <0x41c00000>; + content-sysfw = <&ti_fs_gp>; + load-sysfw = <0x40000>; + content-sysfw-data = <&combined_tifs_cfg_gp>; + load-sysfw-data = <0x67000>; + content-dm-data = <&combined_dm_cfg_gp>; + load-dm-data = <0x41c80000>; + sw-rev = <1>; + keyfile = "ti-degenerate-key.pem"; + }; + u_boot_spl_unsigned: u-boot-spl { + no-expanded; + }; + ti_fs_gp: ti-fs-gp.bin { + filename = "ti-sysfw/ti-fs-firmware-j721s2-gp.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + combined_dm_cfg_gp: combined-dm-cfg-gp.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + + }; +}; + +#endif + +#ifdef CONFIG_TARGET_J721S2_A72_EVM + +#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" +#define SPL_J721S2_EVM_DTB "spl/dts/k3-j721s2-common-proc-board.dtb" +#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb" + +#define UBOOT_NODTB "u-boot-nodtb.bin" +#define J721S2_EVM_DTB "arch/arm/dts/k3-j721s2-common-proc-board.dtb" +#define AM68_SK_DTB "arch/arm/dts/k3-am68-sk-base-board.dtb" + +&binman { + ti-dm { + filename = "ti-dm.bin"; + blob-ext { + filename = "ti-dm/j721s2/ipc_echo_testb_mcu1_0_release_strip.xer5f"; + }; + }; + ti-spl { + filename = "tispl.bin"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + ti-secure { + content = <&atf>; + keyfile = "custMpk.pem"; + }; + atf: atf-bl31 { + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + ti-secure { + content = <&tee>; + keyfile = "custMpk.pem"; + }; + tee: tee-os { + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + ti-secure { + content = <&dm>; + keyfile = "custMpk.pem"; + }; + dm: blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + ti-secure { + content = <&u_boot_spl_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_spl_nodtb: blob-ext { + filename = SPL_NODTB; + }; + }; + + fdt-0 { + description = "k3-j721s2-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_j721s2_evm_dtb>; + keyfile = "custMpk.pem"; + }; + spl_j721s2_evm_dtb: blob-ext { + filename = SPL_J721S2_EVM_DTB; + }; + + }; + + fdt-1 { + description = "k3-am68-sk-base-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am68_sk_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am68_sk_dtb: blob-ext { + filename = SPL_AM68_SK_DTB; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721s2-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + + conf-1 { + description = "k3-am68-sk-base-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + u-boot { + filename = "u-boot.img"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for J721S2 board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + ti-secure { + content = <&u_boot_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_nodtb: u-boot-nodtb { + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-j721s2-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&j721s2_evm_dtb>; + keyfile = "custMpk.pem"; + }; + j721s2_evm_dtb: blob-ext { + filename = J721S2_EVM_DTB; + }; + + hash { + algo = "crc32"; + }; + }; + + fdt-1 { + description = "k3-am68-sk-base-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&am68_sk_dtb>; + keyfile = "custMpk.pem"; + }; + am68_sk_dtb: blob-ext { + filename = AM68_SK_DTB; + }; + + hash { + algo = "crc32"; + }; + }; + + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721s2-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + conf-1 { + description = "k3-am68-sk-base-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-1"; + }; + + }; + }; + }; +}; + +&binman { + ti-spl_unsigned { + filename = "tispl.bin_unsigned"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + tee-os { + filename = "tee-pager_v2.bin"; + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + blob { + filename = "spl/u-boot-spl-nodtb.bin"; + }; + }; + + fdt-0 { + description = "k3-j721s2-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_J721S2_EVM_DTB; + }; + }; + fdt-1 { + description = "k3-am68-sk-base-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_AM68_SK_DTB; + }; + }; + + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721s2-common-proc-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + conf-1 { + description = "k3-am68-sk-base-board"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; + +&binman { + u-boot_unsigned { + filename = "u-boot.img_unsigned"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for J721S2 board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + blob { + filename = UBOOT_NODTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-j721s2-common-proc-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = J721S2_EVM_DTB; + }; + hash { + algo = "crc32"; + }; + }; + fdt-1 { + description = "k3-am68-sk-base-board"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM68_SK_DTB; + }; + hash { + algo = "crc32"; + }; + }; + + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-j721s2-common-proc-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + conf-1 { + description = "k3-am68-sk-base-board"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-1"; + }; + }; + }; + }; +}; +#endif
arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi +2 -0
@@ -3,6 +3,8 @@ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com/ */ +#include "k3-j721s2-binman.dtsi" + / { chosen { stdout-path = "serial2:115200n8";
arch/arm/dts/k3-j721s2-r5-common-proc-board.dts +1 -0
@@ -8,6 +8,7 @@ #include "k3-j721s2-som-p0.dtsi" #include "k3-j721s2-ddr-evm-lp4-4266.dtsi" #include "k3-j721s2-ddr.dtsi" +#include "k3-j721s2-binman.dtsi" / { chosen {
board/ti/j721s2/Kconfig +2 -0
@@ -13,6 +13,7 @@ config TARGET_J721S2_A72_EVM select BOARD_LATE_INIT imply TI_I2C_BOARD_DETECT select SYS_DISABLE_DCACHE_OPS + select BINMAN config TARGET_J721S2_R5_EVM bool "TI K3 based J721S2 EVM running on R5"
@@ -22,6 +23,7 @@ config TARGET_J721S2_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
Signature · 1 line
2.34.1
Re: [PATCH v3 13/19] j721s2: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
Quoted 30 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for J721S2.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by J721S2 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbsu-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-j721s2-binman.dtsi | 613 ++++++++++++++++++ .../k3-j721s2-common-proc-board-u-boot.dtsi | 2 + .../dts/k3-j721s2-r5-common-proc-board.dts | 1 + board/ti/j721s2/Kconfig | 2 + 4 files changed, 618 insertions(+) create mode 100644 arch/arm/dts/k3-j721s2-binman.dtsi
Again a reduction in duplication would be good
PATCH v3 14/19 am62: yaml: Add board configs for AM62
In reply to Neha Malcom FrancisAdded YAML configs for AM62
--- board/ti/am62x/board-cfg.yaml | 36 ++ board/ti/am62x/pm-cfg.yaml | 12 + board/ti/am62x/rm-cfg.yaml | 1088 +++++++++++++++++++++++++++++++++ board/ti/am62x/sec-cfg.yaml | 375 ++++++++++++ board/ti/am65x/rm-cfg.yaml | 144 ++--- 5 files changed, 1583 insertions(+), 72 deletions(-) create mode 100644 board/ti/am62x/board-cfg.yaml create mode 100644 board/ti/am62x/pm-cfg.yaml create mode 100644 board/ti/am62x/rm-cfg.yaml create mode 100644 board/ti/am62x/sec-cfg.yaml
board/ti/am62x/board-cfg.yaml new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for AM62 +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x0 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00
board/ti/am62x/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for AM62 +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/am62x/rm-cfg.yaml new file +1088 -0
1,088 lines not on this page · raw message
board/ti/am62x/sec-cfg.yaml new file +375 -0
375 lines not on this page · raw message
board/ti/am65x/rm-cfg.yaml +72 -72
171 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 15/19 am625: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for AM62
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by AM62 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbs
u-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
--- arch/arm/dts/k3-am625-r5-sk.dts | 1 + arch/arm/dts/k3-am625-sk-binman.dtsi | 529 +++++++++++++++++++++++++++ arch/arm/dts/k3-am625-sk-u-boot.dtsi | 2 + board/ti/am62x/Kconfig | 2 + 4 files changed, 534 insertions(+) create mode 100644 arch/arm/dts/k3-am625-sk-binman.dtsi
arch/arm/dts/k3-am625-r5-sk.dts +1 -0
@@ -9,6 +9,7 @@ #include "k3-am62-ddr.dtsi" #include "k3-am625-sk-u-boot.dtsi" +#include "k3-am625-sk-binman.dtsi" / { aliases {
arch/arm/dts/k3-am625-sk-binman.dtsi new file +529 -0
529 lines not on this page · raw message
arch/arm/dts/k3-am625-sk-u-boot.dtsi +2 -0
@@ -4,6 +4,8 @@ * Copyright (C) 2021-2022 Texas Instruments Incorporated - https://www.ti.com/ */ +#include "k3-am625-sk-binman.dtsi" + / { chosen { stdout-path = "serial2:115200n8";
board/ti/am62x/Kconfig +2 -0
@@ -10,6 +10,7 @@ choice config TARGET_AM625_A53_EVM bool "TI K3 based AM625 EVM running on A53" select ARM64 + select BINMAN config TARGET_AM625_R5_EVM bool "TI K3 based AM625 EVM running on R5"
@@ -19,6 +20,7 @@ config TARGET_AM625_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF endchoice
Signature · 1 line
2.34.1
Re: [PATCH v3 15/19] am625: dts: binman: Package tiboot3.bin, tispl.bin and u-boot.img
Quoted 30 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM62
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned, u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by AM62 requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbsu-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am625-r5-sk.dts | 1 + arch/arm/dts/k3-am625-sk-binman.dtsi | 529 +++++++++++++++++++++++++++ arch/arm/dts/k3-am625-sk-u-boot.dtsi | 2 + board/ti/am62x/Kconfig | 2 + 4 files changed, 534 insertions(+) create mode 100644 arch/arm/dts/k3-am625-sk-binman.dtsi
PATCH v3 16/19 am62a: yaml: Add board configs for AM62ax
In reply to Neha Malcom FrancisAdded YAML configs for AM62ax
--- board/ti/am62ax/board-cfg.yaml | 36 + board/ti/am62ax/pm-cfg.yaml | 12 + board/ti/am62ax/rm-cfg.yaml | 1151 ++++++++++++++++++++++++++++++++ board/ti/am62ax/sec-cfg.yaml | 375 +++++++++++ 4 files changed, 1574 insertions(+) create mode 100644 board/ti/am62ax/board-cfg.yaml create mode 100644 board/ti/am62ax/pm-cfg.yaml create mode 100644 board/ti/am62ax/rm-cfg.yaml create mode 100644 board/ti/am62ax/sec-cfg.yaml
board/ti/am62ax/board-cfg.yaml new file +36 -0
@@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Board configuration for AM62ax +# + +--- + +board-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1 + control: + subhdr: + magic: 0xC1D3 + size: 7 + main_isolation_enable : 0x5A + main_isolation_hostid : 0x2 + secproxy: + subhdr: + magic: 0x1207 + size: 7 + scaling_factor : 0x1 + scaling_profile : 0x1 + disable_main_nav_secure_proxy : 0 + msmc: + subhdr: + magic: 0xA5C3 + size: 5 + msmc_cache_size : 0x10 + debug_cfg: + subhdr: + magic: 0x020C + size: 8 + trace_dst_enables : 0x00 + trace_src_enables : 0x00
board/ti/am62ax/pm-cfg.yaml new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Power management configuration for AM62ax +# + +--- + +pm-cfg: + rev: + boardcfg_abi_maj : 0x0 + boardcfg_abi_min : 0x1
board/ti/am62ax/rm-cfg.yaml new file +1151 -0
1,151 lines not on this page · raw message
board/ti/am62ax/sec-cfg.yaml new file +375 -0
375 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 17/19 am62a: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
In reply to Neha Malcom FrancisSupport added for HS and GP boot binaries for AM62ax.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned and u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by AM62ax requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfg
tispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbs
u-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
--- arch/arm/dts/k3-am62a-sk-binman.dtsi | 528 +++++++++++++++++++++++++++ arch/arm/dts/k3-am62a7-r5-sk.dts | 1 + arch/arm/dts/k3-am62a7-sk.dts | 1 + board/ti/am62ax/Kconfig | 2 + 4 files changed, 532 insertions(+) create mode 100644 arch/arm/dts/k3-am62a-sk-binman.dtsi
arch/arm/dts/k3-am62a-sk-binman.dtsi new file +528 -0
@@ -0,0 +1,528 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/ { + binman: binman { + multiple-images; + }; +}; + +#ifdef CONFIG_TARGET_AM62A7_R5_EVM + +&binman { + board-cfg { + filename = "board-cfg.bin"; + ti-board-config { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + pm-cfg { + filename = "pm-cfg.bin"; + ti-board-config { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + rm-cfg { + filename = "rm-cfg.bin"; + ti-board-config { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + sec-cfg { + filename = "sec-cfg.bin"; + ti-board-config { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + combined-tifs-cfg { + filename = "combined-tifs-cfg.bin"; + ti-board-config { + board-cfg { + config = "board-cfg.yaml"; + schema = "schema.yaml"; + }; + sec-cfg { + config = "sec-cfg.yaml"; + schema = "schema.yaml"; + }; + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + }; + }; + combined-dm-cfg { + filename = "combined-dm-cfg.bin"; + ti-board-config { + pm-cfg { + config = "pm-cfg.yaml"; + schema = "schema.yaml"; + }; + rm-cfg { + config = "rm-cfg.yaml"; + schema = "schema.yaml"; + }; + + }; + }; + + tiboot3 { + filename = "tiboot3.bin"; + ti-secure-rom { + content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>, + <&combined_dm_cfg>, <&sysfw_inner_cert>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl>; + content-sysfw = <&ti_fs_enc>; + content-sysfw-data = <&combined_tifs_cfg>; + content-sysfw-inner-cert = <&sysfw_inner_cert>; + content-dm-data = <&combined_dm_cfg>; + load = <0x43c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x67000>; + load-dm-data = <0x43c3a800>; + }; + u_boot_spl: u-boot-spl { + no-expanded; + }; + ti_fs_enc: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-am62ax-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-am62ax-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +&binman { + tiboot3_fs { + filename = "tiboot3.bin_fs"; + ti-secure-rom { + content = <&u_boot_spl_fs>, <&ti_fs_enc_fs>, <&combined_tifs_cfg_fs>, + <&combined_dm_cfg_fs>, <&sysfw_inner_cert_fs>; + combined; + dm-data; + sysfw-inner-cert; + keyfile = "custMpk.pem"; + sw-rev = <1>; + content-sbl = <&u_boot_spl_fs>; + content-sysfw = <&ti_fs_enc_fs>; + content-sysfw-data = <&combined_tifs_cfg_fs>; + content-sysfw-inner-cert = <&sysfw_inner_cert_fs>; + content-dm-data = <&combined_dm_cfg_fs>; + load = <0x43c00000>; + load-sysfw = <0x40000>; + load-sysfw-data = <0x67000>; + load-dm-data = <0x43c3a800>; + }; + u_boot_spl_fs: u-boot-spl { + no-expanded; + }; + ti_fs_enc_fs: ti-fs-enc.bin { + filename = "ti-sysfw/ti-fs-firmware-am62ax-hs-enc.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_fs: combined-tifs-cfg.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + sysfw_inner_cert_fs: sysfw-inner-cert { + filename = "ti-sysfw/ti-fs-firmware-am62ax-hs-cert.bin"; + type = "blob-ext"; + optional; + }; + combined_dm_cfg_fs: combined-dm-cfg.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; + +&binman { + tiboot3_unsigned { + filename = "tiboot3.bin_unsigned"; + ti-secure-rom { + content = <&u_boot_spl_unsigned>, <&ti_fs_gp>, + <&combined_tifs_cfg_gp>, <&combined_dm_cfg_gp>; + combined; + dm-data; + content-sbl = <&u_boot_spl_unsigned>; + load = <0x43c00000>; + content-sysfw = <&ti_fs_gp>; + load-sysfw = <0x40000>; + content-sysfw-data = <&combined_tifs_cfg_gp>; + load-sysfw-data = <0x67000>; + content-dm-data = <&combined_dm_cfg_gp>; + load-dm-data = <0x43c3a800>; + sw-rev = <1>; + keyfile = "ti-degenerate-key.pem"; + }; + u_boot_spl_unsigned: u-boot-spl { + no-expanded; + }; + ti_fs_gp: ti-fs-gp.bin { + filename = "ti-sysfw/ti-fs-firmware-am62ax-gp.bin"; + type = "blob-ext"; + optional; + }; + combined_tifs_cfg_gp: combined-tifs-cfg-gp.bin { + filename = "combined-tifs-cfg.bin"; + type = "blob-ext"; + }; + combined_dm_cfg_gp: combined-dm-cfg-gp.bin { + filename = "combined-dm-cfg.bin"; + type = "blob-ext"; + }; + }; +}; + +#endif + +#ifdef CONFIG_TARGET_AM62A7_A53_EVM + +#define SPL_NODTB "spl/u-boot-spl-nodtb.bin" +#define SPL_AM62A7_SK_DTB "spl/dts/k3-am62a7-sk.dtb" + +#define UBOOT_NODTB "u-boot-nodtb.bin" +#define AM62A7_SK_DTB "arch/arm/dts/k3-am62a7-sk.dtb" + +&binman { + ti-dm { + filename = "ti-dm.bin"; + blob-ext { + filename = "ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f"; + }; + }; + ti-spl { + filename = "tispl.bin"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + ti-secure { + content = <&atf>; + keyfile = "custMpk.pem"; + }; + atf: atf-bl31 { + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + ti-secure { + content = <&tee>; + keyfile = "custMpk.pem"; + }; + tee: tee-os { + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + ti-secure { + content = <&dm>; + keyfile = "custMpk.pem"; + }; + dm: blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + ti-secure { + content = <&u_boot_spl_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_spl_nodtb: blob-ext { + filename = SPL_NODTB; + }; + }; + + fdt-0 { + description = "k3-am62a7-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&spl_am62a7_sk_dtb>; + keyfile = "custMpk.pem"; + }; + spl_am62a7_sk_dtb: blob-ext { + filename = SPL_AM62A7_SK_DTB; + }; + + }; + + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-am62a7-sk"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + }; + }; + }; +}; + +&binman { + u-boot { + filename = "u-boot.img"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for AM62Ax board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + ti-secure { + content = <&u_boot_nodtb>; + keyfile = "custMpk.pem"; + }; + u_boot_nodtb: u-boot-nodtb { + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-am62a7-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + ti-secure { + content = <&am62a7_sk_dtb>; + keyfile = "custMpk.pem"; + }; + am62a7_sk_dtb: blob-ext { + filename = AM62A7_SK_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-am62a7-sk"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + + }; + }; + }; +}; + +&binman { + ti-spl_unsigned { + filename = "tispl.bin_unsigned"; + pad-byte = <0xff>; + + fit { + description = "Configuration to load ATF and SPL"; + #address-cells = <1>; + + images { + + atf { + description = "ARM Trusted Firmware"; + type = "firmware"; + arch = "arm64"; + compression = "none"; + os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + }; + }; + + tee { + description = "OPTEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <0x9e800000>; + entry = <0x9e800000>; + tee-os { + filename = "tee-pager_v2.bin"; + }; + }; + + dm { + description = "DM binary"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "DM"; + load = <0x89000000>; + entry = <0x89000000>; + blob-ext { + filename = "ti-dm.bin"; + }; + }; + + spl { + description = "SPL (64-bit)"; + type = "standalone"; + os = "U-Boot"; + arch = "arm64"; + compression = "none"; + load = <CONFIG_SPL_TEXT_BASE>; + entry = <CONFIG_SPL_TEXT_BASE>; + blob { + filename = "spl/u-boot-spl-nodtb.bin"; + }; + }; + + fdt-0 { + description = "k3-am62a7-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = SPL_AM62A7_SK_DTB; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-am62a7-sk"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + fdt = "fdt-0"; + }; + }; + }; + }; +}; + +&binman { + u-boot_unsigned { + filename = "u-boot.img_unsigned"; + pad-byte = <0xff>; + + fit { + description = "FIT image with multiple configurations"; + + images { + uboot { + description = "U-Boot for AM62Ax board"; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>; + blob { + filename = UBOOT_NODTB; + }; + hash { + algo = "crc32"; + }; + }; + + fdt-0 { + description = "k3-am62a7-sk"; + type = "flat_dt"; + arch = "arm"; + compression = "none"; + blob { + filename = AM62A7_SK_DTB; + }; + hash { + algo = "crc32"; + }; + }; + }; + + configurations { + default = "conf-0"; + + conf-0 { + description = "k3-am62a7-sk"; + firmware = "uboot"; + loadables = "uboot"; + fdt = "fdt-0"; + }; + }; + }; + }; +}; +#endif
arch/arm/dts/k3-am62a7-r5-sk.dts +1 -0
@@ -7,6 +7,7 @@ #include "k3-am62a7-sk.dts" #include "k3-am62a-ddr-1866mhz-32bit.dtsi" #include "k3-am62a-ddr.dtsi" +#include "k3-am62a-sk-binman.dtsi" #include "k3-am62a7-sk-u-boot.dtsi"
arch/arm/dts/k3-am62a7-sk.dts +1 -0
@@ -10,6 +10,7 @@ #include <dt-bindings/leds/common.h> #include <dt-bindings/gpio/gpio.h> #include "k3-am62a7.dtsi" +#include "k3-am62a-sk-binman.dtsi" / { compatible = "ti,am62a7-sk", "ti,am62a7";
board/ti/am62ax/Kconfig +2 -0
@@ -10,6 +10,7 @@ choice config TARGET_AM62A7_A53_EVM bool "TI K3 based AM62A7 EVM running on A53" select ARM64 + select BINMAN imply BOARD imply SPL_BOARD imply TI_I2C_BOARD_DETECT
@@ -22,6 +23,7 @@ config TARGET_AM62A7_R5_EVM select RAM select SPL_RAM select K3_DDRSS + select BINMAN imply SYS_K3_SPL_ATF imply TI_I2C_BOARD_DETECT
Signature · 1 line
2.34.1
Re: [PATCH v3 17/19] am62a: dts: binman: Package tiboot3.bin, tispl.bin, u-boot.img
Quoted 30 lines · Neha Malcom Francis
Support added for HS and GP boot binaries for AM62ax.
tiboot3.bin, tispl.bin and u-boot.img: For HS-SE devices tiboot3.bin_fs, tispl.bin and u-boot.img: For HS-FS devices tiboot3.bin_unsigned, tispl.bin_unsigned and u-boot.img_unsigned: For GP devices
It is to be noted that the bootflow followed by AM62ax requires:
tiboot3.bin:
* R5 SPL
* R5 SPL dtbs
* TIFS
* board-cfg
* pm-cfg
* sec-cfg
* rm-cfgtispl.bin:
* DM
* ATF
* OPTEE
* A72 SPL
* A72 SPL dtbsu-boot.img:
* A72 U-Boot
* A72 U-Boot dtbs
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/dts/k3-am62a-sk-binman.dtsi | 528 +++++++++++++++++++++++++++ arch/arm/dts/k3-am62a7-r5-sk.dts | 1 + arch/arm/dts/k3-am62a7-sk.dts | 1 + board/ti/am62ax/Kconfig | 2 + 4 files changed, 532 insertions(+) create mode 100644 arch/arm/dts/k3-am62a-sk-binman.dtsi
PATCH v3 18/19 k3: tools: config.mk: Update makefile and remove scripts
In reply to Neha Malcom FrancisSince binman is used to package bootloader images for all K3 devices, we do not have to rely on the earlier methods to package them.
config.mk has been edited to only have binman required make commands.
Scripts that were used to generate x509 certificate for tiboot3.bin and generate tispl.bin have also been removed.
--- arch/arm/mach-k3/config.mk | 92 ------------- tools/k3_fit_atf.sh | 123 ----------------- tools/k3_gen_x509_cert.sh | 262 ------------------------------------- 3 files changed, 477 deletions(-) delete mode 100755 tools/k3_fit_atf.sh delete mode 100755 tools/k3_gen_x509_cert.sh
arch/arm/mach-k3/config.mk +0 -92
@@ -11,34 +11,6 @@ ifeq ($(shell which openssl),) $(error "No openssl in $(PATH), consider installing openssl") endif -IMAGE_SIZE= $(shell cat $(obj)/u-boot-spl.bin | wc -c) -MAX_SIZE= $(shell printf "%d" $(CONFIG_SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE)) - -ifeq ($(CONFIG_SYS_K3_KEY), "") -KEY="" -# On HS use real key or warn if not available -ifeq ($(CONFIG_TI_SECURE_DEVICE),y) -ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/keys/custMpk.pem),) -KEY=$(TI_SECURE_DEV_PKG)/keys/custMpk.pem -else -$(warning "WARNING: signing key not found. Random key will NOT work on HS hardware!") -endif -endif -else -KEY=$(patsubst "%",$(srctree)/%,$(CONFIG_SYS_K3_KEY)) -endif - -# X509 SWRV default -SWRV = $(CONFIG_K3_X509_SWRV) -# On HS use SECDEV provided software revision or warn if not available -ifeq ($(CONFIG_TI_SECURE_DEVICE),y) -ifneq ($(wildcard $(TI_SECURE_DEV_PKG)/keys/swrv.txt),) -SWRV= $(shell cat $(TI_SECURE_DEV_PKG)/keys/swrv.txt) -else -$(warning "WARNING: Software revision file not found. Default may not work on HS hardware.") -endif -endif - O ?= . # Board config binary artifacts necessary for packaging of tiboot3.bin
@@ -88,68 +60,4 @@ INPUTS-y += schema.yaml INPUTS-y += custMpk.pem INPUTS-y += ti-degenerate-key.pem endif - -# tiboot3.bin is mandated by ROM and ROM only supports R5 boot. -# So restrict tiboot3.bin creation for CPU_V7R. -ifndef CONFIG_BINMAN -ifdef CONFIG_CPU_V7R -image_check: $(obj)/u-boot-spl.bin FORCE - @if [ $(IMAGE_SIZE) -gt $(MAX_SIZE) ]; then \ - echo "===============================================" >&2; \ - echo "ERROR: Final Image too big. " >&2; \ - echo "$< size = $(IMAGE_SIZE), max size = $(MAX_SIZE)" >&2; \ - echo "===============================================" >&2; \ - exit 1; \ - fi - -tiboot3.bin: image_check FORCE - $(srctree)/tools/k3_gen_x509_cert.sh -c 16 -b $(obj)/u-boot-spl.bin \ - -o $@ -l $(CONFIG_SPL_TEXT_BASE) -r $(SWRV) -k $(KEY) - -INPUTS-y += tiboot3.bin -endif -endif - -ifdef CONFIG_ARM64 - -ifeq ($(CONFIG_SOC_K3_J721E),) -export DM := /dev/null endif - -ifndef CONFIG_BINMAN -ifeq ($(CONFIG_TI_SECURE_DEVICE),y) -SPL_ITS := u-boot-spl-k3_HS.its -$(SPL_ITS): export IS_HS=1 -INPUTS-y += tispl.bin_HS -else -SPL_ITS := u-boot-spl-k3.its -INPUTS-y += tispl.bin -endif -endif - -ifeq ($(CONFIG_SPL_OF_LIST),) -LIST_OF_DTB := $(CONFIG_DEFAULT_DEVICE_TREE) -else -LIST_OF_DTB := $(CONFIG_SPL_OF_LIST) -endif - -quiet_cmd_k3_mkits = MKITS $@ -cmd_k3_mkits = \ - $(srctree)/tools/k3_fit_atf.sh \ - $(CONFIG_K3_ATF_LOAD_ADDR) \ - $(patsubst %,$(obj)/dts/%.dtb,$(subst ",,$(LIST_OF_DTB))) > $@ - -$(SPL_ITS): FORCE - $(call cmd,k3_mkits) -endif - -else - -ifeq ($(CONFIG_TI_SECURE_DEVICE),y) -INPUTS-y += u-boot.img_HS -else -INPUTS-y += u-boot.img -endif -endif - -include $(srctree)/arch/arm/mach-k3/config_secure.mk
tools/k3_fit_atf.sh deleted +0 -123
123 lines not on this page · raw message
tools/k3_gen_x509_cert.sh deleted +0 -262
262 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 18/19] k3: tools: config.mk: Update makefile and remove scripts
Hi Neha,
Quoted 9 lines · Neha Malcom Francis
Since binman is used to package bootloader images for all K3 devices, we do not have to rely on the earlier methods to package them.
config.mk has been edited to only have binman required make commands.
Scripts that were used to generate x509 certificate for tiboot3.bin and generate tispl.bin have also been removed.
Quoted 8 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- arch/arm/mach-k3/config.mk | 92 ------------- tools/k3_fit_atf.sh | 123 ----------------- tools/k3_gen_x509_cert.sh | 262 ------------------------------------- 3 files changed, 477 deletions(-) delete mode 100755 tools/k3_fit_atf.sh delete mode 100755 tools/k3_gen_x509_cert.sh
There does seem to be a lot less duplication in the scripts that you are removing!
Regards,
SImon
PATCH v3 19/19 doc: board: ti: Update documentation for binman flow
In reply to Neha Malcom FrancisEarlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
--- doc/board/ti/am62x_sk.rst | 20 ++++-------- doc/board/ti/j721e_evm.rst | 37 ++++++++------------- doc/board/ti/k3.rst | 67 ++++++++++---------------------------- 3 files changed, 36 insertions(+), 88 deletions(-)
doc/board/ti/am62x_sk.rst +6 -14
@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master -5. TI Linux Firmware: +4. TI Linux Firmware: Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git Branch: ti-linux-firmware
@@ -156,18 +152,14 @@ Build procedure: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin - -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 3.2 A53: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images --------------
doc/board/ti/j721e_evm.rst +13 -24
@@ -130,67 +130,56 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. DM Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware - -5. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + Build procedure: ---------------- -1. SYSFW: - -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed -3. OPTEE: +2. OPTEE: .. code-block:: bash make PLATFORM=k3-j721e CFG_ARM64_core=y -4. U-Boot: +3. U-Boot: * 4.1 R5: .. code-block:: bash make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5 - make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 4.2 A72: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72 - make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images -------------- Copy the below images to an SD card and boot: - - sysfw.itb from step 1 - - tiboot3.bin from step 4.1 + - tiboot3.bin and sysfw.itb from step 4.1 - tispl.bin, u-boot.img from 4.2 Image formats:
doc/board/ti/k3.rst +17 -50
129 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 19/19] doc: board: ti: Update documentation for binman flow
Hi Neha,
Quoted 6 lines · Neha Malcom Francis
Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
Quoted 6 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- doc/board/ti/am62x_sk.rst | 20 ++++-------- doc/board/ti/j721e_evm.rst | 37 ++++++++------------- doc/board/ti/k3.rst | 67 ++++++++++---------------------------- 3 files changed, 36 insertions(+), 88 deletions(-)
Quoted 119 lines
doc/board/ti/am62x_sk.rst +6
-14@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master -5. TI Linux Firmware: +4. TI Linux Firmware: Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git Branch: ti-linux-firmware@@ -156,18 +152,14 @@ Build procedure: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin - -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 3.2 A53: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images --------------doc/board/ti/j721e_evm.rst +10
-20@@ -130,67 +130,56 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. DM Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware - -5. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + Build procedure: ---------------- -1. SYSFW: - -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed -3. OPTEE: +2. OPTEE: .. code-block:: bash make PLATFORM=k3-j721e CFG_ARM64_core=y -4. U-Boot: +3. U-Boot: * 4.1 R5: .. code-block:: bash make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 177
Quoted 10 lines
doc/board/ti/j721e_evm.rst +2
-2- make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 4.2 A72: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72 - make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>
Is there an 'O=build/a72' missing there?
You can combine these as well, by using 'j721e_evm_a72_defconfig all' to both configure and build.
Also it might be nice to keep the line length shorter if you can. [..]
Regards,
Simon
Re: [PATCH v3 19/19] doc: board: ti: Update documentation for binman flow
Quoted 142 lines · Simon Glass
Hi Neha,
Quoted 6 lines · Neha Malcom Francis
Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
Quoted 6 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- doc/board/ti/am62x_sk.rst | 20 ++++-------- doc/board/ti/j721e_evm.rst | 37 ++++++++------------- doc/board/ti/k3.rst | 67 ++++++++++---------------------------- 3 files changed, 36 insertions(+), 88 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 124 lines
doc/board/ti/am62x_sk.rst +6
-14@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master -5. TI Linux Firmware: +4. TI Linux Firmware: Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git Branch: ti-linux-firmware@@ -156,18 +152,14 @@ Build procedure: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin - -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 3.2 A53: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images --------------doc/board/ti/j721e_evm.rst +11
-21@@ -130,67 +130,56 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. DM Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware - -5. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + Build procedure: ---------------- -1. SYSFW: - -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed -3. OPTEE: +2. OPTEE: .. code-block:: bash make PLATFORM=k3-j721e CFG_ARM64_core=y -4. U-Boot: +3. U-Boot: * 4.1 R5: .. code-block:: bash make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5 - make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 4.2 A72:
Quoted 7 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 177
Quoted 5 lines
doc/board/ti/j721e_evm.rst +1
-1.. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72 - make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>Is there an 'O=build/a72' missing there?
Not strictly missing, no. One of those style things for Heinrich is, we should be consistent in our examples both in terms of O= (when not strictly required, it is for the _r5 variant since you must keep some of that build for the Cortex-A part, so that you can get something that boots the physical machine, in the end).
Quoted 4 lines
You can combine these as well, by using '
j721e_evm_a72_defconfigall' to both configure and build.Also it might be nice to keep the line length shorter if you can.
Other parts for Heinrich to chime in, to have consistent on all the board examples.
Signature · 1 line
Tom
Re: [PATCH v3 19/19] doc: board: ti: Update documentation for binman flow
Quoted 130 lines · Tom Rini
Quoted 129 lines · Simon Glass
Hi Neha,
Quoted 6 lines · Neha Malcom Francis
Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
Quoted 6 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- doc/board/ti/am62x_sk.rst | 20 ++++-------- doc/board/ti/j721e_evm.rst | 37 ++++++++------------- doc/board/ti/k3.rst | 67 ++++++++++---------------------------- 3 files changed, 36 insertions(+), 88 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 111 lines
doc/board/ti/am62x_sk.rst +6
-14@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master -5. TI Linux Firmware: +4. TI Linux Firmware: Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git Branch: ti-linux-firmware@@ -156,18 +152,14 @@ Build procedure: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin - -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 3.2 A53: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images --------------doc/board/ti/j721e_evm.rst +9
-19@@ -130,67 +130,56 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. DM Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware - -5. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + Build procedure: ---------------- -1. SYSFW: - -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed -3. OPTEE: +2. OPTEE: .. code-block:: bash make PLATFORM=k3-j721e CFG_ARM64_core=y
Quoted 8 lines
Quoted 8 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 169
Quoted 8 lines
doc/board/ti/j721e_evm.rst +1
-1-4. U-Boot: +3. U-Boot: * 4.1 R5: .. code-block:: bash make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5
CROSS_COMPILE is superfluous here.
Quoted 2 lines
Quoted 2 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 170
Quoted 2 lines
doc/board/ti/j721e_evm.rst +1
-1- make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware>
Don't we have to indicate the locations of the TF-A binary and SYSFW_PATH?
Quoted 6 lines
Quoted 6 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 176
Quoted 6 lines
doc/board/ti/j721e_evm.rst +0
-0* 4.2 A72: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72
CROSS_COMPILE is superfluous here.
Quoted 2 lines
Quoted 2 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 177
Quoted 2 lines
doc/board/ti/j721e_evm.rst +1
-1- make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>
Where do we indicate SYSFW_PATH?
Quoted 9 lines
Quoted 2 lines
Is there an 'O=build/a72' missing there?
Not strictly missing, no. One of those style things for Heinrich is, we should be consistent in our examples both in terms of O= (when not strictly required, it is for the
_r5variant since you must keep some of that build for the Cortex-A part, so that you can get something that boots the physical machine, in the end).
Quoted 8 lines
Quoted 4 lines
You can combine these as well, by using '
j721e_evm_a72_defconfigall' to both configure and build.Also it might be nice to keep the line length shorter if you can.
Other parts for Heinrich to chime in, to have consistent on all the board examples.
O= is not really needed outside of 'make tests'.
So I think dropping it from examples is fine if the document in itself stays consistent.
We should try to stick to 80 characters per line in documentation for the sake of readers who read the source (as described in
https://u-boot.readthedocs.io/en/latest/develop/docstyle.html). Even in HTML pages it is not nice if you have to scroll horizontally to read the complete command.
Please, use \ to split the bash command over multiple lines.
Best regards
Heinrich
Re: [PATCH v3 19/19] doc: board: ti: Update documentation for binman flow
Hi Heinrich
Quoted 149 lines · Heinrich Schuchardt
Quoted 137 lines · Tom Rini
Quoted 136 lines · Simon Glass
Hi Neha,
Quoted 6 lines · Neha Malcom Francis
Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
Quoted 7 lines
Signed-off-by Neha Malcom Francis <[email protected]>---
doc/board/ti/am62x_sk.rst | 20 ++++--------doc/board/ti/j721e_evm.rst| 37 ++++++++------------- doc/board/ti/k3.rst | 67
++++++++++----------------------------3 files changed, 36 insertions(+), 88 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 117 lines
doc/board/ti/am62x_sk.rst +0
-0@@ -115,23 +115,19 @@ Below is the pictorial representation of bootflow:
Sources:
--------
-1. SYSFW:
- Tree:git://git.ti.com/k3-image-gen/k3-image-gen.git
- Branch: master
-
-2. ATF:
+1. ATF:
Tree: https://github.com/ARM-software/arm-trusted-firmware.git
Branch: master-3. OPTEE:
+2. OPTEE:
Tree: https://github.com/OP-TEE/optee_os.git
Branch: master-4. U-Boot:
+3. U-Boot:
Tree: https://source.denx.de/u-boot/u-boot
Branch: master-5. TI Linux Firmware:
+4. TI Linux Firmware:
Tree:git://git.ti.com/processor-firmware/ti-linux-firmware.git
Branch: ti-linux-firmwaredoc/board/ti/am62x_sk.rst +0
-0@@ -156,18 +152,14 @@ Build procedure:.. code-block:: text
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bindoc/board/ti/am62x_sk.rst +1
-2- -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5BINMAN_INDIRS=<path/to/ti-linux-firmware>
* 3.2 A53:
.. code-block:: text
$ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>Target Images
--------------doc/board/ti/j721e_evm.rst +0
-0@@ -130,67 +130,56 @@ support. Below is the pictorial representationof boot flow:
Sources:
--------
-1. SYSFW:
- Tree:git://git.ti.com/k3-image-gen/k3-image-gen.git
- Branch: master
-
-2. ATF:
+1. ATF:
Tree: https://github.com/ARM-software/arm-trusted-firmware.git
Branch: master-3. OPTEE:
+2. OPTEE:
Tree: https://github.com/OP-TEE/optee_os.git
Branch: master-4. DM Firmware:
- Tree:git://git.ti.com/processor-firmware/ti-linux-firmware.git
- Branch: ti-linux-firmware
-
-5. U-Boot:
+3. U-Boot:
Tree: https://source.denx.de/u-boot/u-boot
Branch: master+4. TI Linux Firmware:
+ Tree:git://git.ti.com/processor-firmware/ti-linux-firmware.git
+ Branch: ti-linux-firmware
+
Build procedure:
----------------
-1. SYSFW:doc/board/ti/j721e_evm.rst +1
-6- -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF:.. code-block:: bash
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
-3. OPTEE:
+2. OPTEE:.. code-block:: bash
make PLATFORM=k3-j721e CFG_ARM64_core=y
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
-4. U-Boot:
+3. U-Boot:* 4.1 R5:
.. code-block:: bash
make CROSS_COMPILE=arm-linux-gnueabihf-
j721e_evm_r5_defconfigO=build/r5
CROSS_COMPILEis superfluous here.
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
- make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware>
Don't we have to indicate the locations of the TF-A binary and
SYSFW_PATH?
R5 builds do not require ATF. As for SYSFW_PATH, ti-linux-firmware contains those within ti-sysfw/ which is picked up by binman.
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
* 4.2 A72:
.. code-block:: bash
make CROSS_COMPILE=aarch64-linux-gnu-
j721e_evm_a72_defconfigO=build/a72
Quoted 9 lines
CROSS_COMPILEis superfluous here.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
- make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF
dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF
dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>Where do we indicate
SYSFW_PATH?
Please see reply to previous review comment.
Quoted 22 lines
Quoted 9 lines
Quoted 2 lines
Is there an 'O=build/a72' missing there?
Not strictly missing, no. One of those style things for Heinrich is, we should be consistent in our examples both in terms of O= (when not strictly required, it is for the
_r5variant since you must keep some of that build for the Cortex-A part, so that you can get something that boots the physical machine, in the end).Quoted 8 lines
Quoted 4 lines
You can combine these as well, by using '
j721e_evm_a72_defconfigall' to both configure and build.Also it might be nice to keep the line length shorter if you can.
Other parts for Heinrich to chime in, to have consistent on all the board examples.
O= is not really needed outside of 'make tests'.
So I think dropping it from examples is fine if the document in itself stays consistent.
Quoted 8 lines
We should try to stick to 80 characters per line in documentation for the sake of readers who read the source (as described in
https://u-boot.readthedocs.io/en/latest/develop/docstyle.html). Even in HTML pages it is not nice if you have to scroll horizontally to read the complete command.Please, use \ to split the bash command over multiple lines.
Understood, will make those doc changes, thanks!
Quoted 3 lines
Best regards
Heinrich
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH v3 19/19] doc: board: ti: Update documentation for binman flow
In reply to Simon GlassHi Simon
Quoted 142 lines · Simon Glass
Hi Neha,
Quoted 6 lines · Neha Malcom Francis
Earlier documentation specified builds for generating bootloader images using an external TI repository k3-image-gen and core-secdev-k3. Modify this to using the binman flow so that user understands how to build the final boot images.
Quoted 6 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- doc/board/ti/am62x_sk.rst | 20 ++++-------- doc/board/ti/j721e_evm.rst | 37 ++++++++------------- doc/board/ti/k3.rst | 67 ++++++++++---------------------------- 3 files changed, 36 insertions(+), 88 deletions(-)Reviewed-by Simon Glass <[email protected]>Quoted 124 lines
doc/board/ti/am62x_sk.rst +6
-14@@ -115,23 +115,19 @@ Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master -5. TI Linux Firmware: +4. TI Linux Firmware: Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git Branch: ti-linux-firmware@@ -156,18 +152,14 @@ Build procedure: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am62x_evm_r5_defconfig O=/tmp/r5 - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 - $ cd <k3-image-gen> - $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=am62x SBL=/tmp/r5/spl/u-boot-spl.bin SYSFW_PATH=<path to ti-linux-firmware>/ti-sysfw/ti-fs-firmware-am62x-gp.bin - -Use the tiboot3.bin generated from last command + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- O=/tmp/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 3.2 A53: .. code-block:: text $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- am62x_evm_a53_defconfig O=/tmp/a53 - $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- ATF=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<path to ti-linux-firmware>/ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f O=/tmp/a53 + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- BL31=<path to ATF dir>/build/k3/lite/release/bl31.bin TEE=<path to OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware> Target Images --------------doc/board/ti/j721e_evm.rst +11
-21@@ -130,67 +130,56 @@ support. Below is the pictorial representation of boot flow: Sources: -------- -1. SYSFW: - Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git - Branch: master - -2. ATF: +1. ATF: Tree: https://github.com/ARM-software/arm-trusted-firmware.git Branch: master -3. OPTEE: +2. OPTEE: Tree: https://github.com/OP-TEE/optee_os.git Branch: master -4. DM Firmware: - Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git - Branch: ti-linux-firmware - -5. U-Boot: +3. U-Boot: Tree: https://source.denx.de/u-boot/u-boot Branch: master +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + Build procedure: ---------------- -1. SYSFW: - -.. code-block:: bash - - make CROSS_COMPILE=arm-linux-gnueabihf- SOC=j721e - -2. ATF: +1. ATF: .. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed -3. OPTEE: +2. OPTEE: .. code-block:: bash make PLATFORM=k3-j721e CFG_ARM64_core=y -4. U-Boot: +3. U-Boot: * 4.1 R5: .. code-block:: bash make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=build/r5 - make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 + make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5 BINMAN_INDIRS=<path/to/ti-linux-firmware> * 4.2 A72:
Quoted 8 lines
doc/board/ti/j721e_evm.rst support. Below is the pictorial representation of boot flow: · line 177
Quoted 5 lines
doc/board/ti/j721e_evm.rst +1
-1.. code-block:: bash make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=build/a72 - make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j721e/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72 + make CROSS_COMPILE=aarch64-linux-gnu- BL31=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=<path/to/ti-linux-firmware>Is there an 'O=build/a72' missing there?
Yes, thanks for catching that!
Quoted 6 lines
You can combine these as well, by using '
j721e_evm_a72_defconfigall' to both configure and build.Also it might be nice to keep the line length shorter if you can. [..]
Thanks I will do that.
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 21 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devices
Quoted 6 lines
Series intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error
Signature · 1 line
Tom
Hi Tom
Quoted 27 lines · Tom Rini
Quoted 25 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')
1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.
2. Regarding iot2050, build fails since it uses arch/arm/mach-k3/config.mk which is now entirely binman based. Will try moving iot2050 to binman as well.
[1] https://lore.kernel.org/all/[email protected]/
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi Jan,
Quoted 48 lines · Neha Malcom Francis
Hi Tom
Quoted 27 lines · Tom Rini
Quoted 25 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.
I'll need some help with this, might need to know the bootloader flow to make a clean migration.
Quoted 3 lines
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 61 lines · Neha Malcom Francis
Hi Jan,
Quoted 58 lines · Neha Malcom Francis
Hi Tom
Quoted 31 lines · Tom Rini
Quoted 29 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.
Quoted 6 lines
Quoted 3 lines
2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to make a clean migration.
Where do I have to look at? Is there a git repo with that experiment somewhere?
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Hi Jan,
Quoted 66 lines · Jan Kiszka
Quoted 65 lines · Neha Malcom Francis
Hi Jan,
Quoted 61 lines · Neha Malcom Francis
Hi Tom
Quoted 31 lines · Tom Rini
Quoted 29 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.
Quoted 8 lines
Quoted 2 lines
I'll need some help with this, might need to know the bootloader flow to make a clean migration.
Where do I have to look at? Is there a git repo with that experiment somewhere?
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since k3_fit_atf.sh is no longer there) has any concept of signing? Is core-secdev-k3 ever used?
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi Jan
Quoted 72 lines · Neha Malcom Francis
Hi Jan,
Quoted 69 lines · Jan Kiszka
Quoted 67 lines · Neha Malcom Francis
Hi Jan,
Quoted 53 lines · Neha Malcom Francis
Hi Tom
Quoted 31 lines · Tom Rini
Quoted 29 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to make a clean migration.
Quoted 8 lines
Quoted 5 lines
Where do I have to look at? Is there a git repo with that experiment somewhere?
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since
k3_fit_atf.shis no longer there) has any concept of signing? Is core-secdev-k3 ever used?
I have a tree posted here [2] that builds flash.bin with no error for me. Please confirm whether your build flow does the same and also let me know if the binary actually boots.
[2] https://github.com/nehamalcom/u-boot/tree/migration-to-binman-cicd-iot2050
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 98 lines · Neha Malcom Francis
Hi Jan
Quoted 85 lines · Neha Malcom Francis
Hi Jan,
Quoted 82 lines · Jan Kiszka
Quoted 70 lines · Neha Malcom Francis
Hi Jan,
Quoted 67 lines · Neha Malcom Francis
Hi Tom
Quoted 38 lines · Tom Rini
Quoted 36 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories
such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3
Security Development Tools) that was plumbed into the U-Boot build flow
to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting
of a signed system firmware image and board configuration binaries,
this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for
the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined
boot flow) instead of k3-image-gen.Quoted 7 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the
typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:Thanks for checking this! Couple things:
Quoted 5 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input
path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.Quoted 7 lines
Quoted 3 lines
2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to
make a clean migration.Where do I have to look at? Is there a git repo with that experiment somewhere?
Quoted 9 lines
Quoted 2 lines
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since
k3_fit_atf.shis no longer there) has any concept of signing? Is core-secdev-k3 ever used?
Quoted 7 lines
I have a tree posted here [2] that builds flash.bin with no error for me. Please confirm whether your build flow does the same and also let me know if the binary actually boots.
[2]
https://github.com/nehamalcom/u-boot/tree/migration-to-binman-cicd-iot2050
FWIW, dependencies, signing procedure etc. are all documented in u-boot/doc/board/siemens/iot2050.rst.
I will try to have a look at that patch as well.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 98 lines · Neha Malcom Francis
Hi Jan
Quoted 85 lines · Neha Malcom Francis
Hi Jan,
Quoted 82 lines · Jan Kiszka
Quoted 70 lines · Neha Malcom Francis
Hi Jan,
Quoted 67 lines · Neha Malcom Francis
Hi Tom
Quoted 38 lines · Tom Rini
Quoted 36 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories
such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3
Security Development Tools) that was plumbed into the U-Boot build flow
to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting
of a signed system firmware image and board configuration binaries,
this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for
the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined
boot flow) instead of k3-image-gen.Quoted 7 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the
typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:Thanks for checking this! Couple things:
Quoted 5 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input
path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.Quoted 7 lines
Quoted 3 lines
2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to
make a clean migration.Where do I have to look at? Is there a git repo with that experiment somewhere?
Quoted 9 lines
Quoted 2 lines
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since
k3_fit_atf.shis no longer there) has any concept of signing? Is core-secdev-k3 ever used?
Quoted 7 lines
I have a tree posted here [2] that builds flash.bin with no error for me. Please confirm whether your build flow does the same and also let me know if the binary actually boots.
[2]
https://github.com/nehamalcom/u-boot/tree/migration-to-binman-cicd-iot2050
I've tested the latest version in that branch in the meantime. It compiles but it does not work. This is missing from the original script:
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +9 -0
@@ -92,6 +92,15 @@ }; }; }; + + configurations { + default = "spl"; + spl { + fdt = "fdt-0"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + }; + }; }; fit@0x380000 {
I didn't test secure booting yet, though. We are currently still signing via tools/iot2050-sign-fw.sh, partly due to missing features in binman (there were a lot of proposals on the list recently, may that is solved now), but partly also due to some remaining breakages.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Hi Jan,
Quoted 121 lines · Jan Kiszka
Quoted 98 lines · Neha Malcom Francis
Hi Jan
Quoted 85 lines · Neha Malcom Francis
Hi Jan,
Quoted 82 lines · Jan Kiszka
Quoted 70 lines · Neha Malcom Francis
Hi Jan,
Quoted 67 lines · Neha Malcom Francis
Hi Tom
Quoted 38 lines · Tom Rini
Quoted 36 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories
such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3
Security Development Tools) that was plumbed into the U-Boot build flow
to generate boot images for TI K3 platform devices. And instead, we move
towards using binman that aligns better with the community standard build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image
consisting
of a signed system firmware image and board configuration
binaries,
this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for
the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined
boot flow) instead of k3-image-gen.Quoted 7 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the
typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:Thanks for checking this! Couple things:
Quoted 5 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input
path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.Quoted 7 lines
Quoted 3 lines
2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to
make a clean migration.Where do I have to look at? Is there a git repo with that experiment somewhere?
Quoted 9 lines
Quoted 2 lines
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since
k3_fit_atf.shis no longer there) has any concept of signing? Is core-secdev-k3 ever used?Quoted 7 lines
I have a tree posted here [2] that builds flash.bin with no error for me. Please confirm whether your build flow does the same and also let me know if the binary actually boots.
[2]
https://github.com/nehamalcom/u-boot/tree/migration-to-binman-cicd-iot2050I've tested the latest version in that branch in the meantime. It compiles but it does not work. This is missing from the original script:
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +2
-0@@ -92,6 +92,15 @@ }; }; }; + + configurations {
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi line 106
Quoted 10 lines
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +7
-0+ default = "spl"; + spl { + fdt = "fdt-0"; + firmware = "atf"; + loadables = "tee", "dm", "spl"; + }; + }; }; fit@0x380000 {
Thanks for this! I'll make sure to add this, so we are booting fine on non-secure with this patch applied as well right?
Quoted 4 lines
I didn't test secure booting yet, though. We are currently still signing via
tools/iot2050-sign-fw.sh, partly due to missing features in binman (there were a lot of proposals on the list recently, may that is solved now), but partly also due to some remaining breakages.
Got it. To confirm, this is not modifying anything in the secure flow is it? flash.bin is just signed manually using tools/iot2050-sign-fw.sh correct?
Quoted 3 lines
Jan
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 135 lines · Neha Malcom Francis
Hi Jan,
Quoted 132 lines · Jan Kiszka
Quoted 104 lines · Neha Malcom Francis
Hi Jan
Quoted 91 lines · Neha Malcom Francis
Hi Jan,
Quoted 88 lines · Jan Kiszka
Quoted 76 lines · Neha Malcom Francis
Hi Jan,
Quoted 73 lines · Neha Malcom Francis
Hi Tom
Quoted 44 lines · Tom Rini
Quoted 41 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories
such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3
Security Development Tools) that was plumbed into the U-Boot build flow
to generate boot images for TI K3 platform devices. And instead, we
move
towards using binman that aligns better with the community standard
build
flow.This series uses binman for all K3 platforms supported on U-Boot currently;
both HS (High Security, both SE and FS) and GP (General Purpose) devices.Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting
of a signed system firmware image and board configuration binaries,
this is needed to bring up system firmware during U-Boot R5 SPL
startup.
* Board configuration data contain board-specific information
such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for
the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined
boot flow) instead of k3-image-gen.Quoted 7 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the
typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:Thanks for checking this! Couple things:
Quoted 5 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input
path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
Quoted 5 lines
And then:
https://source.denx.de/u-boot/u-boot/-/jobs/617965#L1328
Error: arch/arm/dts/k3-am62a-sk-binman.dtsi:167.1-8 syntax error I've fixed this, minor but serious change.Quoted 7 lines
Quoted 3 lines
2. Regarding iot2050, build fails since it uses
arch/arm/mach-k3/config.mkwhich is now entirely binman based. Will try moving iot2050 to binman as well.I'll need some help with this, might need to know the bootloader flow to
make a clean migration.Where do I have to look at? Is there a git repo with that experiment somewhere?
Quoted 9 lines
Quoted 2 lines
Jan
There's no experiment yet, I will send one today; but I do not have complete understanding of the booting; whether the tispl.bin (which I assume is the only boot component that is affecting iot2050 boot since
k3_fit_atf.shis no longer there) has any concept of signing? Is core-secdev-k3 ever used?Quoted 7 lines
I have a tree posted here [2] that builds flash.bin with no error for me. Please confirm whether your build flow does the same and also let me know if the binary actually boots.
[2]
https://github.com/nehamalcom/u-boot/tree/migration-to-binman-cicd-iot2050I've tested the latest version in that branch in the meantime. It compiles but it does not work. This is missing from the original script:
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +7
-0@@ -92,6 +92,15 @@ }; }; }; + + configurations { + default = "spl"; + spl { + fdt = "fdt-0"; + firmware = "atf"; + loadables = "tee", "dm", "spl";
Quoted 8 lines
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
Quoted 5 lines
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi +2
-0+ }; + }; }; fit@0x380000 {Thanks for this! I'll make sure to add this, so we are booting fine on non-secure with this patch applied as well right?
Right, at least on the PG1 variants of our boards (only tested one so far). But I would be fairly optimistic for PG2 and M.2 as well.
Quoted 9 lines
Quoted 5 lines
I didn't test secure booting yet, though. We are currently still signing via
tools/iot2050-sign-fw.sh, partly due to missing features in binman (there were a lot of proposals on the list recently, may that is solved now), but partly also due to some remaining breakages.Got it. To confirm, this is not modifying anything in the secure flow is it? flash.bin is just signed manually using
tools/iot2050-sign-fw.shcorrect?
That would be my expectation, at least until we resolve the blockers for signing with binman. But I'd still like to verify this the next days.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 40 lines · Neha Malcom Francis
Hi Tom
Quoted 27 lines · Tom Rini
Quoted 25 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 7 lines
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
OK. I'm not sure the priority order here. I would like to see this series get in first, and get everything else rebased on top of it.
Signature · 1 line
Tom
Quoted 46 lines · Tom Rini
Quoted 45 lines · Neha Malcom Francis
Hi Tom
Quoted 27 lines · Tom Rini
Quoted 25 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')
Quoted 7 lines
Quoted 2 lines
1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
OK. I'm not sure the priority order here. I would like to see this series get in first, and get everything else rebased on top of it.
Hi Tom, I aligned with Neha on the order which will be easier for us both in terms of handling both the series,
1. J721S2 and J7200 HS defconfig merge
( https://lore.kernel.org/r/[email protected] )
2. Binman can go after that
3. J721E HS defconfig patches
( https://lore.kernel.org/u-boot/[email protected] ) Will re-roll once binman is merged
Thanks and regards,
Manorit
Quoted 1 line
Tom
Hi Tom
Quoted 65 lines · Manorit Chawdhry
Quoted 46 lines · Tom Rini
Quoted 45 lines · Neha Malcom Francis
Hi Tom
Quoted 27 lines · Tom Rini
Quoted 25 lines · Neha Malcom Francis
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesSeries intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Quoted 6 lines
Quoted 2 lines
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
So, next up is fixing this in CI. After taking Andrew's patch to fix the typedef issue, and after my patches to ensure we can get pyyaml/jsonschema for python, there's problems still:
Thanks for checking this! Couple things:
Quoted 4 lines
Over at https://source.denx.de/u-boot/u-boot/-/jobs/617966:
binman: Filename 'spl/dts/k3-am68-sk-base-board.dtb' not found in input path (.,/builds/u-boot/u-boot,board/ti/j721s2,arch/arm/dts) (cwd='/tmp/.bm-work/j721s2_hs_evm_a72')Quoted 7 lines
Quoted 2 lines
1. This is dependent on the patch merging J721S2 HS and GP configs [1]. However it has been reverted on -next, seen in the same thread.
OK. I'm not sure the priority order here. I would like to see this series get in first, and get everything else rebased on top of it.
Hi Tom, I aligned with Neha on the order which will be easier for us both in terms of handling both the series,
1. J721S2 and J7200 HS defconfig merge
( https://lore.kernel.org/r/[email protected] )
2. Binman can go after that
3. J721E HS defconfig patches
( https://lore.kernel.org/u-boot/[email protected] ) Will re-roll once binman is merged
Quoted 6 lines
Thanks and regards,
ManoritQuoted 1 line
Tom
Bringing this back after yesterday's discussion. J7 HS is a definite regression and I think this should be taken into 2023.07 and not wait for binman in 2023.10. Rebasing binman on top of the J7 HS fix patches is very minimal effort.
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi
Quoted 22 lines
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devices
Quoted 6 lines
Series intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
This simplifies building U-Boot with sysfw alot - thanks for your work! I have tested this series on
an am642 based design. One thing is missing for my HSM use case. I want to build an unsigned
Image and need to sign it with binman in the context of the HSM. Therefore we need repacking
support. Are you working on that too?
Signature · 5 lines
greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy
Hi Christian
Quoted 31 lines · Christian Gmeiner
Hi
Quoted 22 lines
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesQuoted 6 lines
Series intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
Quoted 8 lines
This simplifies building U-Boot with sysfw alot - thanks for your work! I have tested this series on
an am642 based design. One thing is missing for my HSM use case. I want to build an unsigned
Image and need to sign it with binman in the context of the HSM. Therefore we need repacking
support. Are you working on that too?
So the idea of signing using binman in the HSM flow was discussed earlier [1] and the final call was to leave the boot artifacts that could be re-signed. So repacking support is not part of this series right now, you can use the tools mentioned in the thread [1] to do that for simple enough FIT images. However complex images like tiboot3.bin and tispl.bin might be a future action. I am not completely sure of the HSM flow though, pinging Andrew to comment further on this.
[1] https://lore.kernel.org/all/[email protected]/
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi
Quoted 50 lines · Christian Gmeiner
Quoted 31 lines
Hi
Quoted 22 lines
This series aims to eliminate the use of additional custom repositories such as k3-image-gen (K3 Image Generation) repo and core-secdev-k3 (K3 Security Development Tools) that was plumbed into the U-Boot build flow to generate boot images for TI K3 platform devices. And instead, we move towards using binman that aligns better with the community standard build flow.
This series uses binman for all K3 platforms supported on U-Boot currently; both HS (High Security, both SE and FS) and GP (General Purpose) devices.
Background on using k3-image-gen:
* TI K3 devices require a SYSFW (System Firmware) image consisting of a signed system firmware image and board configuration binaries, this is needed to bring up system firmware during U-Boot R5 SPL startup.
* Board configuration data contain board-specific information such as resource management, power management and security.Background on using core-secdev-k3:
* Contains resources to sign x509 certificates for HS devicesQuoted 6 lines
Series intends to use binman to take over the packaging and signing for the R5 bootloader images tiboot3.bin (and sysfw.itb, for non-combined boot flow) instead of k3-image-gen.
Series also packages the A72/A53 bootloader images (tispl.bin and u-boot.img) using ATF, OPTEE and DM (Device Manager)
Quoted 8 lines
This simplifies building U-Boot with sysfw alot - thanks for your work! I have tested this series on
an am642 based design. One thing is missing for my HSM use case. I want to build an unsigned
Image and need to sign it with binman in the context of the HSM. Therefore we need repacking
support. Are you working on that too?So the idea of signing using binman in the HSM flow was discussed earlier [1] and the final call was to leave the boot artifacts that could be re-signed. So repacking support is not part of this series right now, you can use the tools mentioned in the thread [1] to do that for simple enough FIT images. However complex images like tiboot3.bin and tispl.bin might be a future action. I am not completely sure of the HSM flow though, pinging Andrew to comment further on this.
Quoted 1 line
Okay.. I will spend some days next week getting the U-Boot signed. With your patch series it should be easy to use 'developer' key material to do everything locally.
For the HSM case I think I need to play with the secdev scripts.
Will keep you updated.
greets
--
Christian Gmeiner, MSc