Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6D2C433F5 for ; Wed, 13 Oct 2021 01:02:13 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6309360241 for ; Wed, 13 Oct 2021 01:02:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6309360241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D78E8375D; Wed, 13 Oct 2021 03:02:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FhEa3Fvx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9A27583617; Wed, 13 Oct 2021 03:01:46 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 3073E8321C for ; Wed, 13 Oct 2021 03:01:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x32e.google.com with SMTP id w10-20020a056830280a00b0054e4e6c85a6so1545523otu.5 for ; Tue, 12 Oct 2021 18:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xj1e/TwUMhnPg0EzSwAwQl/XvDUpfzlFFnWUPRvfKb0=; b=FhEa3FvxmdLpOq45YAjfZ9GlHPDA57GYj9Fd0qpKPJCNrdQ7i0Stg+HcMM7oplDcka 0uJVf3avJ+nutoLa/tPXFD6OsCqoNVc6gZpvvNI8uOERWSsWpWfNWqNzNX4dAJ61f6BJ 4yVGrN6Fy3VaGlwExiKpnFWK6M+LV31Tqnytk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xj1e/TwUMhnPg0EzSwAwQl/XvDUpfzlFFnWUPRvfKb0=; b=R2NeLXTCNZ6eYLxD6jmFeSiAousaE4Gi3Q8CzsQU/neRz2WoqutT4HnRczFJdHZqW0 V0AUT+nD/ZyVI9nJFOVqcA14uczSlCqmUT2fZxS20OdIkdrFXxn+gL6akFZiaxmHc6gG CqKbOjOqHn9U8GoQ7kYlEsprClmJvTITCohCOPtDpPb+TzmAGQgSOaNFZ3mCzXuHJUuF hLcUKxVO4La5FE7fowsrgnrLyTMv0rlrIA991Uz3LnU1Ry702TEAiK0w9FmmrknKaSj3 rGxtNfaVf0h887AVBBPAcQCbbjL6aMi4WP91PnoTGFEGHBufLkkGtcVixPF20Ah1D6Kr w/mg== X-Gm-Message-State: AOAM531RNFJGWYs2l9JjmCR6ejhUUgJp7YAIrpkGHnnaRR8UJ39kDWmW yPeKI3AWG/LErjUbdkeZBsvv+5BiaSL+EA== X-Google-Smtp-Source: ABdhPJy0TemTw6auYJIG00wP8FppUlfLn32uE9pt8D9NiZN/nbvLYvGg4mQ+pn0GLW6kJh8t2B+1Xg== X-Received: by 2002:a9d:69c9:: with SMTP id v9mr28161771oto.127.1634086893619; Tue, 12 Oct 2021 18:01:33 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id a10sm238107otb.7.2021.10.12.18.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 18:01:33 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Ilias Apalodimas , Simon Glass , Atish Patra , Bin Meng , Heinrich Schuchardt , Rick Chen , qemu-devel@nongnu.org Subject: [PATCH 03/16] riscv: qemu: Explain how to extract the generate devicetree Date: Tue, 12 Oct 2021 19:01:07 -0600 Message-Id: <20211013010120.96851-4-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog In-Reply-To: <20211013010120.96851-1-sjg@chromium.org> References: <20211013010120.96851-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean QEMU currently generates a devicetree for use with U-Boot. Explain how to obtain it. Signed-off-by: Simon Glass --- doc/board/emulation/qemu-riscv.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst index 4b8e104a215..b3cf7085847 100644 --- a/doc/board/emulation/qemu-riscv.rst +++ b/doc/board/emulation/qemu-riscv.rst @@ -113,3 +113,15 @@ An attached disk can be emulated by adding:: -device ide-hd,drive=mydisk,bus=ahci.0 You will have to run 'scsi scan' to use it. + +Obtaining the QEMU devicetree +----------------------------- + +QEMU generates its own devicetree to pass to U-Boot and does this by default. +You can use `-dtb u-boot.dtb` to force QEMU to use U-Boot's in-tree version. + +To obtain the devicetree that qemu generates, add `-machine dumpdtb=dtb.dtb`, +e.g.:: + + qemu-system-riscv64 -nographic -machine virt -bios u-boot \ + -machine dumpdtb=dtb.dtb -- 2.33.0.882.g93a45727a2-goog