From patchwork Thu Nov 17 00:15:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anand Gadiyar X-Patchwork-Id: 1704870 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 4NCL6z3wxRz23mR for ; Thu, 17 Nov 2022 11:16:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A2C254188C; Thu, 17 Nov 2022 00:16:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A2C254188C 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 BQU3FijnozLB; Thu, 17 Nov 2022 00:16:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 56FC74189E; Thu, 17 Nov 2022 00:16:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 56FC74189E X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0728D1BF954 for ; Thu, 17 Nov 2022 00:15:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D223441883 for ; Thu, 17 Nov 2022 00:15:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D223441883 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 yqsCxdeOQ4qC for ; Thu, 17 Nov 2022 00:15:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org F1A5441899 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by smtp4.osuosl.org (Postfix) with ESMTPS id F1A5441899 for ; Thu, 17 Nov 2022 00:15:15 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBp5071551; Wed, 16 Nov 2022 18:15:11 -0600 Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AH0FBlT011498 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Nov 2022 18:15:11 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Wed, 16 Nov 2022 18:15:11 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Wed, 16 Nov 2022 18:15:11 -0600 Received: from uda0393673 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBxD098056; Wed, 16 Nov 2022 18:15:11 -0600 Received: from a0393673 by uda0393673 with local (Exim 4.95) (envelope-from ) id 1ovSYh-007MC4-FS; Wed, 16 Nov 2022 18:15:11 -0600 To: Date: Wed, 16 Nov 2022 18:15:09 -0600 Message-ID: <20221117001511.1753592-2-gadiyar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117001511.1753592-1-gadiyar@ti.com> References: <20221117001511.1753592-1-gadiyar@ti.com> 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=1668644111; bh=G+xg7ymzXtWNYcmsez+zgQOqIlWeCjmqzDcPYl/YeGk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=p6JNbFD/4PIvHTZGQKTYC2PjX0ehkYXBD2SF6QrkLxhZTy6wPv3UvzmlsLYkC8XXn MZhdwfmFI5CaexmVs0Ivj8vdH3pfoNxFjFjuJTGwAN4FFDnNmHGIpJQgLPquH0hbJj eQKbnRu1oHiebyGNwfJj39njY+0FIfz3eR4czUQY= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=p6JNbFD/ Subject: [Buildroot] [PATCH v6 1/3] boot/ti-k3-r5-loader: add new package 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: Anand Gadiyar via buildroot From: Anand Gadiyar Reply-To: Anand Gadiyar Cc: Bryan Brattlof , Xuanhao Shi , Giulio Benetti , Romain Naour , Andrew Davis Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Xuanhao Shi This is a separate U-Boot package that would build the intermediate spl binary for the R5 core on TI's k3 boards. Usually, the resulting spl will be used for k3-image-gen to build the full R5 boot binary tiboot3.bin. Signed-off-by: Xuanhao Shi Signed-off-by: Anand Gadiyar Reviewed-by: Giulio Benetti Acked-by: Andrew Davis Cc: Romain Naour Cc: Bryan Brattlof --- DEVELOPERS | 6 +++ boot/Config.in | 1 + boot/ti-k3-r5-loader/Config.in | 32 +++++++++++++++ boot/ti-k3-r5-loader/ti-k3-r5-loader.hash | 2 + boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 49 +++++++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 boot/ti-k3-r5-loader/Config.in create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk diff --git a/DEVELOPERS b/DEVELOPERS index bc026da4aa..cf1cb8808b 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -128,6 +128,9 @@ F: package/dcron/ F: package/libxmlrpc/ F: package/python-docopt/ +N: Anand Gadiyar +F: boot/ti-k3-r5-loader/ + N: André Zwing F: package/libkrb5/ F: package/openal/ @@ -3045,6 +3048,9 @@ F: package/python-pyusb/ N: Wojciech Niziński F: package/fwup/ +N: Xuanhao Shi +F: boot/ti-k3-r5-loader/ + N: Yair Ben Avraham F: package/casync/ F: package/gloox/ diff --git a/boot/Config.in b/boot/Config.in index 40472ae07d..ce17b2df6b 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in" source "boot/shim/Config.in" source "boot/sun20i-d1-spl/Config.in" source "boot/syslinux/Config.in" +source "boot/ti-k3-r5-loader/Config.in" source "boot/uboot/Config.in" source "boot/vexpress-firmware/Config.in" diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in new file mode 100644 index 0000000000..bb6140f8a6 --- /dev/null +++ b/boot/ti-k3-r5-loader/Config.in @@ -0,0 +1,32 @@ +config BR2_TARGET_TI_K3_R5_LOADER + bool "ti-k3-r5-loader" + help + Separate U-Boot build for R5 cores on TI's k3 boards. + Usually used to build tiboot3.bin with k3-image-gen. + +if BR2_TARGET_TI_K3_R5_LOADER +choice + prompt "K3 R5 Loader configuration" + default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG + +config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG + bool "Using an in-tree board defconfig file" + +config BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG + bool "Using a custom board (def)config file" + +endchoice + +config BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG + string "Board defconfig" + depends on BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG + help + Name of the board for which TI K3 R5 Loader should be + built, without the _defconfig suffix. + +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG + help + Path to the TI K3 R5 Loader configuration file. +endif diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash new file mode 100644 index 0000000000..fb6ce7c2a6 --- /dev/null +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6d69d5e4635cb3fa7852bf15f88ca342ef7740196e71961d3572deb58ba44bea u-boot-2022.10-rc1.tar.bz2 diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk new file mode 100644 index 0000000000..535c9b999b --- /dev/null +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# ti-k3-r5-loader.mk +# +################################################################################ + +TI_K3_R5_LOADER_VERSION = 2022.10 +TI_K3_R5_LOADER_SITE = https://ftp.denx.de/pub/u-boot +TI_K3_R5_LOADER_SOURCE = u-boot-$(TI_K3_R5_LOADER_VERSION).tar.bz2 +TI_K3_R5_LOADER_LICENSE = GPL-2.0+ +TI_K3_R5_LOADER_LICENSE_FILES = Licenses/gpl-2.0.txt +TI_K3_R5_LOADER_CPE_ID_VENDOR = denx +TI_K3_R5_LOADER_CPE_ID_PRODUCT = u-boot +TI_K3_R5_LOADER_INSTALL_IMAGES = YES +TI_K3_R5_LOADER_DEPENDENCIES = \ + host-pkgconf \ + $(BR2_MAKE_HOST_DEPENDENCY) \ + host-arm-gnu-toolchain \ + host-openssl + +TI_K3_R5_LOADER_MAKE = $(BR2_MAKE) +TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV) +TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \ + host-arm-gnu-toolchain \ + $(BR2_MAKE_HOST_DEPENDENCY) \ + $(BR2_BISON_HOST_DEPENDENCY) \ + $(BR2_FLEX_HOST_DEPENDENCY) + +TI_K3_R5_LOADER_BOARD = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD)) +ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y) +TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y) +TI_K3_R5_LOADER_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE)) +endif # BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG +TI_K3_R5_LOADER_MAKE_OPTS += \ + CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \ + ARCH=arm \ + HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" + +define TI_K3_R5_LOADER_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS) +endef + +define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS + cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin +endef + +$(eval $(kconfig-package)) From patchwork Thu Nov 17 00:15:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anand Gadiyar X-Patchwork-Id: 1704869 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::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (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 4NCL6k59bhz23mR for ; Thu, 17 Nov 2022 11:15:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9AC1260C0B; Thu, 17 Nov 2022 00:15:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9AC1260C0B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0fRebY8SmPK8; Thu, 17 Nov 2022 00:15:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id A137760BE3; Thu, 17 Nov 2022 00:15:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A137760BE3 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2B6D81BF954 for ; Thu, 17 Nov 2022 00:15:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 12EBC41883 for ; Thu, 17 Nov 2022 00:15:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 12EBC41883 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 7Uj_ewa63QJs for ; Thu, 17 Nov 2022 00:15:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 038014188F Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by smtp4.osuosl.org (Postfix) with ESMTPS id 038014188F for ; Thu, 17 Nov 2022 00:15:15 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBN4071557; Wed, 16 Nov 2022 18:15:11 -0600 Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AH0FBiP082257 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Nov 2022 18:15:11 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Wed, 16 Nov 2022 18:15:11 -0600 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.6 via Frontend Transport; Wed, 16 Nov 2022 18:15:11 -0600 Received: from uda0393673 (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBbE034884; Wed, 16 Nov 2022 18:15:11 -0600 Received: from a0393673 by uda0393673 with local (Exim 4.95) (envelope-from ) id 1ovSYh-007MC7-GH; Wed, 16 Nov 2022 18:15:11 -0600 To: Date: Wed, 16 Nov 2022 18:15:10 -0600 Message-ID: <20221117001511.1753592-3-gadiyar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117001511.1753592-1-gadiyar@ti.com> References: <20221117001511.1753592-1-gadiyar@ti.com> 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=1668644111; bh=tealhssAp/5xCPgLf6tR3cFrg/LIaHYqY+Bd/JBwZIE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kGPGPJnNpRWi4gRuW6Y0/Wy66cQUFvRmLrOo2u8EuKAEmJ6cBAwNQgBjEcpONKzLP N6fcm1G0tdg1C6uEpNAWST8V7BBegDPk9I0xXxnQ8SPu71HlVDCFqlgbvJWlTUqmVX XcuB8h/ZHr/osJGawf4gC32paKK7l0rHEIl7VhHk= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=kGPGPJnN Subject: [Buildroot] [PATCH v6 2/3] boot/ti-k3-image-gen: add new package 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: Anand Gadiyar via buildroot From: Anand Gadiyar Reply-To: Anand Gadiyar Cc: Bryan Brattlof , Xuanhao Shi , Giulio Benetti , Romain Naour , Andrew Davis Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Xuanhao Shi This is the image generator that builds the full boot binary, tiboot3.bin, for the R5 core on TI's k3 devices. This requires the R5 spl output from the ti-k3-r5-loader package. https://git.ti.com/cgit/k3-image-gen/k3-image-gen Signed-off-by: Xuanhao Shi Signed-off-by: Anand Gadiyar Reviewed-by: Giulio Benetti Acked-by: Andrew Davis Cc: Romain Naour Cc: Bryan Brattlof --- DEVELOPERS | 2 ++ boot/Config.in | 1 + boot/ti-k3-image-gen/Config.in | 30 ++++++++++++++++ boot/ti-k3-image-gen/ti-k3-image-gen.hash | 2 ++ boot/ti-k3-image-gen/ti-k3-image-gen.mk | 42 +++++++++++++++++++++++ 5 files changed, 77 insertions(+) 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 diff --git a/DEVELOPERS b/DEVELOPERS index cf1cb8808b..e699b6ec81 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -129,6 +129,7 @@ F: package/libxmlrpc/ F: package/python-docopt/ N: Anand Gadiyar +F: boot/ti-k3-image-gen/ F: boot/ti-k3-r5-loader/ N: André Zwing @@ -3049,6 +3050,7 @@ N: Wojciech Niziński F: package/fwup/ N: Xuanhao Shi +F: boot/ti-k3-image-gen/ F: boot/ti-k3-r5-loader/ N: Yair Ben Avraham diff --git a/boot/Config.in b/boot/Config.in index ce17b2df6b..1b25bacfee 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in" source "boot/shim/Config.in" source "boot/sun20i-d1-spl/Config.in" source "boot/syslinux/Config.in" +source "boot/ti-k3-image-gen/Config.in" source "boot/ti-k3-r5-loader/Config.in" source "boot/uboot/Config.in" source "boot/vexpress-firmware/Config.in" diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in new file mode 100644 index 0000000000..02018f2f78 --- /dev/null +++ b/boot/ti-k3-image-gen/Config.in @@ -0,0 +1,30 @@ +config BR2_TARGET_TI_K3_IMAGE_GEN + bool "ti-k3-image-gen" + select BR2_TARGET_TI_K3_R5_LOADER + help + Use TI's k3-image-gen to build a separate bare metal + boot binary from a separate spl. Currently supports + version 08.05.00.004 as default. + + https://git.ti.com/cgit/k3-image-gen/k3-image-gen/ + +if BR2_TARGET_TI_K3_IMAGE_GEN +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC + string "SOC type for image gen" + help + The target SoC option for image gen. + For example, "am64x" for AM64X boards. + +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE + string "SOC security type for image gen" + help + The security type option for image gen. + Options are "gp", "hs-fs", or "hs-se". + +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG + string "CONFIG type for image gen" + help + The board config option for image gen. + Usually "sk" or "evm". +endif + diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash b/boot/ti-k3-image-gen/ti-k3-image-gen.hash new file mode 100644 index 0000000000..82c5b17060 --- /dev/null +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d13e9556bfba32d14071e172589683e48f6fea705a0b05ddd7fe984002089888 k3-image-gen-08.05.00.004.tar.gz diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk new file mode 100644 index 0000000000..7239b94425 --- /dev/null +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# ti-k3-image-gen +# +################################################################################ + +TI_K3_IMAGE_GEN_VERSION = 08.05.00.004 +TI_K3_IMAGE_GEN_SITE = https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot +TI_K3_IMAGE_GEN_SOURCE = k3-image-gen-$(TI_K3_IMAGE_GEN_VERSION).tar.gz +TI_K3_IMAGE_GEN_LICENSE = BSD-3-Clause +TI_K3_IMAGE_GEN_LICENSE_FILES = LICENSE +TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES + +# ti-k3-image-gen is used to build tiboot3.bin, using the r5-u-boot-spl.bin file +# from the ti-k3-r5-loader package. Hence the dependency on ti-k3-r5-loader. +TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader + +# The ti-k3-image-gen makefiles seem to need some feature from Make v4.0, +# similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build +# otherwise fails with some misleading error message. +TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE) +TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC)) +TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE)) +TI_K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG)) +TI_K3_IMAGE_GEN_MAKE_OPTS = \ + SOC=$(TI_K3_IMAGE_GEN_SOC) \ + SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \ + CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \ + CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \ + SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \ + O=$(BINARIES_DIR) \ + BIN_DIR=$(BINARIES_DIR) + +define TI_K3_IMAGE_GEN_BUILD_CMDS + $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS) +endef + +define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS + cp $(@D)/tiboot3.bin $(BINARIES_DIR) +endef + +$(eval $(generic-package)) From patchwork Thu Nov 17 00:15:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anand Gadiyar X-Patchwork-Id: 1704868 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=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.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 4NCL6J6VMyz23mR for ; Thu, 17 Nov 2022 11:15:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0C13541883; Thu, 17 Nov 2022 00:15:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0C13541883 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 gow-F2cQ7DSX; Thu, 17 Nov 2022 00:15:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 95A9E4188C; Thu, 17 Nov 2022 00:15:31 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 95A9E4188C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 820731BF954 for ; Thu, 17 Nov 2022 00:15:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 679434188C for ; Thu, 17 Nov 2022 00:15:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 679434188C 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 UYt9kaIabAds for ; Thu, 17 Nov 2022 00:15:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 8BDA641883 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8BDA641883 for ; Thu, 17 Nov 2022 00:15:15 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBGi064014; Wed, 16 Nov 2022 18:15:11 -0600 Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AH0FBGG082258 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Nov 2022 18:15:11 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) 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.6; Wed, 16 Nov 2022 18:15:11 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 16 Nov 2022 18:15:11 -0600 Received: from uda0393673 (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AH0FBpN017169; Wed, 16 Nov 2022 18:15:11 -0600 Received: from a0393673 by uda0393673 with local (Exim 4.95) (envelope-from ) id 1ovSYh-007MCA-HC; Wed, 16 Nov 2022 18:15:11 -0600 To: Date: Wed, 16 Nov 2022 18:15:11 -0600 Message-ID: <20221117001511.1753592-4-gadiyar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117001511.1753592-1-gadiyar@ti.com> References: <20221117001511.1753592-1-gadiyar@ti.com> 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=1668644112; bh=KxiafXx5WsA0j0fnbejE/q7Od5YRQis2WENDO9wa9G0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yMHtd7MJTlXpzmLzMYwGI6okgW+Ww51NrN/qJgm0JJAGWjGefEOQLBoybRjlVXqW8 t+eQhTECKAum78vdaMX/+7H/uj8sEQkp7Jip4MX2w+UpR73TOPeJyjSorQntXE7/s9 vBjpHz5HU1Qq9TzJTfVAIBWVDtC6ocQa1QI/i/+w= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=yMHtd7MJ Subject: [Buildroot] [PATCH v6 3/3] board/ti/am64x_sk: add new board 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: Anand Gadiyar via buildroot From: Anand Gadiyar Reply-To: Anand Gadiyar Cc: Bryan Brattlof , Xuanhao Shi , Giulio Benetti , Romain Naour , Andrew Davis Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Xuanhao Shi Adds support for ti's am64x_sk board. Adds the configs for generating output sdcard image. Adds the defconfigs for am64x_sk. The AM64x_sk board is designed for the AM642 SoC with two ARM Cortex-A53 and four ARM Cortex-R5. It also supports RJ 45 Ethernet, Wi-Fi, and Bluetooth. More information about the board can be found at: https://www.ti.com/tool/SK-AM64 Signed-off-by: Xuanhao Shi Signed-off-by: Anand Gadiyar Reviewed-by: Giulio Benetti Acked-by: Andrew Davis Cc: Romain Naour Cc: Bryan Brattlof --- DEVELOPERS | 4 +++ board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++ board/ti/am64x_sk/readme.txt | 49 ++++++++++++++++++++++++++++++++++ configs/am64x_sk_defconfig | 46 +++++++++++++++++++++++++++++++ 4 files changed, 126 insertions(+) create mode 100644 board/ti/am64x_sk/genimage.cfg create mode 100644 board/ti/am64x_sk/readme.txt create mode 100644 configs/am64x_sk_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index e699b6ec81..38ccec2f20 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -129,8 +129,10 @@ F: package/libxmlrpc/ F: package/python-docopt/ N: Anand Gadiyar +F: board/ti/am64x_sk/ F: boot/ti-k3-image-gen/ F: boot/ti-k3-r5-loader/ +F: configs/am64x_sk_defconfig N: André Zwing F: package/libkrb5/ @@ -3050,8 +3052,10 @@ N: Wojciech Niziński F: package/fwup/ N: Xuanhao Shi +F: board/ti/am64x_sk/ F: boot/ti-k3-image-gen/ F: boot/ti-k3-r5-loader/ +F: configs/am64x_sk_defconfig N: Yair Ben Avraham F: package/casync/ diff --git a/board/ti/am64x_sk/genimage.cfg b/board/ti/am64x_sk/genimage.cfg new file mode 100644 index 0000000000..26304fe98f --- /dev/null +++ b/board/ti/am64x_sk/genimage.cfg @@ -0,0 +1,27 @@ +image boot.vfat { + vfat { + files = { + "tiboot3.bin", + "tispl.bin", + "u-boot.img", + } + } + + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/ti/am64x_sk/readme.txt b/board/ti/am64x_sk/readme.txt new file mode 100644 index 0000000000..8096fcb2d4 --- /dev/null +++ b/board/ti/am64x_sk/readme.txt @@ -0,0 +1,49 @@ +Texas Instuments AM64x SK Test and Development Board + +Description +=========== + +These configurations will build a complete image and +device tree blobs for the the TI AM64x_sk board. + +How to build it +=============== + +Select the default configuration for the target: +$ make am64x_sk_defconfig + +Optional: modify the configuration: +$ make menuconfig + +Build: +$ make + +Result of the build: +=================== +output/images/ ++-- soc ++-- ti-connectivity ++-- bl31.bin ++-- boot.vfat ++-- Image ++-- k3-am642-sk.dtb ++-- r5-u-boot-spl.bin ++-- rootfs.ext2 ++-- rootfs.ext4 ++-- rootfs.tar ++-- sdcard.img ++-- tee.bin ++-- tee-header_v2.bin ++-- tee-pageable_v2.bin ++-- tee-pager_v2.bin ++-- tiboot3.bin ++-- tispl.bin ++-- u-boot.img + +To copy the image file to the sdcard use dd: +$ dd if=output/images/sdcard.img of=/dev/sdX + +Insert the SDcard into the AM64x_sk board, and power it up with +a USB Type-C connector. The system should come up. You can use +a micro-USB to connect to the connector labled MAIN_UART0 to +communicate with the board. diff --git a/configs/am64x_sk_defconfig b/configs/am64x_sk_defconfig new file mode 100644 index 0000000000..f1acd49326 --- /dev/null +++ b/configs/am64x_sk_defconfig @@ -0,0 +1,46 @@ +BR2_aarch64=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x_sk/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.0.9" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="SPD=opteed" +BR2_TARGET_OPTEE_OS=y +BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=y +BR2_TARGET_OPTEE_OS_PLATFORM="k3" +BR2_TARGET_TI_K3_IMAGE_GEN=y +BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x" +BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp" +BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm" +BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am64x_evm_a53" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="tispl.bin" +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y