Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03A00C48BF6 for ; Sun, 3 Mar 2024 09:20:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A96234080A; Sun, 3 Mar 2024 09:20:30 +0000 (UTC) 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 z7HbqrpGGJEd; Sun, 3 Mar 2024 09:20:29 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A3CE54081A Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id A3CE54081A; Sun, 3 Mar 2024 09:20:29 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C51241BF2BF for ; Sun, 3 Mar 2024 09:20:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B173D40429 for ; Sun, 3 Mar 2024 09:20:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ezl3I74Rq-2F for ; Sun, 3 Mar 2024 09:20:26 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a01:111:f403:2009::600; helo=nam10-bn7-obe.outbound.protection.outlook.com; envelope-from=neal.frager@amd.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 0268A401AE DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0268A401AE Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2009::600]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0268A401AE for ; Sun, 3 Mar 2024 09:20:25 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=daeCCH46qc9RZGN9+ohHLCjySRQHFW7RRXT6Nx/LuvKgTzZPuKBeLeOQ7kmS7aaN+gmJW+ZVqe2uN7tHhccDpI5skUzn3ehr4NuJDDh0e/OOfFKpcGPQ8Ey9IKVsTTobby8DRuquMzSOVCgyFVRXZh/vZcyrdV737LAxHIutwg2Du6OjKQyU4/aPLzlGmBlUUGqx9jM3NLMuScA7Y1SwZGmcmaAuVCi4pBr4QFGGjX7D+zyww6/JzUSvzWI4QvLJKop+qHSuwrYjQIn/Q28sh8eUOVl7NjDHBUoBq3peT4t67vAUyCPbdkTFWNPuayKq5DgnxjtgKJlBWMPfvc+84A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9kvbakTUmYf7YiyQvfg2CNPUS57RhfOjLuWnDW8i6rM=; b=bfdxYcE0osgLhydi4x2hwYTNYg/16ftBRJdvKQgA11Ge9pfFKmq7NP0pYrebWOAgmnVjOWrUyzMr8t6LBy26B4UelzBe7zd/3H0vllJ4UBBseX67R2YyEnB/T7My8GAtDrC5/OXPwiW8S9eIOTMpVXfKrWW6IDw83bJMwMULVdzoTl7ygeGZsikxjnZZpNpvFPvsX3XjPUomseooO8C7O1Rs3IGM0EF1LsUjaOX6sWicOTj2e+cTPuU2foOjZio2S1juJN8ESjZS3GUqKsFRGCwAkKhBBa1GoAQGp54PZ2zf7py82NX15VTNNV0+tcFaj2f5juWBxyeQliqwnPng1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=buildroot.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) Received: from SJ0PR05CA0093.namprd05.prod.outlook.com (2603:10b6:a03:334::8) by SN7PR12MB6716.namprd12.prod.outlook.com (2603:10b6:806:270::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.34; Sun, 3 Mar 2024 09:20:20 +0000 Received: from CO1PEPF000044F2.namprd05.prod.outlook.com (2603:10b6:a03:334:cafe::ca) by SJ0PR05CA0093.outlook.office365.com (2603:10b6:a03:334::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.30 via Frontend Transport; Sun, 3 Mar 2024 09:20:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1PEPF000044F2.mail.protection.outlook.com (10.167.241.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7362.11 via Frontend Transport; Sun, 3 Mar 2024 09:20:19 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 3 Mar 2024 03:20:17 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 3 Mar 2024 01:20:17 -0800 Received: from xirengwts09.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Sun, 3 Mar 2024 03:20:16 -0600 To: Date: Sun, 3 Mar 2024 09:19:50 +0000 Message-ID: <20240303091956.352661-1-neal.frager@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044F2:EE_|SN7PR12MB6716:EE_ X-MS-Office365-Filtering-Correlation-Id: 658ad50f-158f-4785-53d7-08dc3b632567 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: risMhVqfaOyaUWtE84P0HV2q7RorOszeqRBjaOCjhZteU0IeprayMn3yhjwyBif0nTdeZdgEWeraKRJ82vjiMZEh/+ZqMAs+YCHkwRFExdykdnfWhDD9VSLaMPmZg/kuS1imNppR7VEgYTLYW1xd29v1VEPrnEx2rN3sthI5qqOTBz8X8c4165PsmBw7IzUYJrwcnc2RT+KUawdGwmQ6zW3GmbdgVQVP65asTZKmRRAH7l6jmDbqGoA5rbfYT08+lr/lMKw3XBcu+HWDlyO2kC8yh1xGQve9Ytc5NqJlN8Ck0Xv8V9kWzakARMSwcrBCID/H7jpA/RiLTjxG13sCuR40U86L3Orhb6qU5EnwxrTAGaAbKyiYAGla2oniQbbrLBY8T+X1mUJQtUA8qYR4HOnd1N/h0CC/+pUqF2wTnH4EVxZUYA3Cnc+npiazTGWPj5QX5zVQbezJOFySMmHp6zdOTEChIsppsJ/OWeZtsfHt69E3ONqEx3u6AT1W2uBxTPT8Y/+nDaAdrzSqiaVAEdwlF6x3QxDG7l1DrXGk11tnfq1UxZ6iJ+LhZkVXHIX5mxKpTrJYOskduhgYLeNCVEsUOJHkcQoGQmchm0Dvo2q9DxDJ8NRkZPTetuvnFXnG0so0UCNdGugF1KBByXVlzXm5Ffzg4y1FKnboRDX/YUgSjTZpFRzr5J1fWsag/3MpITWkCoqy+2H5cayZ+VV6q6Qt+mbEmlhXzYf3k3U9UAb6BYVooRYgkGJI0/cJFX5q X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2024 09:20:19.3222 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 658ad50f-158f-4785-53d7-08dc3b632567 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044F2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9kvbakTUmYf7YiyQvfg2CNPUS57RhfOjLuWnDW8i6rM=; b=4FiOv4a7NwcjIH90fUjwcka13QxzDaIW/6n/U9W9kKWfQwFwaaF/nNlKl5EvH8cd87SBgdSJexWnbRByqIer011uqtVV7uDCZEqmVIM2Gi5zcsIt9kgUJFb/0UTIU6USSfO0fc0Hq2SXOcnZcAsqiCgpu9qaho6fg/ZzPajxIAs= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=4FiOv4a7 Subject: [Buildroot] [PATCH v10 1/6] boot/zynqmp-firmware: new boot firmware 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: , From: Neal Frager via buildroot Reply-To: Neal Frager Cc: ibai.erkiaga-elorza@amd.com, luca.ceresoli@bootlin.com, thomas.petazzoni@bootlin.com, Neal Frager , michal.simek@amd.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This patch adds a new boot firmware to buildroot for building the zynqmp pmufw. It requires the toolchain-bare-metal package that includes a bare-metal binutils, gcc and newlib which can be built for the microblaze architecture. Signed-off-by: Neal Frager --- V1->V2: - builds a bare-metal gcc toolchain instead of requiring an external microblaze toolchain V2->V3: - corrected custom cflags option - added support for xilinx_v2022.2 version - added zynqmp-firmware.hash V3->V4: - no changes V4->V5: - reduced all lines to <80 chars V5->V6: - migrated to toolchain-bare-metal-buildroot V6->V7: - removed patch numbers - changed dependency to toolchain-bare-metal-buildroot - removed hash since version is configurable V7->V9: - no changes V9->V10: - removed patches for supporting versions older than xilinx_v2023.2 --- DEVELOPERS | 1 + boot/Config.in | 1 + boot/zynqmp-firmware/Config.in | 22 +++++++++++++++++ boot/zynqmp-firmware/zynqmp-firmware.mk | 33 +++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 boot/zynqmp-firmware/Config.in create mode 100644 boot/zynqmp-firmware/zynqmp-firmware.mk diff --git a/DEVELOPERS b/DEVELOPERS index 0bfe91f064..b677d9cd5b 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2283,6 +2283,7 @@ N: Neal Frager F: board/versal/ F: board/zynq/ F: board/zynqmp/ +F: boot/zynqmp-firmware/ F: configs/versal_vck190_defconfig F: configs/zynq_zc702_defconfig F: configs/zynq_zc706_defconfig diff --git a/boot/Config.in b/boot/Config.in index e5fdf7ad43..c7478fef2e 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -24,5 +24,6 @@ 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" +source "boot/zynqmp-firmware/Config.in" endmenu diff --git a/boot/zynqmp-firmware/Config.in b/boot/zynqmp-firmware/Config.in new file mode 100644 index 0000000000..d68ec2cf6a --- /dev/null +++ b/boot/zynqmp-firmware/Config.in @@ -0,0 +1,22 @@ +config BR2_TARGET_ZYNQMP_FIRMWARE + bool "zynqmp-firmware" + select BR2_TOOLCHAIN_BARE_METAL_BUILDROOT + help + This package builds the PMU Firmware application required + to run U-Boot and Linux in the Zynq MPSoC devices. + +if BR2_TARGET_ZYNQMP_FIRMWARE + +config BR2_TARGET_ZYNQMP_FIRMWARE_VERSION + string "firmware version" + default "xilinx_v2023.2" + help + Release version of zynqmp firmware. + Only versions xilinx_v2023.2 and newer are supported. + +config BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS + string "custom cflags" + help + Adds additional CFLAGS for building zynqmp firmware. + +endif # BR2_TARGET_ZYNQMP_FIRMWARE diff --git a/boot/zynqmp-firmware/zynqmp-firmware.mk b/boot/zynqmp-firmware/zynqmp-firmware.mk new file mode 100644 index 0000000000..383d888fba --- /dev/null +++ b/boot/zynqmp-firmware/zynqmp-firmware.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# zynqmp-firmware +# +################################################################################ + +ZYNQMP_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_VERSION)) +ZYNQMP_FIRMWARE_SITE = \ + $(call github,Xilinx,embeddedsw,$(ZYNQMP_FIRMWARE_VERSION)) +ZYNQMP_FIRMWARE_LICENSE = MIT +ZYNQMP_FIRMWARE_LICENSE_FILES = license.txt +ZYNQMP_FIRMWARE_INSTALL_IMAGES = YES +ZYNQMP_FIRMWARE_INSTALL_TARGET = NO +ZYNQMP_FIRMWARE_DEPENDENCIES = toolchain-bare-metal-buildroot + +CUSTOM_CFLAGS = $(call qstrip,$(BR2_TARGET_ZYNQMP_FIRMWARE_CUSTOM_CFLAGS)) +ZYNQMP_FIRMWARE_CFLAGS = "-Os -flto -ffat-lto-objects $(CUSTOM_CFLAGS)" + +define ZYNQMP_FIRMWARE_BUILD_CMDS + $(MAKE) -C $(@D)/lib/sw_apps/zynqmp_pmufw/src \ + COMPILER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \ + ARCHIVER=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc-ar \ + CC=$(HOST_DIR)/bin/microblazeel-xilinx-elf-gcc \ + CFLAGS=$(ZYNQMP_FIRMWARE_CFLAGS) +endef + +ZYNQMP_PMUFW = $(@D)/lib/sw_apps/zynqmp_pmufw/src/executable.elf + +define ZYNQMP_FIRMWARE_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0755 $(ZYNQMP_PMUFW) $(BINARIES_DIR)/pmufw.elf +endef + +$(eval $(generic-package)) -- 2.25.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot