From patchwork Fri Mar 1 13:36:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3024 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 23B363F057 for ; Fri, 1 Mar 2024 14:36:41 +0100 (CET) Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a44225a308esf178129866b.3 for ; Fri, 01 Mar 2024 05:36:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709300201; cv=pass; d=google.com; s=arc-20160816; b=us1eqnL3vAcqDJjlU3kkQvQt7WED0Pif/Gv1Q4SRmdtjqnk4Frz/8LE6akYZgYGZDe y6PaoIkp5Cx7j6qi5TM7bBsrrih90mzNdHZ3lE8Qvi4gBnIh4558MxxGT1oJzlFSRJNG Tcb5KaHylvgPvjNCNUy1CrWWCuumm/apOZ3oX7yJSsIO160jJ1d4mwZWFmASfsV/DCoh c+lwGvxkQNeTjPju78m97M5rnUn1Ch1vTFnnUIIbHk26ApxT4ypOF36wpXwQtVJ/inDj xFc7WGjbcPfE/wEwGsttar4gUBzz1k1txqmtBlb4qjHaORuIqlmQQpDz0W8BXXyysXP3 OZZg== 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=CfK6XeLrif/BwvlsfffsYKfZvA3lVPWurGHQiInf5zg=; b=JyfxaJidxQks+51ymk9avxv+VpHP0dL932nCof3xKft/hFklXmPDSM+YC46ZhRmL58 6LrUOiKc2P+HzqmQGT05+/5xW1uKcrHjFrD+hwHLc/d3i/q1w2gFDFmldt/OEo4sjddi cwehGL2l7L/eVLTOtvpDoqxnx74+VBgSFjiohmSlO69nu/+9OC66/2H+1/SjFujpGNn1 9q5GlbtSSF5womWu/SUhbzfrns1NGxhXOK4NwVVTd+GyDTEFn+VyoHjx0k+88dshIOcw XuWBuFKdit3anu79NXUW9pfdwnkH741j2xUUZsJouJgwBKt3PCtR27htBl9KNdypdyA2 aNSA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hDXvwSeH; 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=1709300201; x=1709905001; 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=lHzJuNro9nE5DDykr9SC5sgAB2tsV+C6rAWaY9XIBVrplAIdp2aIr0PDPLLNNYtvvw yFIQDeJsPQutDlNw67IAQO6yiuC6Hn/X6YcGA2tygMjmoN+seI78mSAGZYM7ga0yGm5s B1RxLx79tEhEwKBHOcaegRID12gv4TS+Zu3Jo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709300201; x=1709905001; 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=W3Nbk9P9SpqjSrewpndeYeNxHOEQ0D8OafI24HExWgeEw+HYC2TqyegXwMY/Xdz8Kh JmQO+MM9fkXyDuRD143Veg5wVqLb/vuXafXjXb4fieXlUQLxp8amnsmDbZuJv5bHyhE+ 9E6m3U87gVXKGCrcXk+htOmeE9YzSJvjou8qTogyr4IGjA8gyMGtxu32LorcU5mjaOZ2 z68wiLvDPvkt3khVM3bDjRfzWuoC1S7O5uZ4JhROQCnvnbivutnGIR0IOb9r9uUn13EH 0Q9www2/e9hb131s89wOWOSP0gbC4MX7bz2gJIx3UuCaYeRZTMOrPJsEjoTMqDEXCJja /m9A== X-Forwarded-Encrypted: i=2; AJvYcCW/maj55ZoaaNhIo89fDSF4BXOzMTxG4qvG6S6PGx4BiB8EZy9xlGuAIj4LqEHJl3NR9MWHU9PfZEIZX21nENsAElY1Hayd5OoSOdPdAdILwU1Px9ggDHCDCG5M2g== X-Gm-Message-State: AOJu0Yzy4v8GoVgAM89FvnW1FIpuGaaY93HClaYYIxtfFk9Uq5vOw4PU 131TSC3QXgoHn2yiVN+CZKqpxZGb91jSG7F6YNk7RZq/BBCWtl03n2wZo2w6aEEgqw== X-Google-Smtp-Source: AGHT+IGTPUdW8gEjLRXS5USI+CgiFYm2TPXGSfr1F6CoACnh5oquugxh72NMUlUd7pFE+ei8JKU8Yw== X-Received: by 2002:a05:6402:17d2:b0:565:bbc4:9c88 with SMTP id s18-20020a05640217d200b00565bbc49c88mr1168560edy.20.1709300200885; Fri, 01 Mar 2024 05:36:40 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:458b:b0:566:a8bd:67ac with SMTP id ig11-20020a056402458b00b00566a8bd67acls800413edb.2.-pod-prod-09-eu; Fri, 01 Mar 2024 05:36:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWgpuE4eN59QbL+wtIdrMnRNtFpvcn/XRaxUdvSeJtstykNmdovCWHvPtLGm2ZeHT6mvEJpRtDIf6PsdlGHsZvtxPw/WvQlrKCPWiPC0K4OiE7j X-Received: by 2002:aa7:da08:0:b0:566:aba4:7209 with SMTP id r8-20020aa7da08000000b00566aba47209mr1446696eds.13.1709300199260; Fri, 01 Mar 2024 05:36:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709300199; cv=none; d=google.com; s=arc-20160816; b=ku8ZXOsgBtVeptip+pVHBi6E5nsIqw9tQDFhFQDqAI1V/nyKQjZH1nMq+fdWIiq7kk olkcxG6HgUPHlthgdun1e5uRy5lb5B6K/CtjMNnJrKafp1JCgefcdzaZ5zTtb90QghUL Mw6GzOdZVSDKWVpnLUOfib9Hbo+dLPmtYvjms0yQjBxTsfWYyfL3CdDJtm9ixE1JzAEg hun8T7F4CiYhvE8ec6bNSJOol1YAmFBczea6akDkH2BreWLuaL5xZlYJJL82Dj6Auc6j coLoARNTuHzouOgGZHGaHdn0HJ5Dl5prR+kQskwokkzU5o4RgSDyQ526omWY5myBagNF 9VEw== 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=IBm41CuWtJ3+7TmxyL/4nbN214txodgWtVshH1D0NIY=; b=P6VO/Bn5mkWQUT5dkvYTsc9vWI0MZAHQKvIdaVBT3S9K6cOyyEuOM3+zNaVWLuVzwE w8ebSzQZKvKJbUK1k7qR8synVO6RaOZu6f6qT/mYVTRjOwistqhgjlGjBPNrEqYi1pqx VdkUp9zyozlPsD+CZz1Z+e5Vy5YQiaBQ7A1FvDPaU+x8C4nQFV2oAgR6zQxLv9LWIWK+ 03uBQ0eZ+Wr/SZ1Ou42Mk5Ip9ZWqfAljW8+u/FeIFC4hLYKGhFGKuQFRmxzt7JWJn+z0 Kqhi68y7H/rX3JOZ0WE/7LK6mtzZUA+3ePSKoZcD9t6Dusxc8+JtvWA8KRdOviJTWF3x CNbg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hDXvwSeH; 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 w13-20020aa7dccd000000b005664a85efffsor1303230edu.0.2024.03.01.05.36.39 for (Google Transport Security); Fri, 01 Mar 2024 05:36:39 -0800 (PST) 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; AJvYcCWjYcqy4aDiAYsaKU9lF6imltOD0lQwvvPx1dHy6jrc+JhhJb0U1Mn+HGD5LL7iIrKGLNT+JKBpWoN6C2Kqs9x+RWz5JwSa2xWjJncURCUp9oxa X-Received: by 2002:a05:6402:17d2:b0:565:bbc4:9c88 with SMTP id s18-20020a05640217d200b00565bbc49c88mr1168504edy.20.1709300198953; Fri, 01 Mar 2024 05:36:38 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:5260:58bc:42cc:9d46]) by smtp.gmail.com with ESMTPSA id q28-20020a056402033c00b005659ea1caf0sm1566608edw.6.2024.03.01.05.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 05:36:38 -0800 (PST) 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 Subject: [PATCH v8 12/23] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Date: Fri, 1 Mar 2024 14:36:09 +0100 Message-ID: <20240301133620.3547430-13-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301133620.3547430-1-dario.binacchi@amarulasolutions.com> References: <20240301133620.3547430-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=hDXvwSeH; 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