From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] configs/qemu: add qemu_riscv64_virt_defconfig
Date: Sun, 2 Sep 2018 21:47:55 +0200 [thread overview]
Message-ID: <20180902214755.139a1b23@windsurf> (raw)
In-Reply-To: <20180831143853.24340-1-mark.corbin@embecosm.com>
Hello Mark,
On Fri, 31 Aug 2018 15:38:53 +0100, Mark Corbin wrote:
> Add RISC-V 64-bit defconfig for QEMU virt machine.
>
> Tested with QEMU 2.12.1
Here you say 2.12.1, in the readme.txt file you say 2.12.92. I assume
one or the other has a typo :-)
> board/qemu/riscv64-virt/linux.config | 24 ++++++++++++++++++++++++
> board/qemu/riscv64-virt/readme.txt | 22 ++++++++++++++++++++++
> configs/qemu_riscv64_virt_defconfig | 24 ++++++++++++++++++++++++
> 3 files changed, 70 insertions(+)
Please add an entry in the DEVELOPERS file. When you will do a patch
series with the base RISC-V support:
- The patch introducing the RISC-V support should add an entry in the
DEVELOPERS file for you, the arch/Config.in.riscv file and other
files introduced by this first patch.
- The patch introducing the RISC-V qemu defconfig should add more
items to the DEVELOPERS file entry, to list the files related to
this defconfig.
> diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt
> new file mode 100644
> index 0000000000..be563c969e
> --- /dev/null
> +++ b/board/qemu/riscv64-virt/readme.txt
> @@ -0,0 +1,22 @@
> +Run the emulation with:
> +
> + qemu-system-riscv64 -M virt -kernel <path-to-bl>/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=<path-to-buildroot>/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 Buildroot generated vmlinux image will need to be combined with the Berkeley Boot Loader (BBL) as follows:
> +
> + export RISCV=<path-to-buildroot>/output/host
> + export PATH=$PATH:$RISCV/bin
> + git clone https://github.com/riscv/riscv-pk
> + cd riscv-pk
> + mkdir build
> + cd build
> + ../configure \
> + --host=riscv64-buildroot-linux-gnu \
> + --with-payload=<path-to-buildroot>/output/images/vmlinux
> + make
Then we want to create a package for the BBL, in boot/riscv-pk/. See
boot/boot-wrapper-aarch64/ for an example of bootloader wraps the
kernel image. It depends on the kernel build in Config.in:
config BR2_TARGET_BOOT_WRAPPER_AARCH64
bool "boot-wrapper-aarch64"
depends on BR2_aarch64
depends on BR2_LINUX_KERNEL
And then in the .mk file, we ensure the Linux kernel is built before:
BOOT_WRAPPER_AARCH64_DEPENDENCIES = linux
And we pass the path to the kernel tree (which it needs to get the
kernel image):
BOOT_WRAPPER_AARCH64_CONF_OPTS = \
--with-kernel-dir=$(LINUX_DIR) \
> +# 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="riscv-linux-4.15"
This is a branch, so its contents can change anytime. Please use a tag,
of if there's not tag, a full SHA1 designating a specific commit.
> +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv64-virt/linux.config"
> +
> +# Binutils configuration
> +BR2_BINUTILS_VERSION_2_30_X=y
This should not be needed, because you prevent using binutils 2.28 and
2.29 anyway.
Could you fix those comments, and send an updated version?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-09-02 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 14:38 [Buildroot] [PATCH 1/1] configs/qemu: add qemu_riscv64_virt_defconfig Mark Corbin
2018-08-31 19:01 ` Thomas Petazzoni
2018-09-02 15:09 ` Christopher McCrory
2018-09-04 11:06 ` Mark Corbin
2018-09-02 19:47 ` Thomas Petazzoni [this message]
2018-09-04 15:14 ` Mark Corbin
2018-09-04 19:57 ` Arnout Vandecappelle
2018-09-05 6:45 ` Thomas Petazzoni
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=20180902214755.139a1b23@windsurf \
--to=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox