All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] Setting Defaults for RISCV64 Architecture
Date: Tue, 14 Aug 2018 14:03:05 +0200	[thread overview]
Message-ID: <20180814140305.0184f5a1@windsurf> (raw)
In-Reply-To: <862bfe2f-fc60-ead9-2b63-b6a0f23c59cd@embecosm.com>

Hello Mark,

On Tue, 14 Aug 2018 10:39:01 +0100, Mark Corbin wrote:

> I am working on adding RISCV64 support to Buildroot

Nice!

> and was wondering how best to set some of the defaults when the
> riscv64 architecture is selected.
> 
> The two issues that I currently have are that the version of binutils
> needs to be 2.30 (or greater) and that the kernel needs to be a custom
> version from the riscv git repo (the 4.17 mainline kernel doesn't
> appear to have full riscv support).
> 
> In both of these cases I could either:
> 
> a) Add some architecture specific options to the 'Config.in' files,
> i.e. packages/binutils/Config.in.host and linux/Config.in, to select
> the appropriate default versions/values .
> or
> b)? Set the appropriate variables in a board or architecture specific
> '_defconfig' file, e.g.
> ??? ??? BR2_BINUTILS_VERSION_2_30_X=y
> ??? ??? 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"
> 
> I think that I prefer option a) as option b) would require a specific
> config to be selected every time rather than just working by default
> when you set the Target Architecture.

Yes, in general (a) is preferred, as a defconfig is just an "example"
configuration, and nothing prevents a user from not using some existing
example configuration: he can instead start from scratch his
Buildroot configuration, and we should ensure that only valid
configurations can be created by the user.

For binutils, things are pretty easy, since
package/binutils/Config.in.host already hides/show some binutils
versions depending on the architecture. For example,
BR2_BINUTILS_VERSION_2_28_X is not visible on the ARC architecture.

For the Linux kernel itself, there isn't really a problem, as we allow
the user to select the Linux kernel version/source with lots of freedom
(arbitrary official version from kernel.org, arbitrary commit/tag from
a Git repository, arbitrary tarball, etc.).

However, there is a problem for the kernel headers. If the recently
released 4.18 kernel still doesn't have what's need for RISCV64, then I
guess we'll have to temporarily add a special Linux kernel headers
version in package/linux-headers/Config.in.host for RISCV64.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-08-14 12:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14  9:39 [Buildroot] Setting Defaults for RISCV64 Architecture Mark Corbin
2018-08-14 12:03 ` Thomas Petazzoni [this message]
2018-08-14 12:35   ` Mark Corbin
2018-08-14 13:05     ` 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=20180814140305.0184f5a1@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 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.