From patchwork Wed May 5 14:15:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1474363 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SIfgSKNl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZzMT0fghz9sRR for ; Thu, 6 May 2021 00:18:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A1C4E82D50; Wed, 5 May 2021 16:16:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SIfgSKNl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6534682D43; Wed, 5 May 2021 16:16:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C789882D17 for ; Wed, 5 May 2021 16:16:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pf1-x431.google.com with SMTP id e15so2050448pfv.10 for ; Wed, 05 May 2021 07:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uWybWKMal/h2EIqtl3cp8og4DkPcyrst39Y84/5Hh3g=; b=SIfgSKNlkoRCnc5f1GStEo9rtqV4Qv2Rbu8zXn8Ho+fbXAMHoJl9vF8ali7HNY9yFh sJKce11m6GbgUcK1w0U8u3NQAFV97M9iM+Hr6NJLzNzL4KfcS+IJVAw/WWlbFX9Y4lmX caCLSeN+4Clluvvzi2fOcG/P5brglSTBZwhzzbqa3DG4JrfPF6bAtEAtiwEhIMpWcJ45 K0xd8NrurEz1B5Rm/UKDWD4IdzVGTjvfjc+P2Yz1O2X9DUsREICTxOL1Z0Aho5KT549S V8i8VVrHjEEasDKEZhH0xO35KOYBDP7HkzFJqtjal9B/pp7w1OgDYvUHTJKberbd8usJ dlIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uWybWKMal/h2EIqtl3cp8og4DkPcyrst39Y84/5Hh3g=; b=IYbBHMwvW35G1QC7M77AJm02vXm3VB/87JifYNOwwdPX7LkxbLZzoKK+tmDpc93XaB JsjqCzz91vNM+2+hm6c9lvIje87Kum8YHEJkvpspSCSDzPICL8oWY5YMvcfHdBaNI2ey TFiTxdwJ5JIrhlllp8ilq1PlMNlxflVCyXQQdFvpYQJa25G8sQzRh/bXXWJ3YEWV3Gs3 nLzatLUrIsHpFbWVzsYRx5DdA5W+XgmQYF2iXNaMlLknY9WYcHyLZ3JUBv3nqZAOm6Uo v1bLmVvFmvrARAyJjSiN5vfkVm1laHzBVkQtIfJF94k9pzFCIs10dmoSBAutNTd7b4E5 ne+w== X-Gm-Message-State: AOAM531IloQH0tKfcpFfBvi5Mdni0T28svNiPSRskzaAl7+aWgSz8qge C2YLtP7OXCoJPjExJUZCa6E= X-Google-Smtp-Source: ABdhPJwQgtIavWGoLv7Z53s3lPY4/dWfwxEFxFCkTFXdSQeABd8PINHQPIzkNBTIOE4MUMNBjbALmA== X-Received: by 2002:a63:4e43:: with SMTP id o3mr28288820pgl.22.1620224188263; Wed, 05 May 2021 07:16:28 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id t10sm7831482pju.18.2021.05.05.07.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 07:16:28 -0700 (PDT) From: Bin Meng To: Simon Glass , u-boot@lists.denx.de Cc: Rick Chen , Bin Meng Subject: [PATCH 9/9] riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb Date: Wed, 5 May 2021 22:15:57 +0800 Message-Id: <20210505141557.23901-10-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210505141557.23901-1-bmeng.cn@gmail.com> References: <20210505141557.23901-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean At present SiFive Unleashed board uses the Makefile to create the FIT, using USE_SPL_FIT_GENERATOR, which is deprecated as per the Makefile warning. Update to use binman instead. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/riscv/dts/binman.dtsi | 70 +++++++++++++++++++ .../dts/hifive-unleashed-a00-u-boot.dtsi | 1 + board/sifive/unleashed/Kconfig | 1 + configs/sifive_unleashed_defconfig | 1 + 4 files changed, 73 insertions(+) create mode 100644 arch/riscv/dts/binman.dtsi diff --git a/arch/riscv/dts/binman.dtsi b/arch/riscv/dts/binman.dtsi new file mode 100644 index 0000000000..f2f8647b24 --- /dev/null +++ b/arch/riscv/dts/binman.dtsi @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021, Bin Meng + */ + +#include + +/ { + binman: binman { + multiple-images; + }; +}; + +&binman { + itb { + filename = "u-boot.itb"; + + fit { + description = "Configuration to load OpenSBI before U-Boot"; + #address-cells = <1>; + fit,fdt-list = "of-list"; + + images { + uboot { + description = "U-Boot"; + type = "standalone"; + os = "U-Boot"; + arch = "riscv"; + compression = "none"; + load = ; + + uboot_blob: blob-ext { + filename = "u-boot-nodtb.bin"; + }; + }; + + opensbi { + description = "OpenSBI fw_dynamic Firmware"; + type = "firmware"; + os = "opensbi"; + arch = "riscv"; + compression = "none"; + load = ; + entry = ; + + opensbi_blob: blob-ext { + filename = "fw_dynamic.bin"; + }; + }; + + @fdt-SEQ { + description = "NAME"; + type = "flat_dt"; + compression = "none"; + }; + }; + + configurations { + default = "conf-1"; + + @conf-SEQ { + description = "NAME"; + firmware = "opensbi"; + loadables = "uboot"; + fdt = "fdt-SEQ"; + }; + }; + }; + }; +}; diff --git a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi index 1996149c95..51b566116d 100644 --- a/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi +++ b/arch/riscv/dts/hifive-unleashed-a00-u-boot.dtsi @@ -3,6 +3,7 @@ * Copyright (C) 2019 Jagan Teki */ +#include "binman.dtsi" #include "fu540-c000-u-boot.dtsi" #include "fu540-hifive-unleashed-a00-ddr.dtsi" diff --git a/board/sifive/unleashed/Kconfig b/board/sifive/unleashed/Kconfig index dbffd59c98..b08652365f 100644 --- a/board/sifive/unleashed/Kconfig +++ b/board/sifive/unleashed/Kconfig @@ -27,6 +27,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select SIFIVE_FU540 select ENV_IS_IN_SPI_FLASH + select BINMAN if !USE_SPL_FIT_GENERATOR imply CMD_DHCP imply CMD_EXT2 imply CMD_EXT4 diff --git a/configs/sifive_unleashed_defconfig b/configs/sifive_unleashed_defconfig index 62416a7c1d..dc9313e572 100644 --- a/configs/sifive_unleashed_defconfig +++ b/configs/sifive_unleashed_defconfig @@ -14,6 +14,7 @@ CONFIG_RISCV_SMODE=y CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000 +# CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y CONFIG_MISC_INIT_R=y