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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 18E73C48BF6 for ; Sat, 24 Feb 2024 20:58:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id BDE1C408CB; Sat, 24 Feb 2024 20:58:04 +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 c66iudiyl8D9; Sat, 24 Feb 2024 20:58:03 +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 smtp2.osuosl.org C6B37408E8 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id C6B37408E8; Sat, 24 Feb 2024 20:58:02 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 43B791BF276 for ; Sat, 24 Feb 2024 20:57:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2EC59405F8 for ; Sat, 24 Feb 2024 20:57:47 +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 TCuRC8ZLW82k for ; Sat, 24 Feb 2024 20:57:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::629; helo=mail-ej1-x629.google.com; envelope-from=dario.binacchi@amarulasolutions.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org B5BD2405EB DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B5BD2405EB Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by smtp2.osuosl.org (Postfix) with ESMTPS id B5BD2405EB for ; Sat, 24 Feb 2024 20:57:45 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a26fa294e56so327876466b.0 for ; Sat, 24 Feb 2024 12:57:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708808263; x=1709413063; 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=U/CShTtarde2MRr6FPdIPkj3Z5fZJSCwJA6hthhADM8=; b=I02Q9AMo/8EDGasjtwdY/URPvGc9mPWrCqtkrQXzylPeX8bpYa7heja63DOt5CqPtX N3Rlc21xqyFRplTnC4xuL4tGh7vu6JXBIvKHV8y8luP8FJ9GDc6IoXenhaA0SCdeAwcO SK9KaK8+XQ8bB3VBEkun1waqavQwIv67CDH84jf+I1Gt8S7x750rTfo7MjaL8BN2Z1vF /KoIWV4bz3K4yQUtPfoHscO5X2iFa/qRV+jAZuJpI/pX9Bzitv0x5w6gnhKYg/NiLfM/ sF8YezmSfytERdb8Eouh5pydQHakXV12fNAbAr3lFSr2NuagGU8cAQrOxxsFNXThLHWZ 1rBQ== X-Gm-Message-State: AOJu0YybwTQYTHR0GwzXQkc5pNd+gnVu4N/BMRPOgiibGMiwNSuZODlk QYRcZzkisHhQ6LPshlirBxqGfrp/oQ7zYW06RmllBurnwexs801/ho9aEmha+dIS2P7kklTbVqi zj/0= X-Google-Smtp-Source: AGHT+IGvBkkeLwiHH6s5COomlxGUNfs0iMiiLYAFxdeAvBxfmjLb1bjW1D5t/RQUAErSOEIz2WPF8g== X-Received: by 2002:a17:906:4bd4:b0:a3d:994a:791d with SMTP id x20-20020a1709064bd400b00a3d994a791dmr2237282ejv.59.1708808263533; Sat, 24 Feb 2024 12:57:43 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-5-96-195.retail.telecomitalia.it. [87.5.96.195]) by smtp.gmail.com with ESMTPSA id tk6-20020a170907c28600b00a4306ac4c77sm425506ejc.197.2024.02.24.12.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 12:57:43 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Date: Sat, 24 Feb 2024 21:56:49 +0100 Message-ID: <20240224205654.1546744-13-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240224205654.1546744-1-dario.binacchi@amarulasolutions.com> References: <20240224205654.1546744-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=1708808263; x=1709413063; 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=U/CShTtarde2MRr6FPdIPkj3Z5fZJSCwJA6hthhADM8=; b=jVCuO8OuCOastqaWBMvFDliSOSf1TZFL3eW7PNLizCnx1jzJjPlKHSMNRzdPpsToMh EC9D6n5p48+ST+kR5wUD0dOSyuXEH73Gs9tPOytLusab14/t9kRPgbmjEkC0EM4Unbw1 rYd4BxHi6rgUoNeOoIxpM0vQ9adlNdDbt6/5k= 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) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=jVCuO8Ou Subject: [Buildroot] [PATCH v6 12/16] 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 , 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]. [1] https://docs.u-boot.org/en/v2024.01/develop/package/binman.html#invoking-binman-within-u-boot Co-developed-by: Romain Naour Signed-off-by: Romain Naour Signed-off-by: Dario Binacchi --- 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: 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..9157a4b738c3 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 +ifneq ($(BR2_TARGET_UBOOT_USE_BINMAN),y) +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