From patchwork Wed Oct 13 01:01:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1540084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=FhEa3Fvx; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HTZ9B1pprz9t0T for ; Wed, 13 Oct 2021 12:06:06 +1100 (AEDT) Received: from localhost ([::1]:48280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maSia-0005Wv-2y for incoming@patchwork.ozlabs.org; Tue, 12 Oct 2021 21:06:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSeG-0007wO-7x for qemu-devel@nongnu.org; Tue, 12 Oct 2021 21:01:36 -0400 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:45737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maSeE-0005A4-Ow for qemu-devel@nongnu.org; Tue, 12 Oct 2021 21:01:35 -0400 Received: by mail-ot1-x330.google.com with SMTP id l16-20020a9d6a90000000b0054e7ab56f27so1494276otq.12 for ; Tue, 12 Oct 2021 18:01:34 -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=XxgAiSoDU3h9hAhW5xTDPdTphzEfj6W6P7wkWYQ5iFN/Yf4uE6ZNESDzLjoC8ZvtXw +z6g/I0Gw+JqR6XGdsqifxedK/Ajqbwt/lbF66i5DSAwonvkbc3HDDIDiXcVSx9Nqm3P JB62eVahgycR+1pP4VK6nzJvuye/ehR+wMgnH6NN9aY97allQObKb1MGX16/E9VjexA9 lFkKNu9KZOemoc5ZEs3kg+Ou5wt4JNdmg52n1KlZmP4R5BQCTEGXTlOaHlRohL5qK2II UfAsepOcQk24fvt8BkuejiF4x5oa8oYYtWu8K98IB4mNjsHGDZp5k06xMab0vE6gH9ok lLeA== X-Gm-Message-State: AOAM530Eymrt4XgaQ5bBI82Hszdz7UHwRQx9dhlS/erSuoqIRDc02Dk0 KOCl4JTOkM0P2uAytAdAA4n1Ew== 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 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 Received-SPF: pass client-ip=2607:f8b0:4864:20::330; envelope-from=sjg@chromium.org; helo=mail-ot1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Bin Meng , Rick Chen , qemu-devel@nongnu.org, Atish Patra Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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