From patchwork Sun Oct 21 14:00:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 987312 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="cLgVN2s+"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42dLtq3sHgz9sCQ for ; Mon, 22 Oct 2018 01:02:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8736E3069B; Sun, 21 Oct 2018 14:02:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SxGwYjUJKTde; Sun, 21 Oct 2018 14:02:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DF17225CA8; Sun, 21 Oct 2018 14:02:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D0F861BF38B for ; Sun, 21 Oct 2018 14:02:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CE7A6870F8 for ; Sun, 21 Oct 2018 14:02:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RqxcxAu-DnGy for ; Sun, 21 Oct 2018 14:02:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 5ED10870EA for ; Sun, 21 Oct 2018 14:02:04 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 193-v6so7727373wme.3 for ; Sun, 21 Oct 2018 07:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/jP+gz5FpPAmMlhIhCOxEgt3/YLzppHPavDmghsDZD0=; b=cLgVN2s+CH0K6+DvOBk5YQ/4ajbcV5bkGQcYt1EcsyzvJoXsEvxovyPBm7Tpl9hahK fX1LnfCoiyDunX2Be9pjWas/G2wH4XMTkfxP5P68eXPV3u/3lY9jxtQv8LIeK/AP6BTB EZuizArHjkebq4aJ3SUi9iy4BqFlpi9ztXB3SPGDAnDmSCMpTWhFlkJlHifZ87hnvapR UoQvVVYcBQxa/gzJHdCPbCAAFeqSnZqq4kkj0iGeIOqU+5d7mXvnDhMQLXw9s623yR9Y WjenRuGA/ot1zqmtmuf5dew/GESQubCn1hFOE/kT6+DdDUGbVwVhqVkgYN/eYP90kpyA 65Kw== 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; bh=/jP+gz5FpPAmMlhIhCOxEgt3/YLzppHPavDmghsDZD0=; b=EiTqeMpjikZ2MDVdT+PRJpg6aNnJIqxHPGOuLPWn9VPiG1Pi9XFyrqiOy6VFtoqCzC oRb+6mLMNCdwDbZNSmzakS8LSITlB7JENkNyhbx4H/KL5lZZAMXBobGtHOvL4YoK39WZ C2AOngFwXQri771FcqqIqOtrI0wdDJWZfghkpnVjZTST3xYzmDssCYKIXM1vBCKs6m11 Xyb1anFv2oj2X62T851z9zC49RsvwEbs137bwl7rO4QrI2JoQwrXjrAcSPfpFMuHsXo7 hUhaGx7kzGvUIQyMMfYuGE5P4nACjI4IaEYcXQ8EAiiA6yEHdrSCnX+XcecGz5xqBVfN BWIw== X-Gm-Message-State: ABuFfoiaTQGSDQKeHeUm+w6fwOPFwZPjY+q6thCS5/z9UZC3ER5u8NIr IA3J17u1DC3rFDItNNhko5R2IJc4o+o= X-Google-Smtp-Source: ACcGV63fVgxtr4vYJ1T0P4iDBFtKmMnamsoXzJyTNoTssCy+r0Jwqh9pn3nMOxAs6JyZh8IppddaUw== X-Received: by 2002:a1c:9a4a:: with SMTP id c71-v6mr12031091wme.71.1540130522350; Sun, 21 Oct 2018 07:02:02 -0700 (PDT) Received: from tait.lan.virginwifi.ie ([31.185.52.13]) by smtp.gmail.com with ESMTPSA id 63-v6sm7427946wmj.39.2018.10.21.07.02.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Oct 2018 07:02:01 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Sun, 21 Oct 2018 15:00:59 +0100 Message-Id: <20181021140100.19155-2-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181021140100.19155-1-mark.corbin@embecosm.com> References: <20181021140100.19155-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v3 2/3] configs/qemu: add qemu_riscv32_virt_defconfig 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: Mark Corbin MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add RISC-V 32-bit defconfig for QEMU virt machine. Tested with QEMU 2.12.1 Signed-off-by: Mark Corbin Tested-by: Matt Weber --- board/qemu/riscv32-virt/linux.config | 23 +++++++++++++++++++++++ board/qemu/riscv32-virt/readme.txt | 7 +++++++ configs/qemu_riscv32_virt_defconfig | 24 ++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 board/qemu/riscv32-virt/linux.config create mode 100644 board/qemu/riscv32-virt/readme.txt create mode 100644 configs/qemu_riscv32_virt_defconfig diff --git a/board/qemu/riscv32-virt/linux.config b/board/qemu/riscv32-virt/linux.config new file mode 100644 index 0000000000..c25583f768 --- /dev/null +++ b/board/qemu/riscv32-virt/linux.config @@ -0,0 +1,23 @@ +CONFIG_ARCH_RV32I=y +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PCI=y +CONFIG_SYSVIPC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_WIRELESS is not set +CONFIG_VIRTIO_BLK=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +# CONFIG_ETHERNET is not set +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_VIRT_DRIVERS=y +CONFIG_VIRTIO_MMIO=y +CONFIG_EXT2_FS=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y diff --git a/board/qemu/riscv32-virt/readme.txt b/board/qemu/riscv32-virt/readme.txt new file mode 100644 index 0000000000..2da99580e5 --- /dev/null +++ b/board/qemu/riscv32-virt/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-riscv32 -M virt -kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.1 diff --git a/configs/qemu_riscv32_virt_defconfig b/configs/qemu_riscv32_virt_defconfig new file mode 100644 index 0000000000..aec85e4639 --- /dev/null +++ b/configs/qemu_riscv32_virt_defconfig @@ -0,0 +1,24 @@ +# Architecture +BR2_riscv=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Linux headers same as kernel, a 4.15 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="fe92d7905c6ea0ebeabeb725b8040754ede7c220" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv32-virt/linux.config" + +# Bootloader +BR2_TARGET_RISCV_PK=y