From patchwork Mon May 10 12:23:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1476359 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=eU2Vq21v; 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 4Ff0cp4ZlJz9rx6 for ; Mon, 10 May 2021 22:25:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 16EC482EF0; Mon, 10 May 2021 14:24:18 +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="eU2Vq21v"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 512F082EE3; Mon, 10 May 2021 14:24:12 +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-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 88F1E82ED6 for ; Mon, 10 May 2021 14:24:05 +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-pj1-x1030.google.com with SMTP id h14-20020a17090aea8eb02901553e1cc649so9952713pjz.0 for ; Mon, 10 May 2021 05:24:05 -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=Njqujok9h7HAkNhCe3JVzmwvr+ArfyBcCBb7ia+fd5U=; b=eU2Vq21vXY69xHkwkfOx2pHr8Abyw4JsG4XkxTUm2E6NIcTYBICG4QD7ye19A/o/JC tVJpJS/QPI33mc2oqEfBrJh0GYwyoMek7a7xlvZnQ1lvOqVxcCQlNcEMHWmy+QBtzyDj zL595LwA7dHDXT47v3sxLNveDhVtHgSN1JXQrsrbVzGXOIn+ZbUEs/j532ugSkGJGIDo yWFMkOZVZfQ648Y4obhWkeU9PSjqJMbpuRrWwupexUCTrKQpKamZ7ZeGi9vAkYRNQpq8 50rN0l/UrrbT92AG2CBPqqjBF4zCUrS5cu4bs0EHCz5QtVhqAnBNTGjQLhWwU6KzJGHh 2qrw== 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=Njqujok9h7HAkNhCe3JVzmwvr+ArfyBcCBb7ia+fd5U=; b=t2x16TT2JiD3k1GkYPwKZ/2j2+V8hF/YKgTM8V1HnjFpO2MBSzNSDogJ16dMVmfOYv 5fKFjxFhI11HfcfSVOov6zwVOtSpJ3IrtWlEzLeyZO0aCgWo9kVJJM93XPuFhczcOggS GXziMG8sULiqNjQ8DvNJ4hUWw3JnwEgo9Cqd8MBK1CSqVOe/iWouHBsh/qUawFySy9XH JP+J4aG90aVt9TXDY2E0oDiGU8NQCg5IZJqdYxRM07U52mbyWCw+qin6eiw1jvhkMgUu T97VLY6wANijYdphJHP6wWDOfb7CorhKTDJ1jQu1KvYeGt1y268KeK6KZxlSxn9GWi+R L4ZA== X-Gm-Message-State: AOAM533bgn1CcntcbaXqKsyrjLgB2AKXo590Imj+UzRmMFz0voHAec0d M8rNJVHL4DGQx9wKRZlMHVU= X-Google-Smtp-Source: ABdhPJwkIfRegLUFbYpNhnulSFd1t+8uSnhrEim6mipZ1goiS4NH09a1LvmF3k6Gj/9z0R1DW1COHg== X-Received: by 2002:a17:90b:505:: with SMTP id r5mr27444496pjz.121.1620649444195; Mon, 10 May 2021 05:24:04 -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 d3sm1405661pfn.141.2021.05.10.05.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 05:24:03 -0700 (PDT) From: Bin Meng To: Simon Glass , Rick Chen , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH v5 07/13] riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb Date: Mon, 10 May 2021 20:23:35 +0800 Message-Id: <20210510122341.13798-8-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510122341.13798-1-bmeng.cn@gmail.com> References: <20210510122341.13798-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 --- (no changes since v3) Changes in v3: - Fix the opensbi entry type in binman.dtsi 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..e02597e73d --- /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: opensbi { + 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..502916e86a 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 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