From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 961DFCD1288 for ; Sat, 30 Mar 2024 16:03:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 56F3D8228A; Sat, 30 Mar 2024 16:03:08 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id GMDHJ3I0au5r; Sat, 30 Mar 2024 16:03:07 +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 smtp1.osuosl.org AE825822C6 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id AE825822C6; Sat, 30 Mar 2024 16:03:06 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2E7F31BF3DF for ; Sat, 30 Mar 2024 16:02:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1B4104056E for ; Sat, 30 Mar 2024 16:02:57 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id miULMRrp5CqB for ; Sat, 30 Mar 2024 16:02:55 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::52b; helo=mail-ed1-x52b.google.com; envelope-from=dario.binacchi@amarulasolutions.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 74FA84049A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 74FA84049A Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by smtp2.osuosl.org (Postfix) with ESMTPS id 74FA84049A for ; Sat, 30 Mar 2024 16:02:55 +0000 (UTC) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56890b533aaso3027446a12.3 for ; Sat, 30 Mar 2024 09:02:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711814573; x=1712419373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3DKRsXYcsns+F4U65BoXMWUf/LGtswSoHOBptQQKuMA=; b=Z+FrJod19SG1gmdysLaO0SHOgKmxbvJKL6LblwNH+DILBUlp8Rf1BvUA0eEJo1iqLj 3/hiwToRg7COfB0MZ8pzV8sKZrdzgBMBT8VKKq3mr/FzM5/xYfZ+RS92SX4aCp/970/2 9akIFaO0j67zlZOkk4FGD6BPaEn8RfSf/8vd/ewvTHNJ/iUQEwlcyvMRgyfIpaXG7qVz qxuF2vIHT0EYM+mwTF2a7jAtwToAwrZQZmZu+WcH6PpCSMbES6fTgrese4y3YEt65AgT sPNDy6xoDJwd4pTQY73zzm8COmlixSu4Z/XiJYTOLcBIMV4AEN11OHI8w9ZbSTjjj1rD G9gg== X-Gm-Message-State: AOJu0YwR5hp9MC5+Nuz5rUHAGt72B8xHr/VnZWa8+NakphGYdEgI63pC Hgy+eVIFnz4towGD10UGimtL9WaP2jS6wX5aaahRwNwyLXiyIxwq/BimB9R559wJmcA7/O9d2Rk R+l8= X-Google-Smtp-Source: AGHT+IG5ekxC/Y8ZdtwD3E8ijygPHsF7CFrnx1HxJY9N9XNtxnI7S3lou5bOW/zoxoIn7lGu2qt1jw== X-Received: by 2002:a50:ba8e:0:b0:56d:c548:6af8 with SMTP id x14-20020a50ba8e000000b0056dc5486af8mr773428ede.9.1711814572727; Sat, 30 Mar 2024 09:02:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-8-99-67.retail.telecomitalia.it. [87.8.99.67]) by smtp.gmail.com with ESMTPSA id f13-20020a056402004d00b0056c633354c6sm2127107edu.45.2024.03.30.09.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 09:02:52 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Date: Sat, 30 Mar 2024 17:02:35 +0100 Message-ID: <20240330160244.3214733-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240330160244.3214733-1-dario.binacchi@amarulasolutions.com> References: <20240330160244.3214733-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1711814573; x=1712419373; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3DKRsXYcsns+F4U65BoXMWUf/LGtswSoHOBptQQKuMA=; b=McaSGy0vv+tPkpwPEAW/p5cOxGIz7MBfWsoFMurNCQ8jPZeVSoGZSRn+NpS4Su7CBP CPU2QoaYixYELoBsQDJFAjgxsfY6Y5tniJOUK1HUM/nHmNEjmunYUcTzYEWkyNYDTZa7 b8w4IwVIQ74qiPOi+ujQbUQue6Z2XJ9WlAXgE= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=McaSGy0v Subject: [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option 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: , Cc: Dario Binacchi , michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Asaf Kahlon , Xuanhao Shi , James Hilliard , Thomas Petazzoni , Romain Naour , Andreas Dannenberg , Alexander Sverdlin , "Yann E . Morin" , bryce@redpinelabs.com, Anand Gadiyar Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Recent version of U-Boot use binman to provide a mechanism for building images, from simple SPL + U-Boot combinations, to more complex arrangements with many parts. This tool uses additional host python modules that must be provided by Buildroot. So introduce a new option BR2_TARGET_UBOOT_USE_BINMAN to add additional host packages in U-Boot build dependency to use binman. The binman requirement is directly included in buildman dependency (tools/buildman/requirements.txt) since within U-Boot, binman is invoked by the build system, here buildman [1]. Furthermore, the use of Binman no longer makes it necessary to set `UBOOT_MAKE_OPTS += DM=...'. We had the explanation from [2]: BINMAN_INDIRS is used to fetch the DM binary from /ti-dm/ and SYSFW binaries from /ti-sysfw/. [1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot [2] https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_01_00_08/exports/docs/linux/Foundational_Components/U-Boot/UG-General-Info.html Co-developed-by: Romain Naour Signed-off-by: Romain Naour Signed-off-by: Dario Binacchi --- Changes in v7: - Replace ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) with ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),). - Update the commit message Changes in v6: - BR2_TARGET_UBOOT_USE_BINMAN - Binman tool is not specific to TI K3 platform, so add an option to specify the use of Binman in U-Boot. - Add runtime dependencies - Update commit message - Add SOB and COB tags of Romain Naour Changes in v5: - Drop "DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f" from UBOOT_MAKE_OPTS. no changes since v1: Signed-off-by: Dario Binacchi --- boot/uboot/Config.in | 11 +++++++++++ boot/uboot/uboot.mk | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index beafb38930db..e6e7956adccb 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -290,6 +290,17 @@ config BR2_TARGET_UBOOT_NEEDS_ROCKCHIP_RKBIN This option makes sure that the needed binary blobs are copied into the U-Boot source directory. +config BR2_TARGET_UBOOT_USE_BINMAN + bool "U-Boot use binman" + depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-rpds-py -> python-jsonschema + select BR2_TARGET_UBOOT_NEEDS_PYTHON3 + select BR2_TARGET_UBOOT_NEEDS_PYELFTOOLS + select BR2_TARGET_UBOOT_NEEDS_PYLIBFDT + help + Use binman tool for generation and signing of boot images. + + https://docs.u-boot.org/en/v2024.01/develop/package/binman.html + menu "U-Boot binary format" config BR2_TARGET_UBOOT_FORMAT_AIS diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index dda606a88059..35a41d96a12d 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -187,10 +187,12 @@ UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf endif ifeq ($(BR2_TARGET_UBOOT_NEEDS_TI_K3_DM),y) -UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME)) UBOOT_DEPENDENCIES += ti-k3-boot-firmware +ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),) +UBOOT_TI_K3_DM_SOCNAME = $(call qstrip,$(BR2_TARGET_UBOOT_TI_K3_DM_SOCNAME)) UBOOT_MAKE_OPTS += DM=$(BINARIES_DIR)/ti-dm/$(UBOOT_TI_K3_DM_SOCNAME)/ipc_echo_testb_mcu1_0_release_strip.xer5f endif +endif ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y) UBOOT_DEPENDENCIES += opensbi @@ -269,6 +271,14 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_XXD),y) UBOOT_DEPENDENCIES += host-vim endif +ifeq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) +# https://source.denx.de/u-boot/u-boot/-/blob/v2024.01/tools/buildman/requirements.txt +UBOOT_DEPENDENCIES += \ + host-python-jsonschema \ + host-python-pyyaml +UBOOT_MAKE_OPTS += BINMAN_INDIRS=$(BINARIES_DIR) +endif + # prior to u-boot 2013.10 the license info was in COPYING. Copy it so # legal-info finds it define UBOOT_COPY_OLD_LICENSE_FILE -- 2.43.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot