All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Corbin <mark.corbin@embecosm.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 6/6] configs/qemu: add qemu_riscv64_virt_defconfig
Date: Wed, 12 Sep 2018 11:22:56 +0100	[thread overview]
Message-ID: <20180912102256.3164-7-mark.corbin@embecosm.com> (raw)
In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com>

Add RISC-V 64-bit defconfig for QEMU virt machine.

Tested with QEMU 2.12.1

Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
---
Changes v1 -> v2:
  - updated DEVELOPERS file (Thomas P)
  - removed typo from readme.txt and updated text to remove BBL
    instructions now that it has been integrated as a package
    (Thomas P)
  - selected a specific kernel commit rather than a branch
    (Thomas P)
  - removed explicit selection of BR2_BINUTILS_VERSION_2_30_X
    (Thomas P)
  - added selection of riscv-pk package
---
 DEVELOPERS                           |  2 ++
 board/qemu/riscv64-virt/linux.config | 23 +++++++++++++++++++++++
 board/qemu/riscv64-virt/readme.txt   |  7 +++++++
 configs/qemu_riscv64_virt_defconfig  | 24 ++++++++++++++++++++++++
 4 files changed, 56 insertions(+)
 create mode 100644 board/qemu/riscv64-virt/linux.config
 create mode 100644 board/qemu/riscv64-virt/readme.txt
 create mode 100644 configs/qemu_riscv64_virt_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 4d6c599aea..afd24853c6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1289,7 +1289,9 @@ F:	package/ratpoison/
 N:	Mark Corbin <mark.corbin@embecosm.com>
 F:	arch/arch.mk.riscv
 F:	arch/Config.in.riscv
+F:	board/qemu/riscv64-virt/
 F:	boot/riscv-pk/
+F:	configs/qemu_riscv64_virt_defconfig
 
 N:	Markos Chandras <markos.chandras@imgtec.com>
 F:	package/harfbuzz/
diff --git a/board/qemu/riscv64-virt/linux.config b/board/qemu/riscv64-virt/linux.config
new file mode 100644
index 0000000000..d09e8b3bb1
--- /dev/null
+++ b/board/qemu/riscv64-virt/linux.config
@@ -0,0 +1,23 @@
+CONFIG_ARCH_RV64I=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/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
new file mode 100644
index 0000000000..9f6e35c867
--- /dev/null
+++ b/board/qemu/riscv64-virt/readme.txt
@@ -0,0 +1,7 @@
+Run the emulation with:
+
+  qemu-system-riscv64 -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_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
new file mode 100644
index 0000000000..59343ee98f
--- /dev/null
+++ b/configs/qemu_riscv64_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/riscv64-virt/linux.config"
+
+# Bootloader
+BR2_TARGET_RISCV_PK=y
-- 
2.17.1

  parent reply	other threads:[~2018-09-12 10:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 10:22 [Buildroot] [PATCH v2 0/6] Add RISC-V 64-bit architecture support Mark Corbin
2018-09-12 10:22 ` [Buildroot] [PATCH v2 1/6] linux: add hash file Mark Corbin
2018-09-23 19:21   ` Thomas Petazzoni
2018-09-23 19:39     ` Fabio Estevam
2018-09-12 10:22 ` [Buildroot] [PATCH v2 2/6] package/linux-headers: add support for custom headers Mark Corbin
2018-09-12 15:23   ` Thomas Petazzoni
2018-09-23 20:12   ` Thomas Petazzoni
2018-09-12 10:22 ` [Buildroot] [PATCH v2 3/6] arch: allow GCC target options to be optionally overwritten Mark Corbin
2018-09-23 20:33   ` Thomas Petazzoni
2018-09-12 10:22 ` [Buildroot] [PATCH v2 4/6] arch: add support for RISC-V 64-bit (riscv64) architecture Mark Corbin
2018-09-12 15:21   ` Thomas Petazzoni
2018-09-25 20:06   ` Thomas Petazzoni
2018-09-12 10:22 ` [Buildroot] [PATCH v2 5/6] boot/riscv-pk: add bootloader for RISC-V architecture Mark Corbin
2018-09-25 20:08   ` Thomas Petazzoni
2018-09-12 10:22 ` Mark Corbin [this message]
2018-09-25 20:10   ` [Buildroot] [PATCH v2 6/6] configs/qemu: add qemu_riscv64_virt_defconfig Thomas Petazzoni
2018-09-12 15:18 ` [Buildroot] [PATCH v2 0/6] Add RISC-V 64-bit architecture support Thomas Petazzoni
2018-09-12 16:14   ` Mark Corbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180912102256.3164-7-mark.corbin@embecosm.com \
    --to=mark.corbin@embecosm.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.