From patchwork Tue Jun 15 00:17:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Drew Fustini X-Patchwork-Id: 1491926 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=g5b23S6w; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4G3pp43Ql4z9sW6 for ; Tue, 15 Jun 2021 10:18:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B40BE400AB; Tue, 15 Jun 2021 00:18:49 +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 AiX6hwlLfxtx; Tue, 15 Jun 2021 00:18:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id DA33640474; Tue, 15 Jun 2021 00:18:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7CB311BF3FD for ; Tue, 15 Jun 2021 00:18:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6C0B483C56 for ; Tue, 15 Jun 2021 00:18:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OK0ql1uE_4jZ for ; Tue, 15 Jun 2021 00:18:22 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by smtp1.osuosl.org (Postfix) with ESMTPS id BCDA882F19 for ; Tue, 15 Jun 2021 00:18:22 +0000 (UTC) Received: by mail-pg1-x536.google.com with SMTP id e22so9987808pgv.10 for ; Mon, 14 Jun 2021 17:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xQMmUeun278mJyzowZDqv9+PfDhVxkE7EW2vMeTOMX8=; b=g5b23S6wmoRDaeVVU1pZV//uKrjoeSv+Js3U/mv6gKcOf6HZHaH1f7lbCpBg+EisvW aQHaXmL12CROB8/nVda2+KarOcgHlZu1A8DpnSKPjG9hnNUrVrfLkQwMgZMdaFJgWOCV 9WWKcY9Ml2iUxwojdFluPWGCR2kZaj+mIdj8UpmSQBKUwqTnUhgnclUTR1Zcf0ukZkSo Jlts9Sgt9s0Jz45fJLraLguolnxZqMzYb2IO7UAnjRiNzklf8ogUgaFRgfEGj34zVT1U XyGsF+noQawlBS2ZY+enDosbcJkVkmtjbhBIBmCBG24/7DfvZGFTyIGDg96rP/dWbCSS 1qUA== 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=xQMmUeun278mJyzowZDqv9+PfDhVxkE7EW2vMeTOMX8=; b=thCTyN3n2eX7Hbr0E2ClZcypnNLtCwUB4JxyggfnR8b9hMyG9F4GyeF8tLUtu2AAgB nXxeCgVnd+frznkA/CWPBT7ebWVm8AAyYQcs8q+NLEnPVYpL2meHN0Y7AQa1Au1aGt7X czyryWfJ5DuU8TkyxhX7wrQhCiuq5Q0WH85QoVVPayu0VNYiNLHgSqUcSxXU9h+9XVIW aSv0GVYxSIvCc+bs9G5cWTDIEZ55KLP/aVBvIDIHWxcR92oRNfWakSqt242rL0nlroIO uHYbqdjsMeCuVHGTNc6hEe4FQuRkr/Ac60cGffjY9ja4lLUkXvNrW0XJ5Ar3GnYlQ1Ly WaFA== X-Gm-Message-State: AOAM532WYHUm8ZjEkV7CGtXQh3JA7KXw15EKuxQhNU1Eeri9oin26FyX eyCnzEp6mANBZd/NiqDbpSHWO8XQyzOrQg== X-Google-Smtp-Source: ABdhPJxuh0BgIXTlesU7VVwXdUz0NVv91NpPQVTVF0x91FqmOFkBQS2kYCWpen76Q7XDpGCHTdZu4g== X-Received: by 2002:aa7:97b8:0:b029:2e9:df45:f83f with SMTP id d24-20020aa797b80000b02902e9df45f83fmr1847225pfq.10.1623716301783; Mon, 14 Jun 2021 17:18:21 -0700 (PDT) Received: from x1.hsd1.or.comcast.net ([2601:1c0:4701:ae70:d92:6466:8a78:3f88]) by smtp.gmail.com with ESMTPSA id e10sm14908956pgc.63.2021.06.14.17.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 17:18:21 -0700 (PDT) From: Drew Fustini To: buildroot@buildroot.org Date: Mon, 14 Jun 2021 17:17:48 -0700 Message-Id: <20210615001750.421889-3-drew@beagleboard.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210615001750.421889-1-drew@beagleboard.org> References: <20210615001750.421889-1-drew@beagleboard.org> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/4] boot/opensbi: introduce BR2_TARGET_OPENSBI_FW_FDT_PATH X-BeenThere: buildroot@busybox.net 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: Drew Fustini , Alistair Francis , Thomas Petazzoni , Bin Meng Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" If u-boot CONFIG_OF_SEPARATE is defined [1], then the device tree will be built and placed in a u-boot.dtb file alongside u-boot.bin. When BR2_TARGET_UBOOT_FORMAT_DTB is enabled, buildroot will copy u-boot.dtb to $(BINARIES_DIR). This is useful for RISC-V platforms that want to build OpenSBI with an external DTB by using FW_FDT_PATH [2]. [1] https://github.com/lentinj/u-boot/blob/master/doc/README.fdt-control [2] https://github.com/riscv/opensbi/blob/master/docs/firmware/fw.md Signed-off-by: Drew Fustini Reviewed-by: Bin Meng Reviewed-by: Alistair Francis --- boot/opensbi/Config.in | 10 ++++++++++ boot/opensbi/opensbi.mk | 3 +++ 2 files changed, 13 insertions(+) diff --git a/boot/opensbi/Config.in b/boot/opensbi/Config.in index 632eeec88d77..bd4bd5ee6175 100644 --- a/boot/opensbi/Config.in +++ b/boot/opensbi/Config.in @@ -109,4 +109,14 @@ config BR2_TARGET_OPENSBI_UBOOT_PAYLOAD help Build OpenSBI with the U-Boot as a Payload. +config BR2_TARGET_OPENSBI_FW_FDT_PATH + bool "Include U-Boot DTB in OpenSBI Payload" + depends on BR2_TARGET_OPENSBI_PLAT != "" + depends on BR2_TARGET_UBOOT + depends on BR2_TARGET_OPENSBI_UBOOT_PAYLOAD + select BR2_TARGET_OPENSBI_INSTALL_PAYLOAD_IMG + help + Build OpenSBI with FW_FDT_PATH set to $(BINARIES_DIR)/u-boot.dtb + Note that CONFIG_OF_SEPARATE must be set in the u-boot kconfig. + endif diff --git a/boot/opensbi/opensbi.mk b/boot/opensbi/opensbi.mk index a525b8aea348..8e055633a82d 100644 --- a/boot/opensbi/opensbi.mk +++ b/boot/opensbi/opensbi.mk @@ -46,6 +46,9 @@ endif ifeq ($(BR2_TARGET_OPENSBI_UBOOT_PAYLOAD),y) OPENSBI_DEPENDENCIES += uboot OPENSBI_MAKE_ENV += FW_PAYLOAD_PATH="$(BINARIES_DIR)/u-boot.bin" +ifeq ($(BR2_TARGET_OPENSBI_FW_FDT_PATH),y) +OPENSBI_MAKE_ENV += FW_FDT_PATH="$(BINARIES_DIR)/u-boot.dtb" +endif endif define OPENSBI_BUILD_CMDS