From patchwork Mon May 10 06:58:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1476178 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=BE0rsNwg; 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 4FdsPn2SgMz9sXS for ; Mon, 10 May 2021 17:00:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DAAE982EFC; Mon, 10 May 2021 08:59:17 +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="BE0rsNwg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F89482EE2; Mon, 10 May 2021 08:59:05 +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-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 9BFF582ECC for ; Mon, 10 May 2021 08:58:59 +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-ej1-x636.google.com with SMTP id u21so22791843ejo.13 for ; Sun, 09 May 2021 23:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Njqujok9h7HAkNhCe3JVzmwvr+ArfyBcCBb7ia+fd5U=; b=BE0rsNwgDUVg+rnCrCG75N6GTgSvar1VUwF3RvXm8cnpbJ19L48o+Be+ZOTEDoRWDH mL1Dy5ydgdcQ+FiMHWuYvKRlCtYv7DCbzSmJmNkrHx3TI+/VO/jMBReTFXYbmUuOwYly 6tLcQjIFhiC/RKm1gXsI9GDyDlLX9IBNOjGWyg83pPPDEwFOD+iqHuQgwrUFJ2/c5qWk IcZBoVHIc8QFUGMAtuHsyls2OuEyStOIA/uRrrXm8Jj3Vp1UQsjJL+J3OArGjOm+ZJuI 3U1/ofezehk7OSLZE6gLn9rCqUakJSL7p/SSYz/APOFY2BICn4jB0vgskSAJ6M0prlIc IUhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Njqujok9h7HAkNhCe3JVzmwvr+ArfyBcCBb7ia+fd5U=; b=d85e2c2QYPnoRH2saeTJCb+HiY1L2OTxYjedEXyhyYgD7TGS5IQwSszS/CuBHgTVcx aBpocCfw3YoaD43dn5XIw/3tU6AhpkSs5kvEqyCYbkiKRI9IHuRK/mfaMIQjBjUpveTn AHxU4vmU86d33Y5OzDyKWTGReB5wDeoZWvDcYw0v0s2j5dagm1xC0j6Gz/r6Fk+N2QzT zr+B9+w29UcbVrev925fIV10gVL7cDjYBzPA/R2knpHDxgEq/C1Hn5khm47cfPAgdOyb N3bg3ivRvQSrLE4DEgMI5kBpRFgm/2EuESYKE+oNL1S+p1Ah4yFuMaIMaLc8bN76HLkg f+xg== X-Gm-Message-State: AOAM533fVyrAsXihXmq0wdIa8qDhxwo2TmMU0BYlzzaZPpPwFPWm3Zv9 0IQIiDcoa1DEf3P99RiBUIk= X-Google-Smtp-Source: ABdhPJxCedO0R9Nqwx1rQvgD//ZllzmDPB0Q0UCbefMKkb4BeqFHIudSSOn5qT03S9oY8O20w5Ziiw== X-Received: by 2002:a17:906:e086:: with SMTP id gh6mr23091692ejb.201.1620629939296; Sun, 09 May 2021 23:58:59 -0700 (PDT) Received: from pek-vx-bsp2.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id c5sm4744944eds.94.2021.05.09.23.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 May 2021 23:58:58 -0700 (PDT) From: Bin Meng To: Simon Glass , Rick Chen , u-boot@lists.denx.de Subject: [PATCH v4 07/13] riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb Date: Mon, 10 May 2021 14:58:31 +0800 Message-Id: <20210510065837.2008556-8-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510065837.2008556-1-bmeng.cn@gmail.com> References: <20210510065837.2008556-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