From patchwork Thu Jun 22 16:02:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Dannenberg X-Patchwork-Id: 1798490 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qn4vS2vMCz20Xt for ; Fri, 23 Jun 2023 02:04:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 82E024244F; Thu, 22 Jun 2023 16:04:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 82E024244F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gfQpCfNvjBz8; Thu, 22 Jun 2023 16:04:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 88E4A4212B; Thu, 22 Jun 2023 16:04:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 88E4A4212B X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CF6D81BF3D1 for ; Thu, 22 Jun 2023 16:02:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 323D383CB7 for ; Thu, 22 Jun 2023 16:02:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 323D383CB7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3HhY8IwSDgI4 for ; Thu, 22 Jun 2023 16:02:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BEBC083C67 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by smtp1.osuosl.org (Postfix) with ESMTPS id BEBC083C67 for ; Thu, 22 Jun 2023 16:02:18 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35MG2HW8063919 for ; Thu, 22 Jun 2023 11:02:17 -0500 Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35MG2HpQ022555 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 22 Jun 2023 11:02:17 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 22 Jun 2023 11:02:16 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 22 Jun 2023 11:02:16 -0500 Received: from dasso.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35MG2Git107613; Thu, 22 Jun 2023 11:02:16 -0500 To: Date: Thu, 22 Jun 2023 11:02:01 -0500 Message-ID: <20230622160212.2063472-1-dannenberg@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1687449737; bh=DeqSkANbJeSOhyNkyqzWUEWjX5InDT35/x5hqrd3fgQ=; h=From:To:CC:Subject:Date; b=JOFRyUBslLvqvlbipEBNjKOLF10OeyjG01sylaiC3xCEfDpxiNZRTxq7lMaFjwyT7 gl6I36jBLc3V384wTrctOv4bgEdNuIjCJJnnQb8hOb1VNz4O+BxLqxkZFxDjCGVmCz F/6pWsHxxQwgvbHkFHR34Yla49mRjdCBThrpldV8= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=JOFRyUBs Subject: [Buildroot] [PATCH v9 00/11] add support for TI's AM64x and AM62x boards X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andreas Dannenberg via buildroot From: Andreas Dannenberg Reply-To: Andreas Dannenberg Cc: Andreas Dannenberg Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This series introduces support for TI's AM64x and AM62x SK boards. This updated series introduces an additional package to abstract the signing process for TI K3 "high security" devices to enable a better out-of-box experience and has some other smaller improvements, see change log. For more on the background and future plans of this overall effort please refer to the cover letter of PATCH v8, see [5]. Changes in v9: - adds new ti-core-secdev-k3 package to manage they binary boot artifact signing as required on secure HS-FS and HS-SE device variants. With this the user no longer needs to provide the location of the underlying core-secdev-k3 TI tool through the TI_SECURE_DEV_PKG environmental variable using the extra step that was required in PATCH v8, enabling an easier out-of-box experience for "fresh" SK-AM62B / SK-AM64B TI boards which now all come with "HS-FS" devices. Note that once keys/certificates are programmed into an HS-FS device, effectively turning them into HS-SE devices, the user will then need to provide their private keys for signing which from our experience is best done through the TI_SECURE_DEV_PKG env variable, in analogy also with the TI Yocto-based SDK [4]. This is also the reason this package doesn't introduce any hard dependencies at this time. Thanks François Perrad and Arnout Vandecappelle for feedback/suggestions here. - added Kconfig multiple-choice support for picking the SoC security type (GP, HS-FS, and HS-SE) for better ease-of-use - fixed an issue with the hash check for the ti-k3-r5-loader as identified by Patrick Oppenlander - added Tested-by: Julien Olivain tag for build/boot testing the solution on an SK-AM64B board Changes in v8: - extended to also include AM62 devices (somewhat similar device as AM64, but with graphics) - added IMG Rogue graphics driver KM/UM packages supporting AM62 and other TI K3 platform devices - uses U-Boot/Kernel/ATF/OPTEE and various device firmwares from TI's Processor SDK Linux v8.6 [2][3] to achieve a similar level of basic platform feature-completeness and quality as the official SDK - supports SK-AM62B with AM62 HS-FS and SK-AM64B with AM64 HS-FS High Security device variants by default. The switch to HS-FS devices was made through follow-on commit to document in the Git history how this is done (also allowing somebody to unroll it for a quick test on a GP device). Note that this requires the TI_SECURE_DEV_PKG environmental variable to be defined at build time pointing to a valid core-secdev-k3 folder location, otherwise the build will fail. - extended ti-k3-r5-loader package to allow for full build source customization - extended the ti-k3-image-gen package to accommodate the different classes of device firmware types used on TI K3 SoC like AM62 (TIFS) vs. AM64 (TISCI). With this support any TI K3 device including AM65, AM68, AM69, J721E etc. should now be enabled by this package. - extended the uboot package to allow building a Device Manager (DM) firmware into the U-Boot SPL image as required on certain TI K3 SoCs like AM62, AM62A, etc. - incorporated Thomas Petazzoni's feedback into k3-image-gen. Also this package no longer downloads stuff during build (ugh!!), thanks to changes as proposed by François Perrad. - incorporated some cleanup feedback on k3-image-gen from Julien Olivain such as missing hash on LICENSE file and a later image Generator Git tag is now used (that is matching the TISDK v8.6 baseline equivalent that is being implemented). - improved wording/descriptions in the 'board/ti/am64x_sk: add new board' commit as suggested by Thomas Petazzoni. Did not make the change regarding explicitly specifying the Cortex-A53 core as it seems to be implied and is not emitted by 'make savedefconfig'. Also using a fixed version of OPTEE as per TI SDK v8.6 baseline addresses Thomas' the desire to build with a known-good version. Changes in v7: - changes per François Perrad's review comments Changes in v6: - rebased to latest next branch and retested - updated u-boot and kernel to latest released versions as of today From Andrew's comments: - added a new SOC_TYPE option for k3-image-gen, as requested by Andrew Davis in a review comment. From Romain's comments: - use "if" instead of "depends on" for sub-options - move TI K3 R5 Loader defconfig selection to Kconfig - use $(HOST_DIR) instead of $(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR) - Retain Xuanhao's gmail ID in the MAINTAINERs file, but drop his TI email from CC list as it will be inactive till he rejoins TI - Add a plain-text license file into the k3-image-gen repository and use it instead of the HTML manifest file. Confirmed that this is still BSD-3-Clause license. - Add comments in the ti-k3-image-gen.mk file for a couple of options Changes in v5: - None (resubmission of Xuanhao's series) Changes in v4: - rebased to latest master and retested - dropped OPTEE CUSTOM* options as we don't need them. Changes in v3: - Fix boot/ti-k3-r5-loader package's build options and dependencies. - Fix boot/ti-k3-image-gen package's config - Add more details in board/ti/am64x_sk's readme - Trim configs/am64x_sk's toolchain options and fix uboot and genimage dependencies. - Remove board/ti/am62x_sk and configs/am62x_sk for now due to some firmware dependency problems. Will be added back in the future. Changes in v2: - Revert arm-gnu-toolchain back to version 10.x due to a bug. When the pre-packaged GCC was built, it could be targeting a newer x86_64 architecture than the processor being used. - Add boot/ti-k3-r5-loader package that builds a separate U-Boot for the R5 cores on TI's K3 devices. - Add boot/ti-k3-image-gen package that builds the full boot binary tiboot3.bin from the spl built from ti-k3-r5-loader. - Add board/ti directory to include sdcard config and board information for AM64x_sk and AM62x_sk boards. - Add the Buildroot defconfigs for AM64x_sk and AM62x_sk. - Add to DEVELOPERS list. [1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices [2] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM64X/08.06.00.42 [3] https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM62X/08.06.00.42 [4] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html#build-steps [5] https://lore.kernel.org/buildroot/20230618134308.p3ehslp5s2j36dqi@dasso/T/ Andreas Dannenberg (8): boot/ti-k3-r5-loader: allow for full build source customization boot/uboot: add support for building the TI K3 DM into U-Boot board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources package/ti-core-secdev-k3: new package board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants package/ti-rogue-km: new package package/ti-rogue-um: new package configs/am62x_sk_defconfig: enable IMG Rogue graphics driver Xuanhao Shi (3): boot/ti-k3-image-gen: new package board/ti/am64x_sk: add new board board/ti/am62x_sk: add new board DEVELOPERS | 10 + board/ti/am62x_sk/genimage.cfg | 27 + board/ti/am62x_sk/readme.txt | 26 + .../ti/am62x_sk/ti_sdk_arm64_debug_defconfig | 1991 +++++++++++++++++ .../am62x_sk/ti_sdk_arm64_release_defconfig | 1894 ++++++++++++++++ board/ti/am64x_sk/genimage.cfg | 27 + board/ti/am64x_sk/readme.txt | 26 + .../ti/am64x_sk/ti_sdk_arm64_debug_defconfig | 1991 +++++++++++++++++ .../am64x_sk/ti_sdk_arm64_release_defconfig | 1894 ++++++++++++++++ boot/Config.in | 1 + boot/ti-k3-image-gen/Config.in | 57 + boot/ti-k3-image-gen/ti-k3-image-gen.hash | 17 + boot/ti-k3-image-gen/ti-k3-image-gen.mk | 91 + boot/ti-k3-r5-loader/Config.in | 65 +- boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 42 +- boot/uboot/Config.in | 17 + boot/uboot/uboot.mk | 26 + configs/am62x_sk_defconfig | 56 + configs/am64x_sk_defconfig | 53 + package/Config.in | 2 + package/Config.in.host | 1 + package/ti-core-secdev-k3/Config.in.host | 11 + .../ti-core-secdev-k3/ti-core-secdev-k3.hash | 3 + .../ti-core-secdev-k3/ti-core-secdev-k3.mk | 31 + package/ti-rogue-km/Config.in | 28 + package/ti-rogue-km/ti-rogue-km.hash | 3 + package/ti-rogue-km/ti-rogue-km.mk | 37 + .../0001-all-drop-the-init-script.patch | 832 +++++++ package/ti-rogue-um/Config.in | 52 + package/ti-rogue-um/ti-rogue-um.hash | 3 + package/ti-rogue-um/ti-rogue-um.mk | 38 + 31 files changed, 9348 insertions(+), 4 deletions(-) create mode 100644 board/ti/am62x_sk/genimage.cfg create mode 100644 board/ti/am62x_sk/readme.txt create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_debug_defconfig create mode 100644 board/ti/am62x_sk/ti_sdk_arm64_release_defconfig create mode 100644 board/ti/am64x_sk/genimage.cfg create mode 100644 board/ti/am64x_sk/readme.txt create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_debug_defconfig create mode 100644 board/ti/am64x_sk/ti_sdk_arm64_release_defconfig create mode 100644 boot/ti-k3-image-gen/Config.in create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk create mode 100644 configs/am62x_sk_defconfig create mode 100644 configs/am64x_sk_defconfig create mode 100644 package/ti-core-secdev-k3/Config.in.host create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.hash create mode 100644 package/ti-core-secdev-k3/ti-core-secdev-k3.mk create mode 100644 package/ti-rogue-km/Config.in create mode 100644 package/ti-rogue-km/ti-rogue-km.hash create mode 100644 package/ti-rogue-km/ti-rogue-km.mk create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch create mode 100644 package/ti-rogue-um/Config.in create mode 100644 package/ti-rogue-um/ti-rogue-um.hash create mode 100644 package/ti-rogue-um/ti-rogue-um.mk