Adds support for TrustedFirmware-M
v6 cover Adds support for TrustedFirmware-M
This series adds support for TrustedFirmware-M (TF-M).
https://trustedfirmware-m.readthedocs.io
https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Trusted Firmware-M implements the Secure Processing Environment (SPE) for Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23, Cortex-M55, Cortex-M85 processors) or dual-core platforms.
Patches 1-2: Address host Python package dependencies. Patch 3: Add support for TF-M.
Changes in v5:
- Remove python-cbor2 host support dependency which is already merged mainline.
- Use EXTRA_DOWNLOAD instead of subpackages for 3rd parties.
- Remove TF-M tests 3rd parties.
- Made few Kconfig, and cmake changes.
Changes in v4:
- Fix a recursive dependency loop issue.
Changes in v3:
- Add select BR2_HOST_CMAKE_AT_LEAST_3_21 to avoid cmake configure error due to old cmake version.
- Fix a Kconfig warning.
Changes in v2:
- Add TF-M to DEVELOPERS file
- Fix few nit.
Kory Maincent (3):
package/python-intelhex: Add support for host package package/python-click: Add support for host package
boot: Add support for TrustedFirmware-M package
DEVELOPERS | 1 + boot/Config.in | 1 + boot/tf-m/Config.in | 95 ++++++++++++++++ boot/tf-m/tf-m.hash | 11 ++ boot/tf-m/tf-m.mk | 126 +++++++++++++++++++++ package/python-click/python-click.mk | 1 + package/python-intelhex/python-intelhex.mk | 1 + utils/genrandconfig | 3 + 8 files changed, 239 insertions(+) create mode 100644 boot/tf-m/Config.in create mode 100644 boot/tf-m/tf-m.hash create mode 100644 boot/tf-m/tf-m.mk
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 1/3 package/python-intelhex: Add support for host package
Add support for the host package to enable future support for TrustedFirmware-M, which depends on it.
--- package/python-intelhex/python-intelhex.mk | 1 + 1 file changed, 1 insertion(+)
package/python-intelhex/python-intelhex.mk +1 -0
@@ -12,3 +12,4 @@ PYTHON_INTELHEX_LICENSE = BSD-3-Clause PYTHON_INTELHEX_LICENSE_FILES = LICENSE.txt $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 2/3 package/python-click: Add support for host package
In reply to Kory Maincent via buildrootAdd support for the host package to enable future support for TrustedFirmware-M, which depends on it.
--- package/python-click/python-click.mk | 1 + 1 file changed, 1 insertion(+)
package/python-click/python-click.mk +1 -0
@@ -12,3 +12,4 @@ PYTHON_CLICK_LICENSE_FILES = LICENSE.rst PYTHON_CLICK_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v6 3/3 boot: Add support for TrustedFirmware-M package
In reply to Kory Maincent via buildrootAdd support for TrustedFirmware-M:
https://trustedfirmware-m.readthedocs.io
https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
Trusted Firmware-M (TF-M) implements the Secure Processing Environment (SPE) for Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23, Cortex-M55, Cortex-M85 processors) or dual-core platforms.
---
Changes in v5:
- Use EXTRA_DOWNLOAD instead of subpackages for 3rd parties.
- Remove TF-M tests 3rd parties.
- Remove 3rd parties submenu in Kconfig.
- Remove useless environment to have a cleaner cmake command.
- Replace the build test by a genrandconfig update.
Changes in v4:
- Fix a recursive dependency loop issue. TF-M was depend on 3rd parties which where was patch dependent on TF-M to have access to their patches. Instead patch the 3rd parties sources in the TF-M packages.
Changes in v3:
- Add select BR2_HOST_CMAKE_AT_LEAST_3_21 to avoid cmake configure error due to old cmake version.
- Fix a Kconfig check-package too long line warning.
Changes in v2:
- Add TF-M to DEVELOPERS file
- Fix few nit.
--- DEVELOPERS | 1 + boot/Config.in | 1 + boot/tf-m/Config.in | 95 +++++++++++++++++++++++++++++++++ boot/tf-m/tf-m.hash | 11 ++++ boot/tf-m/tf-m.mk | 126 ++++++++++++++++++++++++++++++++++++++++++++ utils/genrandconfig | 3 ++ 6 files changed, 237 insertions(+) create mode 100644 boot/tf-m/Config.in create mode 100644 boot/tf-m/tf-m.hash create mode 100644 boot/tf-m/tf-m.mk
DEVELOPERS +1 -0
@@ -2030,6 +2030,7 @@ F: board/octavo/osd32mp1-brk/ F: board/octavo/osd32mp1-red/ F: configs/octavo_osd32mp1_brk_defconfig F: configs/octavo_osd32mp1_red_defconfig +F: boot/tf-m/ N: Kris Bahnsen <[email protected]> F: package/wilc-firmware/
boot/Config.in +1 -0
@@ -17,6 +17,7 @@ source "boot/shim/Config.in" source "boot/syslinux/Config.in" source "boot/ti-k3-boot-firmware/Config.in" source "boot/ti-k3-r5-loader/Config.in" +source "boot/tf-m/Config.in" source "boot/uboot/Config.in" source "boot/vexpress-firmware/Config.in" source "boot/xilinx-prebuilt/Config.in"
boot/tf-m/Config.in new file +95 -0
95 lines not on this page · raw message
boot/tf-m/tf-m.hash new file +11 -0
@@ -0,0 +1,11 @@ +# Locally calculated +sha256 0b8df41136d4c381787e4149f3a0c002b39a168db7995eef15ebe4f27fa16098 tf-m-0c4c99ba33b3e66deea070e149279278dc7647f4-git4.tar.gz +sha256 c16df600171bfdae60d22a01f046d742f89ba1046e2e5ed135bbf091b21be34f license.rst +sha256 3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38 mbedtls-3.6.0.tar.bz2 +sha256 9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b 3rd_parties/mbedcrypto/LICENSE +sha256 bcee8c4b5a51477b27c6c587d11f46388823626aba7bd5082c77864a89dcf1b7 mcuboot-v2.1.0.tar.gz +sha256 86438164119907debf649e2f9f18a43ad506d75421c9d9675700066b0456205d 3rd_parties/mcuboot/LICENSE +sha256 0f706ad90ada600bd1ddbdf8dc6f2f5910e11de355bb4454b9b4123f0e4ff525 qcbor-v1.2.tar.gz +sha256 fc6db297a2751188d9c2ece6ee468a295f285b9a24f96eab954a1a823c71be3b 3rd_parties/qcbor/README.md +sha256 d846342840831f9124157b69b8edcdfcacc5427691f5b3341f714f0235c3cc49 cmsis-d0c460c169.tar.gz +sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 3rd_parties/cmsis/LICENSE
boot/tf-m/tf-m.mk new file +126 -0
126 lines not on this page · raw message
utils/genrandconfig +3 -0
@@ -371,6 +371,9 @@ async def fixup_config(sysinfo, configfile): configlines.remove('BR2_TARGET_S500_BOOTLOADER=y\n') configlines.remove('BR2_TARGET_S500_BOOTLOADER_BOARD=""\n') + if 'BR2_TARGET_TF_M=y\n' in configlines: + configlines.append('BR2_TARGET_TF_M_PLATFORM="arm/mps2/an521"\n') + if 'BR2_TARGET_TI_K3_R5_LOADER=y\n' in configlines and \ 'BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG=y\n' in configlines and \ 'BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG=""\n' in configlines:
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
A message that is not in the archive (sent off-list or not yet received): 20241017154643.442837bf@windsurf
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [Buildroot] [PATCH v6 3/3] boot: Add support for TrustedFirmware-M package
Quoted 70 lines · On Thu, 17 Oct 2024 16:05:28 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 10 lines · Thomas Petazzoni
Hello Köry,
Thanks for the new iteration.
Quoted 2 lines · On Mon, 14 Oct 2024 14:29:22 +0000 Kory Maincent via buildroot…
Changes in v5:
- UseEXTRA_DOWNLOADinstead of subpackages for 3rd parties.Quoted 7 lines
I didn't follow the conversation. What was the reasoning to switch "back" from sub-packages to
EXTRA_DOWNLOADS?In particular, I remember in our earlier conversation, we had figured out that
EXTRA_DOWNLOADSwould not work because one of the packages was using git sub-modules, and therefore the Github auto-generated tarball was not sufficient.The reasoning was that it's much simpler than sub-packages - in particular
because the sub-packages are ugly, the super-package has to traipse in the sub-packages source directory to be able to do its thing.There was indeed one of the sub-packages that had to be kept because of the
submodules, but apparently this is no longer the case.Quoted 20 lines
Quoted 6 lines
boot/tf-m/Config.in new file +4
-0+config BR2_TARGET_TF_M_MBEDTLS_TARBALL_LOCATION + string "URL of custom mbedtls tarball" \ + if !BR2_TARGET_TF_M_LATEST_VERSION + default"https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2"
Is it now possible because they provide release tarballs, that include all sub-modules?
Quoted 10 lines
boot/tf-m/Config.in new file +4
-0+config BR2_TARGET_TF_M_MCUBOOT_TARBALL_LOCATION + string "URL of mcuboot tarball" \ + if !BR2_TARGET_TF_M_LATEST_VERSION + default "$(callgithub,mcu-tools,mcuboot,v2.1.0)/mcuboot-v2.1.0.tar.gz" +
boot/tf-m/Config.in new file +4
-0+config BR2_TARGET_TF_M_CMSIS_TARBALL_LOCATION + string "URL of cmsis tarball" \ + if !BR2_TARGET_TF_M_LATEST_VERSION + default "$(callgithub,arm-software,cmsis_6,d0c460c169)/cmsis-d0c460c169.tar.gz" +
Quoted 8 lines
Quoted 5 lines
boot/tf-m/Config.in new file +4
-0+config BR2_TARGET_TF_M_QCBOR_TARBALL_LOCATION + string "URL of qcbor tarball" \ + if !BR2_TARGET_TF_M_LATEST_VERSION + default "$(callgithub,laurencelundblade,qcbor,v1.2)/qcbor-v1.2.tar.gz"
My concern with this is that we're trying to move away from auto-generated Github tarballs,
Yeah, my feedback was from before we decided that...
Quoted 4 lines
and this adds a case where it would be
difficult to switch away from those auto-generated tarballs and use a proper Git clone: this would require sub-packages, like you did previously.I would really prefer a solution where it is possible to specify all the
information needed to be able to do the download in a single URL (*). That way, we can also use git and cargo forEXTRA_DOWNLOADS. So something like git+https://github.com/laurencelundblade/[email protected]
Quoted 5 lines
And that might even allow us to avoid a mass conversion away from the
github macro and instead encode everything there.(*) Should probably be called something else than URL, because this no
longer looks like a real URL. dlspec?
If we don't use tarball for extra download, couldn't we decrease the git clone time using --single-branch and/or --depth 1?
Regards,
Signature · 7 lines
Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v6 3/3] boot: Add support for TrustedFirmware-M package
Quoted 2 lines · On Mon, 21 Oct 2024 11:47:52 +0200 Kory Maincent <[email protected]>…
If we don't use tarball for extra download, couldn't we decrease the git clone time using --single-branch and/or --depth 1?
One of the big points of switching to Git downloads is that we keep a cache of the Git repository, which doesn't work well with --depth 1.
See the reasoning in commit 4f54c959dc18cb3ca56e8f54b358fc219352d7bd.
Best regards,
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines · On Mon, 14 Oct 2024 14:29:19 +0000 Kory Maincent <[email protected]>…
This series adds support for TrustedFirmware-M (TF-M).
https://trustedfirmware-m.readthedocs.io
https://git.trustedfirmware.org/TF-M/trusted-firmware-m.gitTrusted Firmware-M implements the Secure Processing Environment (SPE) for Armv8-M, Armv8.1-M architectures (e.g. the Cortex-M33, Cortex-M23, Cortex-M55, Cortex-M85 processors) or dual-core platforms.
Patches 1-2: Address host Python package dependencies. Patch 3: Add support for TF-M.
Quoted 6 lines
Changes in v5:
- Remove python-cbor2 host support dependency which is already merged mainline.
- UseEXTRA_DOWNLOADinstead of subpackages for 3rd parties.
- Remove TF-M tests 3rd parties.
- Made fewKconfig, and cmake changes.
Oops, small mistake, I used v6 in the subject instead of v5.
Regards,
Signature · 7 lines
Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot