From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/9] package/elf2flt: add RISC-V support
Date: Sat, 17 Jul 2021 17:54:25 +0200 [thread overview]
Message-ID: <20210717155425.GV12203@scaer> (raw)
In-Reply-To: <20210715004843.337268-3-damien.lemoal@wdc.com>
Damien, All,
On 2021-07-15 09:48 +0900, Damien Le Moal spake thusly:
> From: Christoph Hellwig <hch@lst.de>
>
> Enable selecting elf2flt for RISC-V no MMU builds and add support for
> it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
> .../0004-elf2flt-add-riscv-support.patch | 293 ++++++++++++++++++
> package/elf2flt/Config.in.host | 2 +-
> 2 files changed, 294 insertions(+), 1 deletion(-)
> create mode 100644 package/elf2flt/0004-elf2flt-add-riscv-support.patch
>
> diff --git a/package/elf2flt/0004-elf2flt-add-riscv-support.patch b/package/elf2flt/0004-elf2flt-add-riscv-support.patch
> new file mode 100644
> index 0000000000..4a0bc6e4fa
> --- /dev/null
> +++ b/package/elf2flt/0004-elf2flt-add-riscv-support.patch
> @@ -0,0 +1,293 @@
> +From d096b496525e487b356ac180a7168c18703c1c43 Mon Sep 17 00:00:00 2001
> +From: Christoph Hellwig <hch@lst.de>
> +Date: Wed, 9 Sep 2020 17:31:33 +0900
> +Subject: [PATCH] elf2flt: add riscv support
> +
> +We need a new linker script - riscv has a global_pointer and is
> +very picky about some section ordering.
> +
> +Signed-off-by: Christoph Hellwig <hch@lst.de>
> +Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
You should add a reference to the upstream PR:
https://github.com/uclinux-dev/elf2flt/pull/19
> +---
> + Makefile.in | 4 +-
> + elf2flt.c | 22 +++++
> + riscv64-elf2flt.ld | 198 +++++++++++++++++++++++++++++++++++++++++++++
> + 3 files changed, 223 insertions(+), 1 deletion(-)
> + create mode 100644 riscv64-elf2flt.ld
> +
> +diff --git a/Makefile.in b/Makefile.in
> +index 0529c7f..121a2a7 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -44,7 +44,9 @@ endif
> + LDFILE= elf2flt.ld
> + ifeq ($(strip $(CPU)),e1)
> + SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld
> +-else
> ++else ifeq ($(strip $(CPU)),riscv64)
> ++SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld
Here: this looks like it really is specific to riscv64 only, and would
not add support for riscv32...
> ++else
> + SRC_LDFILE= elf2flt.ld
> + endif
> +
> +diff --git a/elf2flt.c b/elf2flt.c
> +index 3bcf4fe..0adba12 100644
> +--- a/elf2flt.c
> ++++ b/elf2flt.c
> +@@ -81,6 +81,8 @@ const char *elf2flt_progname;
> + #include <elf/v850.h>
> + #elif defined(TARGET_xtensa)
> + #include <elf/xtensa.h>
> ++#elif defined(TARGET_riscv64)
> ++#include <elf/riscv.h>
Ditto.
> + #endif
> +
> + #if defined(__MINGW32__)
> +@@ -123,6 +125,8 @@ const char *elf2flt_progname;
> + #define ARCH "nios2"
> + #elif defined(TARGET_xtensa)
> + #define ARCH "xtensa"
> ++#elif defined(TARGET_riscv64)
> ++#define ARCH "riscv64"
Ditto.
And: TAB between ARCH and its value. ;-)
(yes, I've read the review thread on github! ;-) )
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2021-07-17 15:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 0:48 [Buildroot] [PATCH v2 0/9] Add RISC-V NOMMU and Canaan K210 SoC support Damien Le Moal
2021-07-15 0:48 ` [Buildroot] [PATCH v2 1/9] arch/config: Make RISC-V MMU optional Damien Le Moal
2021-07-17 15:46 ` Yann E. MORIN
2021-07-15 0:48 ` [Buildroot] [PATCH v2 2/9] package/elf2flt: add RISC-V support Damien Le Moal
2021-07-17 15:54 ` Yann E. MORIN [this message]
2021-07-15 0:48 ` [Buildroot] [PATCH v2 3/9] package make: build RISC-V nommu builds as linux Damien Le Moal
2021-07-15 4:45 ` Alistair Francis
2021-07-15 0:48 ` [Buildroot] [PATCH v2 4/9] board: Add Sipeed MAIX-bit support Damien Le Moal
2021-07-23 22:25 ` Arnout Vandecappelle
2021-07-23 22:35 ` Thomas Petazzoni
2021-07-23 22:43 ` Damien Le Moal
2021-07-24 14:56 ` Arnout Vandecappelle
2021-07-23 22:40 ` Damien Le Moal
2021-07-24 14:53 ` Arnout Vandecappelle
2021-07-15 0:48 ` [Buildroot] [PATCH v2 5/9] board: Add Sipeed MAIX-Go support Damien Le Moal
2021-07-15 0:48 ` [Buildroot] [PATCH v2 6/9] board: Add Sipeed MAIXDUINO support Damien Le Moal
2021-07-15 0:48 ` [Buildroot] [PATCH v2 7/9] board: Add Sipeed MAIX-Dock support Damien Le Moal
2021-07-15 0:48 ` [Buildroot] [PATCH v2 8/9] board: Add Canaan KD233 support Damien Le Moal
2021-07-15 0:48 ` [Buildroot] [PATCH v2 9/9] board: Document Canaan K210 based boards support Damien Le Moal
2021-07-23 22:25 ` [Buildroot] [PATCH v2 0/9] Add RISC-V NOMMU and Canaan K210 SoC support Arnout Vandecappelle
2021-07-23 22:40 ` Damien Le Moal
2021-08-28 13:48 ` Thomas Petazzoni
2021-08-29 22:44 ` Damien Le Moal
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=20210717155425.GV12203@scaer \
--to=yann.morin.1998@free.fr \
--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.