From patchwork Sat Mar 30 16:02:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3064 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 40A793F333 for ; Sat, 30 Mar 2024 17:02:55 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-56c3dc8d331sf2096543a12.2 for ; Sat, 30 Mar 2024 09:02:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711814575; cv=pass; d=google.com; s=arc-20160816; b=dD4PMyDMuYLFk2gZd8xY1u8PLImxFz8XdwNKp3JnInYHHO/AE9f5aOZhl+vVwqJKkE AhDlWWnTjfnrxcpXVsGWfGyfb0+GsJLFMrafceJuzt4/HRCncVwQEue9AOqm0kzsA1RR XSm9/KKsTqna79MpcOC2CGMZJM3lnXWFHURHY2UK41HPhmgWK6jAm/unv+JBWoTSCkHW 1pyyrmmW6Nn9479pcuHJvvxzYIsAiz/qqDAvbgmF2WiU1c7G7vn5VyN4xSWvSNGKhTi+ Vngz0cahZfq1cBpRUPtgr7kKb+d0N1yy5gsuRmQUkahj9i8owOP8FHdFEhuGcBtgK1EZ FFkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zz1WTsdYI20gLPGws2WPjOFvwEX1WmxNPsPW6d7P5RQ=; fh=tQF3rQWPiVL+iskPTOgdp2LQTBkGmeoIyHPLtkQBIuI=; b=TKtTt08ZzL6eRfU8Bkd/UR6zHr8xKJ3JjAC1J55cxp7W5F3sFrhz8wom2OI1BZp7bl IS3WS60KWeSjXFOcoduF0aJalVdJindLEqWBu8HydbInEvVRi+RG+rSRIf67t0+Xmnes tC47/74RRIf9PNw7VeWp+5SKrULtE7lpZmPt5XyRkAvTy44Eb+whkHPvtGGNgmKwUvOW kscx/UqP62w73vZ4HQ0tYH8gB5Q4xZ88Uk8wHXNCHHnuTmpGh4WGKT74WcD92p/K1yGT mjNXov0WruAmmxaABPoMWu8z9IUb89ytXDRl5/HEFaJYgcjHXidYL8lENV0WS+mxzLrr nzew==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fP+31sBR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1711814575; x=1712419375; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zz1WTsdYI20gLPGws2WPjOFvwEX1WmxNPsPW6d7P5RQ=; b=D27BuK3HrAfcVQqBx0xEw206iPfk7so2RsbkyUI8hXcREr5rP8BDJsvNnOdQoyZ3Kz k1BKZ8J7XLDiao20UVZO4rdcsyCOj0Dp1sU22C2NCjAWurQ+/XEYr3i5/eV/5wrKBShF 019qigCtD0VO9SLiT27erkn2s6z6qC+7WQpMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711814575; x=1712419375; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zz1WTsdYI20gLPGws2WPjOFvwEX1WmxNPsPW6d7P5RQ=; b=pPL0q7yg6HhvdjEzG6r8xrCYjMCRbMfG3fsSxcZ+oOK83gvsClAsZ+/1KdiWB1bblS u5Z1WEBpl4Mvj4Lx0+bmpNiPHqH5XEkOm/bRATbwUuJ5kF/t4dHkl6U7rzIgbqykz3+4 C0zQgPFTfpYN4mfPh90D+TUnIhiX8o6rLphtaiKqIjQgYIJ7h0eUuj4ue6tf8w3OJ5XB +pfzgfOwwXmOXlqyI92IPdxUMfJ85L/iDeAUaPC0+yu58EPP0vQycnFMPX6YWekSBSHk Os7wspnJgdGR9icQX3dTf3teyeNOWSIWg9eGGm5lIgA1FpHkC5ntNfABv3X/j4GFjxRy WzaQ== X-Forwarded-Encrypted: i=2; AJvYcCXBLb1jY5nveoGmlrgGreivPOnwsOkTqE6RfMhfTuOvfJn0q4yv8cxz05VZWe57x6CCACb8iKr3dEgNEb1QGYsLHjwb42Iyd1obOxQRM91qJpS79EKR275lhf97lA== X-Gm-Message-State: AOJu0YzOqWuYGRTekX+zGXuqEivZ1cUqCdoSlrG1iX6zAezVTgSAld62 zYgI5XgsTIv0sldwv/9irzCeZNnLgYPe2t9u+MzGRoKIdPEsKv4L0alt246R3yocVA== X-Google-Smtp-Source: AGHT+IFsJrVFGH7gIy2ADahBOlVtkR58VgwsM1d2M1IKIxj3KIbutnMDHGzOiVL+cilJJiHxOLUZag== X-Received: by 2002:a05:6402:4313:b0:568:1eee:5e23 with SMTP id m19-20020a056402431300b005681eee5e23mr4045608edc.21.1711814574919; Sat, 30 Mar 2024 09:02:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2695:b0:56c:53e6:a904 with SMTP id w21-20020a056402269500b0056c53e6a904ls580334edd.2.-pod-prod-09-eu; Sat, 30 Mar 2024 09:02:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMaFT0qNG+K95gRXn8mr0ndPENJGXcb+uRQEaCYUCrMRxTwHKy8ugxZrc52TFojx2cMDHf28eYy7FBr4Th+VXA1xYoF/njMn2LQyqFBridgiXm X-Received: by 2002:a50:a697:0:b0:56b:d212:b032 with SMTP id e23-20020a50a697000000b0056bd212b032mr3188084edc.14.1711814573245; Sat, 30 Mar 2024 09:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711814573; cv=none; d=google.com; s=arc-20160816; b=EgVYQiakXV3PzPZ3khAJYZh+t0lyp6aohoFOJR/VUICbIOKv6aAACnhgD3u8gSGh7F NT5Oq3cH49XvJqxKAGYPN3iluX/NadpfJJznk8k7j85C0fdpez91YA5Xpj0HBWw/DRv2 YwRfY/Hz1oFg8zQGcS7WHC4IN5OybDeNrTW3KBLecaoENOn/SvkfbsAxNi+tGavzGkZb nfrNCE3DgkTOgshsXAK+o2ZMmncb95gLdMjAqAJK7wgHVUY/+95vIVo2O9vYrK1adhLD vXxUGn/riYzVGW7po9wlMpIeG/QfVWyzRbYlJFokHqnaPYFm3+1GTPi39FNi3lIosfda yc1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3DKRsXYcsns+F4U65BoXMWUf/LGtswSoHOBptQQKuMA=; fh=TZfEb6IRyJp9352U3xZdKVX6/deXwNYk87ebhMYl838=; b=WhFwHvb61CDA09e4+SRO+EFpuhj0IWM1UKhK+CFi+5A0WTgp0sLcZ5bYJksorrHa02 aMfVBfec1T1nVt97H0fIp1yds6g+IXyJDZQ4gZrVjEBgf94Ot9RcOzgfaLtaLfYUzuSr 74uY4rnTYsmlx2Rcfb+l37J4G2Ge61IwjaW/t1P4AOP5QskSLhpP/ljk0QA/ppen53Tu /XkmbxDCOfUxCKYTSAI8UztLSOK4Y+pFrOMONsHSx7QzCY4si4MrJaCx1tvJHh0bX3tO trcPmwNmsND4mW72pWhVzmcnsHr6Gb4jANKmQhGmAS3LFswcrubb8GOb5kJdW6F8zJr2 kGjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fP+31sBR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id x12-20020a50ba8c000000b0056c2eef00b8sor1406879ede.1.2024.03.30.09.02.53 for (Google Transport Security); Sat, 30 Mar 2024 09:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCX7fnRlBQD8riKyw1XOj3lnQRPHRVzlYhHBmRewdQjNxugS/MbJqGA+bSgJU0mMuJ1nHK7ArWtJ0TwPrV2NvNg0vh7aV2pAvrYIckWzXZhrNMlo 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 Cc: Romain Naour , Alexander Sverdlin , Andreas Dannenberg , Yegor Yefremov , Xuanhao Shi , Anand Gadiyar , James Hilliard , Thomas Petazzoni , Dario Binacchi , michael@amarulasolutions.com, Asaf Kahlon , francois.perrad@gadz.org, linux-amarula@amarulasolutions.com, bryce@redpinelabs.com, "Yann E . Morin" Subject: [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fP+31sBR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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