From patchwork Mon May 10 12:23:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1476351 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=TkN1PpZU; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Ff0bP1NYNz9rx6 for ; Mon, 10 May 2021 22:24:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1139182EB4; Mon, 10 May 2021 14:23:55 +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="TkN1PpZU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B6C482EB6; Mon, 10 May 2021 14:23:53 +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-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 0684182AC4 for ; Mon, 10 May 2021 14:23:50 +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-x432.google.com with SMTP id i190so13428642pfc.12 for ; Mon, 10 May 2021 05:23:49 -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:mime-version :content-transfer-encoding; bh=PylANYdqU/8zvrMvaxr3Pq0P1urjn4V5sD5nS1PffOo=; b=TkN1PpZUEN6GdokELfnqrOUKD9R6du1XCpCmXQf+0ICwUt0dT7nJlatUK+EPlzm9Wc jLtNHsXwm1JyI0aADCXLpbHJ0R35YV2n5EkVAzwtaIcDKXFz6r0AhwQ8CZdwbAyUZHBT 7nrm1UesLjqYbzDA/nmnrQtr39nFScLzT0Q9rw+0HHDNwNo+jkPMbBFoF+Hp/mkkDEzD y6w/+HVQto2n+QUpVYv2mFgITaRmImt+dRuhG0ev7RxwCA19oftN5dbTVTm3FGS3DKDe GH8SXwmCTNdkmRpZp0XsBiJ6oHOlkQUrJdAxfaLAASDH8z5kS7fTrTVKUV2euAn/T/9N hdnQ== 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:mime-version :content-transfer-encoding; bh=PylANYdqU/8zvrMvaxr3Pq0P1urjn4V5sD5nS1PffOo=; b=mJ2spy2lKd3BYa96IJszcZa1ZG9liIdJE2YvCXPDR1XIs7A0MYPAzcKRmFgG6R1MDy 52XrfUMCxwr75BEG2Ic5mnWmS5r8waIWn3NbrMFPx6jmObYfBXG/ElBLdI9Unw6Vakzu lgU+VS/3iOn/WyPC8cKLHEraydlOImRtnH62WPxwWHQimQSSaOfm50JOLeF/2SieZOsR 9zIrOZUhv2jL0es38DtW4HFvyhTEixKQVuX+s318ImffD3KI/ow9RDDGClkmM5vEYACQ 9PwWix1Y78w9iespBadn7vpoTEzjSDMKqoBnsOkDZJcRrYFQm3nZoPinEsXKqX+qHuiE bp/w== X-Gm-Message-State: AOAM531edV19OrDmZhGCdLIEBl5zQiH8lcEHTHNrYg7LoxpEuz0qa2hV JTOMO926gO0RzBwI4ta6PTI= X-Google-Smtp-Source: ABdhPJwSlZx6dxWJ/x5JHjZRd5kQjMr3ka1Lqm/r0Xe/MjUaifhajZ9Z8ncmKu+9MGrhAdACGKX3EA== X-Received: by 2002:a63:b10:: with SMTP id 16mr25766699pgl.90.1620649428442; Mon, 10 May 2021 05:23:48 -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.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 05:23:48 -0700 (PDT) From: Bin Meng To: Simon Glass , Rick Chen , u-boot@lists.denx.de Cc: Bin Meng Subject: [PATCH v5 00/13] riscv: Switch to use binman to generate u-boot.itb Date: Mon, 10 May 2021 20:23:28 +0800 Message-Id: <20210510122341.13798-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 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 This series updates binman to handle creation of u-boot.itb image for RISC-V boards. Azure results: PASS https://dev.azure.com/bmeng/GitHub/_build/results?buildId=363&view=results The following tests were performed: * booting qemu-riscv{32|64}_spl_defconfig on QEMU virt * booting sifive_unleashed_defconfig on QEMU sifive_u AE350 SPL defconfigs are not tested. @Rick, could you please test and report? The series is available at u-boot-x86/riscv_binman for testing. Changes in v5: - update binman.rst for OF_BOARD or OF_PRIOR_STAGE usage Changes in v4: - update the makefile dependency on u-boot.img instead of u-boot.bin Changes in v3: - Fix the opensbi entry type in binman.dtsi - new patch: "lib: kconfig: Limit BINMAN_FDT for OF_SEPARATE or OF_EMBED" - rename the Kconfig option name to BINMAN_STANDALONE_FDT - make BINMAN_STANDALONE_FDT default y for OF_BOARD as well - reword the Kconfig option help message a little bit - new patch: "riscv: ae350: Switch to use binman to generate u-boot.itb" - remove USE_SPL_FIT_GENERATOR in ae350_ defconfigs Changes in v2: - drop patch: "binman: test: Correct the name of 170_fit_fdt_missing_prop.dts", as it was based on a wrong version - drop patch: "makefile: Update clean rule to remove files generated by binman", as it is better to refactor binman to generate all intermediate files for makefile to clean - drop "size = <16>" in the binman node - new patch: "binman: Support packaging U-Boot for scenarios like OF_PRIOR_STAGE" - new patch: "riscv: dts: Sort build targets in alphabetical order" - new patch: "riscv: qemu: Switch to use binman to generate u-boot.itb" - new patch: "riscv: Drop USE_SPL_FIT_GENERATOR" Bin Meng (13): common: kconfig: Correct a typo in SPL_LOAD_FIT binman: Correct '-a' description in the doc binman: Correct the comment for ATF entry type binman: test: Rename 172_fit_fdt.dts to 170_fit_fdt.dts binman: Add support for RISC-V OpenSBI fw_dynamic blob makefile: Pass OpenSBI blob to binman make rules riscv: sifive: unleashed: Switch to use binman to generate u-boot.itb lib: kconfig: Limit BINMAN_FDT for OF_SEPARATE or OF_EMBED binman: Support packaging U-Boot for scenarios like OF_BOARD or OF_PRIOR_STAGE riscv: dts: Sort build targets in alphabetical order riscv: qemu: Switch to use binman to generate u-boot.itb riscv: ae350: Switch to use binman to generate u-boot.itb riscv: Drop USE_SPL_FIT_GENERATOR Makefile | 4 +- arch/riscv/cpu/generic/Kconfig | 1 + arch/riscv/dts/Makefile | 3 +- arch/riscv/dts/ae350_32.dts | 2 + arch/riscv/dts/ae350_64.dts | 2 + arch/riscv/dts/binman.dtsi | 78 ++++++++++++++ .../dts/hifive-unleashed-a00-u-boot.dtsi | 1 + arch/riscv/dts/qemu-virt.dts | 8 ++ arch/riscv/lib/mkimage_fit_opensbi.sh | 100 ------------------ board/AndesTech/ax25-ae350/Kconfig | 1 + board/sifive/unleashed/Kconfig | 1 + common/Kconfig.boot | 5 +- configs/ae350_rv32_spl_defconfig | 1 + configs/ae350_rv32_spl_xip_defconfig | 1 + configs/ae350_rv64_spl_defconfig | 1 + configs/ae350_rv64_spl_xip_defconfig | 1 + configs/qemu-riscv32_spl_defconfig | 1 + configs/qemu-riscv64_spl_defconfig | 1 + dts/Kconfig | 18 ++++ lib/Kconfig | 2 +- tools/binman/binman.rst | 28 ++++- tools/binman/entries.rst | 13 +++ tools/binman/etype/atf_bl31.py | 2 +- tools/binman/etype/opensbi.py | 23 ++++ tools/binman/ftest.py | 17 ++- .../test/{172_fit_fdt.dts => 170_fit_fdt.dts} | 0 tools/binman/test/201_opensbi.dts | 14 +++ 27 files changed, 215 insertions(+), 114 deletions(-) create mode 100644 arch/riscv/dts/binman.dtsi create mode 100644 arch/riscv/dts/qemu-virt.dts delete mode 100755 arch/riscv/lib/mkimage_fit_opensbi.sh create mode 100644 tools/binman/etype/opensbi.py rename tools/binman/test/{172_fit_fdt.dts => 170_fit_fdt.dts} (100%) create mode 100644 tools/binman/test/201_opensbi.dts