Skip to contentSkip to conversation

Support for building on RISCV

PATCH In review [email protected] 4 participants 13 messages Nov 12, 2022 – Nov 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Support for building on RISCV

From: Chen Pei <[email protected]>

I try to use yocto on RISCV platform.

---
 meta/conf/machine-sdk/riscv64.conf | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 meta/conf/machine-sdk/riscv64.conf
meta/conf/machine-sdk/riscv64.conf new file +3 -0
new file mode 100644
index 0000000000..155c195d7d
@@ -0,0 +1,3 @@
+SDK_ARCH = "riscv64"
+ABIEXTENSION:class-nativesdk = ""
+
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 Support for building on RISCV

From: Chen Pei <[email protected]>

---
 meta/recipes-devtools/meson/meson_0.64.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/meson/meson_0.64.0.bb +2 -0
index 84c3c84515..c8ef8a23c5 100644
@@ -67,6 +67,8 @@ def generate_native_link_template(d):
         loader = 'ld-linux-aarch64.so.1'
     elif 'ppc64le' in build_arch:
         loader = 'ld64.so.2'
+    elif 'riscv64' in build_arch:
+        loader = 'ld-linux-riscv64-lp64d.so.1'
 
     if loader:
         val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader]
Signature · 1 line
2.25.1
#2 lore raw

Looks ok to me

Quoted 38 lines · On Sat, Nov 12, 2022 at 1:13 AM cp0613 <[email protected]> wrote:

From: Chen Pei <[email protected]>

---
 meta/recipes-devtools/meson/meson_0.64.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/meson/meson_0.64.0.bb +2 -0
index 84c3c84515..c8ef8a23c5 100644
@@ -67,6 +67,8 @@ def generate_native_link_template(d):
         loader = 'ld-linux-aarch64.so.1'
     elif 'ppc64le' in build_arch:
         loader = 'ld64.so.2'
+    elif 'riscv64' in build_arch:
+        loader = 'ld-linux-riscv64-lp64d.so.1'
 
     if loader:
         val +=

['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader]
--
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#173148):
https://lists.openembedded.org/g/openembedded-core/message/173148
Mute This Topic: https://lists.openembedded.org/mt/94977045/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
In reply to [email protected]

Can you resend these with better commit messages?

“Support for building on RISCV” doesn’t explain what is happening here.

“machine-sdk: add configuration for riscv64” does.

Ross

Quoted 33 lines · On 12 Nov 2022, at 09:12, cp0613 via lists.openembedded.org…

From: Chen Pei <[email protected]>

I try to use yocto on RISCV platform.

---
meta/conf/machine-sdk/riscv64.conf | 3 +++

1 file changed, 3 insertions(+)

create mode 100644 meta/conf/machine-sdk/riscv64.conf

meta/conf/machine-sdk/riscv64.conf new file +3 -0
new file mode 100644
index 0000000000..155c195d7d
@@ -0,0 +1,3 @@
+SDK_ARCH = "riscv64"
+ABIEXTENSION:class-nativesdk = ""
+
Signature · 10 lines
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#173147): https://lists.openembedded.org/g/openembedded-core/message/173147
Mute This Topic: https://lists.openembedded.org/mt/94977043/6875888
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
#4 lore raw

PATCH v2 1/2 Support bitbake compilation when the host is a RISCV platform

From: Chen Pei <[email protected]>

I have a RISCV board running Ubuntu, and then clone the bitbake, meta-oe... to compile, just like using yocto in ARM board, so I need to add machine-sdk:riscv64 to support it.

---
 meta/conf/machine-sdk/riscv64.conf | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 meta/conf/machine-sdk/riscv64.conf
meta/conf/machine-sdk/riscv64.conf new file +3 -0
new file mode 100644
index 0000000000..155c195d7d
@@ -0,0 +1,3 @@
+SDK_ARCH = "riscv64"
+ABIEXTENSION:class-nativesdk = ""
+
Signature · 1 line
2.25.1
#5 lore raw

Re: [OE-core] [meta-oe] [PATCH V2 1/2] Support bitbake compilation when the host is a RISCV platform

This is not what the commit actually contains. The commit adds a riscv64 definition for a SDK host machine, and so the commit message should say that.

"machine-sdk: add a risv64 definition"

Alex

Quoted 33 lines · On Tue, 15 Nov 2022 at 13:05, cp0613 <[email protected]> wrote:

From: Chen Pei <[email protected]>

I have a RISCV board running Ubuntu, and then clone the bitbake, meta-oe... to compile, just like using yocto in ARM board, so I need to add machine-sdk:riscv64 to support it.

---
 meta/conf/machine-sdk/riscv64.conf | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 meta/conf/machine-sdk/riscv64.conf
meta/conf/machine-sdk/riscv64.conf new file +3 -1
new file mode 100644
index 0000000000..155c195d7d
@@ -0,0 +1,3 @@
+SDK_ARCH = "riscv64"
+ABIEXTENSION:class-nativesdk = ""
+
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#173269): https://lists.openembedded.org/g/openembedded-core/message/173269
Mute This Topic: https://lists.openembedded.org/mt/95040940/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#6 lore raw

Re: [meta-oe] [PATCH V2 1/2] Support bitbake compilation when the host is a RISCV platform

Thanks for the reminder, it seems that my description is not accurate enough.

#7 lore raw

PATCH v2 2/2 Support bitbake compilation when the host is a RISCV platform

In reply to Ross Burton

From: Chen Pei <[email protected]>

meson should add build_arch:riscv64 to support bitbake on RISCV platform

---
 meta/recipes-devtools/meson/meson_0.64.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/meson/meson_0.64.0.bb +2 -0
index 84c3c84515..c8ef8a23c5 100644
@@ -67,6 +67,8 @@ def generate_native_link_template(d):
         loader = 'ld-linux-aarch64.so.1'
     elif 'ppc64le' in build_arch:
         loader = 'ld64.so.2'
+    elif 'riscv64' in build_arch:
+        loader = 'ld-linux-riscv64-lp64d.so.1'
 
     if loader:
         val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader]
Signature · 1 line
2.25.1
#8 lore raw

Re: [OE-core] [meta-oe] [PATCH V2 2/2] Support bitbake compilation when the host is a RISCV platform

Quoted 4 lines · On Tue, 15 Nov 2022 at 13:07, cp0613 <[email protected]> wrote:

From: Chen Pei <[email protected]>

meson should add build_arch:riscv64 to support bitbake on RISCV platform

The commit title is "Support bitbake compilation when the host is a RISCV platform"

Imagine someone reading the commit log; will that title help them understand that this is a meson fix, or what 'support' actually means?

It should be "meson: set dynamic-linker for riscv64 targets"

Alex

author
#9 lore raw

Re: [meta-oe] [PATCH V2 2/2] Support bitbake compilation when the host is a RISCV platform

thanks, i see what you mean.

#11 lore raw

PATCH v3 1/2 machine-sdk: add a risv64 definition

In reply to Ross Burton

From: Chen Pei <[email protected]>

---
 meta/conf/machine-sdk/riscv64.conf | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 meta/conf/machine-sdk/riscv64.conf
meta/conf/machine-sdk/riscv64.conf new file +3 -0
new file mode 100644
index 0000000000..155c195d7d
@@ -0,0 +1,3 @@
+SDK_ARCH = "riscv64"
+ABIEXTENSION:class-nativesdk = ""
+
Signature · 1 line
2.25.1
#12 lore raw

PATCH v3 2/2 meson: set dynamic-linker for riscv64 targets

In reply to Ross Burton

From: Chen Pei <[email protected]>

---
 meta/recipes-devtools/meson/meson_0.64.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/meson/meson_0.64.0.bb +2 -0
index 84c3c84515..c8ef8a23c5 100644
@@ -67,6 +67,8 @@ def generate_native_link_template(d):
         loader = 'ld-linux-aarch64.so.1'
     elif 'ppc64le' in build_arch:
         loader = 'ld64.so.2'
+    elif 'riscv64' in build_arch:
+        loader = 'ld-linux-riscv64-lp64d.so.1'
 
     if loader:
         val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader]
Signature · 1 line
2.25.1