From patchwork Mon Feb 8 12:38:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 378571 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp4883255jah; Mon, 8 Feb 2021 09:47:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSBW0CNYlIYcgU1qY9WlyQjN3d9MZ6GYO0UQEFItV3QUgE/rB9XkDD6TX2jmdcop5t0lVS X-Received: by 2002:a25:ada2:: with SMTP id z34mr28433152ybi.335.1612806471725; Mon, 08 Feb 2021 09:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612806471; cv=none; d=google.com; s=arc-20160816; b=Axf9MOR5Jppt7kyzHZMgqdB4iv9+wOVLrvbqglioLhwpkr3DqMkCwQKQYrSGJ4Con2 ghi60LfjzFOCJecXysnZA1cIvIXDcZtjQMacAzrZrnuI+5tIEIvTVpdyc6WSpv/pmsuF KkGXE0nNWhkm548tRH2EVQZoDnDrEGtUYJXBLhbj9TdDJZib2pRtVa8/+RAtXwtZgiuV ZHGovEH8UG8dLHLByPcsOGFtnbr33BmuXlJMizpz5dBTqUjig9NJQ/KcELnfylyQXz28 6YDgKajaVgwQUVYacp3mBcf3SFgJ84Uih6blGgZsuQPrBtgTu019QynK8ucN3ikK1fC0 ZCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6bc9E/qj8MVrG1lrbbnDCW0cq4qlP1ZjoNfCdUMbKio=; b=jZYu1gUrDbnQsGRmMZ5/TkYJBcN+MW0OjziVZI0O1YejzvQ2/pUygRR7UwLeFIsgSe 6MZewtCP+P9xDxcq027Uxkk3d4za4Bqzt5KjR0oclJelgHo4Lgpy2wLdOpHH3KQxaeBF 2D0v/f1AluQiOHwC79Fn6C0Q45DREtO0WlpnlqCeDQK4q+Z9z6eO2QjmNrXyAtLdKPLa fUAw32lBvquROA46Vg5Yvw32siMNmI/k99TvFtxLemgU3i4XOILKI021ygKYwnrw/1al Ycz6Pvn1Qob2nz2zwsBX6aDzKCeuHVai8F5b2AH1i1foFsuYUAbMK73dBNs3x9gJXbdJ oG+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="fLQ61n/+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k71si18052983ybk.215.2021.02.08.09.47.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Feb 2021 09:47:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="fLQ61n/+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9Adb-0002fT-6f for patch@linaro.org; Mon, 08 Feb 2021 12:47:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l95uX-0004M0-Iw for qemu-devel@nongnu.org; Mon, 08 Feb 2021 07:45:03 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:34992) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l95uQ-0000eW-9y for qemu-devel@nongnu.org; Mon, 08 Feb 2021 07:45:01 -0500 Received: by mail-wr1-x431.google.com with SMTP id l12so16970290wry.2 for ; Mon, 08 Feb 2021 04:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6bc9E/qj8MVrG1lrbbnDCW0cq4qlP1ZjoNfCdUMbKio=; b=fLQ61n/+ea7zzB/PphMljhmU63cmAiwMCJDFiLca2nKvdJPeFMxQlEmdpnNCvobsSS ekKH8ye+Ft5X88617gJxZIkmBVjqjEyIilTMx7icOnxMrcyMYqi/R75Zr7HHrUw+Zcw7 hSpdANhvu+r20WxVJjjeOgGs2Q4xN13Y9krbp95Oi1SFQulS4wZP/RrCTVhRuXSobM9x 8bMVq7xMzbPsOv/6aaF2bMlGS0muBGAk/tXKV7qAFtTnhcI/jpxwECDlhZQhibxKFAzv fwFSUtWB6RFKDLH3C5Lxzt9XuY0u72/Df9c21XwGCX33QZQLkSHMFO9sXfkoeYr2gGN5 T6ZA== 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=6bc9E/qj8MVrG1lrbbnDCW0cq4qlP1ZjoNfCdUMbKio=; b=cB9VC1hP03scwcWP+M6ZJY5WQnfpW46SEBkgOK1PDgSakGMcyWJb+fmfOXmLbqn1gh 5SpmByaFJE8jLBPC84LovXDXrVynqSGR7EKfJL/0bwlXD3T9zcrYDgkJOWAE5GcKfym4 UlJniy9tmxr3IXlcWiB/6La99aXmUmREgQp9dOmV+m+cvP9Jw7z1Wr5U+CfuApLMhV+a yPv3hQvfnCq3pxH+cbrh698XJLQ3LeIcidisJAG2tgGTjZEZ4qMM4DhPC61+zJznQrpv 5k+gKdPESoGNHxLcoGj4MUsaiOZJzDe/qHmsF7SlXq1a0jlMsOism8K7NGkmxAgDgQom mwYw== X-Gm-Message-State: AOAM5326tL/57ynEqB8qqvuWRBmjhW4kqYKIssez8I12P6evANz6qCd8 WTgjDIlukoBHolkp77gNowIdY/nmfTa4BsC0 X-Received: by 2002:a05:6000:1547:: with SMTP id 7mr19956836wry.301.1612788292622; Mon, 08 Feb 2021 04:44:52 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c11sm27764528wrs.28.2021.02.08.04.44.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 04:44:50 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2737B1FF9E; Mon, 8 Feb 2021 12:38:23 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/16] docs/system: document an example vexpress-a15 invocation Date: Mon, 8 Feb 2021 12:38:20 +0000 Message-Id: <20210208123821.19818-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210208123821.19818-1-alex.bennee@linaro.org> References: <20210208123821.19818-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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, 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: Anders Roxell , "open list:Versatile Express" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The wiki and the web are curiously absent of the right runes to boot a vexpress model so I had to work from first principles to work it out. Use the more modern -drive notation so alternative backends can be used (unlike the hardwired -sd mode). Signed-off-by: Alex Bennée Cc: Anders Roxell Message-Id: <20210202134001.25738-15-alex.bennee@linaro.org> -- 2.20.1 diff --git a/docs/system/arm/vexpress.rst b/docs/system/arm/vexpress.rst index 7f1bcbef07..3e3839e923 100644 --- a/docs/system/arm/vexpress.rst +++ b/docs/system/arm/vexpress.rst @@ -58,3 +58,31 @@ Other differences between the hardware and the QEMU model: ``vexpress-a15``, and have IRQs from 40 upwards. If a dtb is provided on the command line then QEMU will edit it to include suitable entries describing these transports for the guest. + +Booting a Linux kernel +---------------------- + +Building a current Linux kernel with ``multi_v7_defconfig`` should be +enough to get something running. Nowadays an out-of-tree build is +recommended (and also useful if you build a lot of different targets). +In the following example $BLD points to the build directory and $SRC +points to the root of the Linux source tree. You can drop $SRC if you +are running from there. + +.. code-block:: bash + + $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig + $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- + +By default you will want to boot your rootfs off the sdcard interface. +Your rootfs will need to be padded to the right size. With a suitable +DTB you could also add devices to the virtio-mmio bus. + +.. code-block:: bash + + $ qemu-system-arm -cpu cortex-a15 -smp 4 -m 4096 \ + -machine type=vexpress-a15 -serial mon:stdio \ + -drive if=sd,driver=file,filename=armel-rootfs.ext4 \ + -kernel zImage \ + -dtb vexpress-v2p-ca15-tc1.dtb \ + -append "console=ttyAMA0 root=/dev/mmcblk0 ro"