From patchwork Thu Jul 18 07:34:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1133595 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oTmxsdIZ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45q5xt5rr6z9s00 for ; Thu, 18 Jul 2019 17:54:26 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4A6FDC21F64; Thu, 18 Jul 2019 07:49:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AF97CC21FDB; Thu, 18 Jul 2019 07:36:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E4F35C21F19; Thu, 18 Jul 2019 07:35:26 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by lists.denx.de (Postfix) with ESMTPS id 8E174C21F42 for ; Thu, 18 Jul 2019 07:35:18 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id m30so12198598pff.8 for ; Thu, 18 Jul 2019 00:35:18 -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; bh=Oho2hUQlWPlfGyeTykEsQq+CzLfvNXTbtvFb+HiyAh4=; b=oTmxsdIZ5rNPgTRfR8MfJoKTSjDFoq30Pz3KJOLOfL1otXUyInWGOteuwQKKyhAzvF K7Na9mjDS+iEYZxRZbECbHNCb5Ygw2hpUf7IaUuuoOW2IzKkKlHTe/BAga7l5Nsr0Jrq aQQY+ojqzF9KZtm67l4uvrcGFlVMw014t2boC9EODPNSSSlb7K4AO+L5+koHSvWFwJuu ua1SgC9tQykI0+23z7fsVtLmnpj5hTuRGIvA+SAmRd/vzi968DzmbC1JBO3M3DLBIdsX CytscDwWZEHpyDWiGHdhgmyHL1c/nkUfLIJbTFKhylabpZcEOKv8HVvZxbYA+MTWuNHx E+1g== 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; bh=Oho2hUQlWPlfGyeTykEsQq+CzLfvNXTbtvFb+HiyAh4=; b=XbsBsffve0u1F/JslcaRHpCgBX7U4pX313g3BbURWpAFUtElsqjg1FJ4T56xWvl9pe Tm/MDwap0Dhze+JkGbMOET7h1J6Kwt+ucucnfNAelzielm4NBaZWEVFKjI6POGdrUCAM Gw57ZAOjPahRT/uPSKHFu36k4nIOJcQVliYx8rmFPJ1Tcf/Qr6ltz3K/aiLEgRtavv1x Srk0EeMJBOu22/SWiLSiwZ12Hib/4sEeyolUN29VEJ3xkewv7CfcpW/of0mPBQrvs3/U L4NICUZB05RxLq1+Ol5EBMproPqjDS+VS5Acj2TBUOCHpiVibHtXFWgpmCm8JQODtWWB npyA== X-Gm-Message-State: APjAAAXasZlZ/kV+Dh+39+z5sLMuQHz9jon60lG+qMSOvOKHKFBW1Fzz AmTOMmefvsGiLrECfBfKxTU= X-Google-Smtp-Source: APXvYqwwwzZD6YpR8Ue1R8G/AFC1fk7CVxeCzJZwvrm8vgNw4DVubkWAzKaxr/TfRjgHYsSTtnsn/g== X-Received: by 2002:a17:90a:384d:: with SMTP id l13mr50159888pjf.86.1563435314324; Thu, 18 Jul 2019 00:35:14 -0700 (PDT) Received: from localhost.localdomain (unknown-224-80.windriver.com. [147.11.224.80]) by smtp.gmail.com with ESMTPSA id q1sm39859821pfn.178.2019.07.18.00.35.13 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 18 Jul 2019 00:35:13 -0700 (PDT) From: Bin Meng To: Tom Rini , Simon Glass , Wolfgang Denk , Heinrich Schuchardt , Mario Six , U-Boot Mailing List Date: Thu, 18 Jul 2019 00:34:15 -0700 Message-Id: <1563435275-22326-31-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1563435275-22326-1-git-send-email-bmeng.cn@gmail.com> References: <1563435275-22326-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 30/50] doc: board: Convert README.qemu-arm to reST X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Convert plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Bin Meng --- doc/board/emulation/index.rst | 1 + .../emulation/qemu-arm.rst} | 44 ++++++++++++++-------- 2 files changed, 30 insertions(+), 15 deletions(-) rename doc/{README.qemu-arm => board/emulation/qemu-arm.rst} (80%) diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst index 6d533f3..a2b1a60 100644 --- a/doc/board/emulation/index.rst +++ b/doc/board/emulation/index.rst @@ -6,4 +6,5 @@ Emulation .. toctree:: :maxdepth: 2 + qemu-arm qemu-x86 diff --git a/doc/README.qemu-arm b/doc/board/emulation/qemu-arm.rst similarity index 80% rename from doc/README.qemu-arm rename to doc/board/emulation/qemu-arm.rst index e67bc13..ca751d4 100644 --- a/doc/README.qemu-arm +++ b/doc/board/emulation/qemu-arm.rst @@ -1,9 +1,8 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2017, Tuomas Tynkkynen +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2017, Tuomas Tynkkynen -U-Boot on QEMU's 'virt' machine on ARM & AArch64 -================================================ +QEMU ARM +======== QEMU for ARM supports a special 'virt' machine designed for emulation and virtualization purposes. This document describes how to run U-Boot under it. @@ -26,11 +25,13 @@ Building U-Boot --------------- Set the CROSS_COMPILE environment variable as usual, and run: -- For ARM: +- For ARM:: + make qemu_arm_defconfig make -- For AArch64: +- For AArch64:: + make qemu_arm64_defconfig make @@ -38,31 +39,44 @@ Running U-Boot -------------- The minimal QEMU command line to get U-Boot up and running is: -- For ARM: +- For ARM:: + qemu-system-arm -machine virt -bios u-boot.bin -- For AArch64: +- For AArch64:: + qemu-system-aarch64 -machine virt -cpu cortex-a57 -bios u-boot.bin Note that for some odd reason qemu-system-aarch64 needs to be explicitly told to use a 64-bit CPU or it will boot in 32-bit mode. Additional persistent U-boot environment support can be added as follows: -- Create envstore.img using qemu-img: + +- Create envstore.img using qemu-img:: + qemu-img create -f raw envstore.img 64M -- Add a pflash drive parameter to the command line: + +- Add a pflash drive parameter to the command line:: + -drive if=pflash,format=raw,index=1,file=envstore.img Additional peripherals that have been tested to work in both U-Boot and Linux can be enabled with the following command line parameters: -- To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.: +- To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.:: + -drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0 -- To add an Intel E1000 network adapter, pass e.g.: + +- To add an Intel E1000 network adapter, pass e.g.:: + -netdev user,id=net0 -device e1000,netdev=net0 -- To add an EHCI-compliant USB host controller, pass e.g.: + +- To add an EHCI-compliant USB host controller, pass e.g.:: + -device usb-ehci,id=ehci -- To add a NVMe disk, pass e.g.: + +- To add a NVMe disk, pass e.g.:: + -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo These have been tested in QEMU 2.9.0 but should work in at least 2.5.0 as well.