Skip to contentSkip to conversation

kernel-fitimage: support RISC-V

PATCH Superseded Michael Scott 3 participants 7 messages Apr 12, 2019 – Apr 13, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitimage: support RISC-V

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-fitimage.bbclass +2 -0
index 2517d75746..2820ff9689 100644
@@ -10,6 +10,8 @@ python __anonymous () {
         uarch = d.getVar("UBOOT_ARCH")
         if uarch == "arm64":
             replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"
         elif uarch == "mips":
             replacementtype = "vmlinuz.bin"
         elif uarch == "x86":
Signature · 1 line
2.21.0
#1 lore raw
Quoted 19 lines · Michael Scott

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-fitimage.bbclass +0 -0
index 2517d75746..2820ff9689 100644

meta/classes/kernel-fitimage.bbclass python __anonymous () { · line 14

Quoted 5 lines
meta/classes/kernel-fitimage.bbclass +2 -0
@@ -10,6 +10,8 @@ python __anonymous () {
         uarch = d.getVar("UBOOT_ARCH")
         if uarch == "arm64":
             replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"

Make it or condition along with arm64 check

Quoted 13 lines
meta/classes/kernel-fitimage.bbclass +0 -1
         elif uarch == "mips":
             replacementtype = "vmlinuz.bin"
         elif uarch == "x86":
--

2.21.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 31 lines · Khem Raj

On Thu, Apr 11, 2019 at 10:46 PM Michael Scott <[email protected] <mailto:[email protected]>> wrote:

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

<mailto:[email protected]>>
---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 2517d75746..2820ff9689 100644
--- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass @@ -10,6 +10,8 @@ python __anonymous () { uarch = d.getVar("UBOOT_ARCH") if uarch == "arm64":
             replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"

Quoted 1 line

Make it or condition along with arm64 check

Sure, sending v2.

Quoted 15 lines

             elif uarch == "mips":
                 replacementtype = "vmlinuz.bin"
             elif uarch == "x86":
    -- 
    2.21.0

    -- 
    _______________________________________________
    Openembedded-core mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 5 lines
Michael Scott
Embedded Software Engineer at Foundries.io
"microPlatforms™ for Connected Products"
E: [email protected]
W: https://www.foundries.io
#3 lore raw
In reply to Michael Scott
Quoted 8 lines · Michael Scott

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

Do you mind sharing how you tested this? I would be interested in trying this as well.

Alistair

Quoted 27 lines
---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-fitimage.bbclass +2 -1
index 2517d75746..2820ff9689 100644
@@ -10,6 +10,8 @@ python __anonymous () {
         uarch = d.getVar("UBOOT_ARCH")
         if uarch == "arm64":
             replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"
         elif uarch == "mips":
             replacementtype = "vmlinuz.bin"
         elif uarch == "x86":
--

2.21.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
Quoted 10 lines · Alistair Francis
Quoted 7 lines · Michael Scott

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

Do you mind sharing how you tested this? I would be interested in trying this as well.

The current OE-based manifest for the Foundries.io Linux microPlatform is found here (v42):
https://github.com/foundriesio/lmp-manifest

However, I think you're interested in seeing the opensbi/u-boot/fit-image work for qemuriscv64, and that won't land until v43 (along with kernel 5.0.6 update).

It should be ready in a few days.  I can send you a private ping then, if you'd like.

The documentation is here: https://docs.foundries.io/latest/reference/linux-building.html

- Mike

Quoted 29 lines

Alistair

Quoted 26 lines
---
  meta/classes/kernel-fitimage.bbclass | 2 ++
  1 file changed, 2 insertions(+)
meta/classes/kernel-fitimage.bbclass +2 -1
index 2517d75746..2820ff9689 100644
@@ -10,6 +10,8 @@ python __anonymous () {
          uarch = d.getVar("UBOOT_ARCH")
          if uarch == "arm64":
              replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"
          elif uarch == "mips":
              replacementtype = "vmlinuz.bin"
          elif uarch == "x86":
--

2.21.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 5 lines
Michael Scott
Embedded Software Engineer at Foundries.io
"microPlatforms™ for Connected Products"
E: [email protected]
W: https://www.foundries.io
#5 lore raw
Quoted 17 lines · Michael Scott
Quoted 10 lines · Alistair Francis
Quoted 7 lines · Michael Scott

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

Do you mind sharing how you tested this? I would be interested in trying this as well.

The current OE-based manifest for the Foundries.io Linux microPlatform is found here (v42):
https://github.com/foundriesio/lmp-manifest

Quoted 6 lines

However, I think you're interested in seeing the opensbi/u-boot/fit-image work for qemuriscv64, and that won't land until v43 (along with kernel 5.0.6 update).

It should be ready in a few days. I can send you a private ping then, if you'd like.

If you wouldn't mind that would be great! I'm interested in adding FIT image OpenSBI -> u-boot -> Linux boot support to meta-riscv.

Alistair

Quoted 43 lines

The documentation is here:
https://docs.foundries.io/latest/reference/linux-building.html

- Mike

Quoted 24 lines

Alistair

Quoted 21 lines
---
  meta/classes/kernel-fitimage.bbclass | 2 ++
  1 file changed, 2 insertions(+)
meta/classes/kernel-fitimage.bbclass +2 -1
index 2517d75746..2820ff9689 100644
@@ -10,6 +10,8 @@ python __anonymous () {
          uarch = d.getVar("UBOOT_ARCH")
          if uarch == "arm64":
              replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"
          elif uarch == "mips":
              replacementtype = "vmlinuz.bin"
          elif uarch == "x86":
--

2.21.0

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
Michael Scott
Embedded Software Engineer at Foundries.io
"microPlatforms™ for Connected Products"
E: [email protected]
W: https://www.foundries.io

#6 lore raw
Quoted 23 lines · Alistair Francis
Quoted 4 lines · Michael Scott
Quoted 1 line · Alistair Francis

On Thu, Apr 11, 2019 at 10:46 PM Michael Scott <[email protected]>

Quoted 17 lines · wrote:
Quoted 9 lines
Quoted 7 lines

Support RISC-V kernel image, using the "Image" target.

This change allows RISC-V support for fitImage via the following
flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb).

This was tested using QEMU RISC-V 64-bit.

Do you mind sharing how you tested this? I would be interested in trying this as well.

The current OE-based manifest for the Foundries.io Linux microPlatform is found here (v42):
https://github.com/foundriesio/lmp-manifest

However, I think you're interested in seeing the opensbi/u-boot/fit-image work for qemuriscv64, and that won't land until v43 (along with kernel 5.0.6 update).

Quoted 6 lines
Quoted 2 lines

It should be ready in a few days. I can send you a private ping then, if you'd like.

If you wouldn't mind that would be great! I'm interested in adding FIT image OpenSBI -> u-boot -> Linux boot support to meta-riscv.

Ah, in that case it's fairly easy. We're using master branch meta-riscv with this PR: https://github.com/foundriesio/meta-lmp/pull/27

- Mike

Quoted 47 lines

Alistair

Quoted 7 lines

The documentation is here:
https://docs.foundries.io/latest/reference/linux-building.html

- Mike

Quoted 1 line
Quoted 8 lines
Quoted 8 lines

Alistair

Review

Quoted 6 lines
---
  meta/classes/kernel-fitimage.bbclass | 2 ++
  1 file changed, 2 insertions(+)
(quoted diff) +0 -0

b/meta/classes/kernel-fitimage.bbclass

Quoted 28 lines
Quoted 15 lines
Quoted 15 lines

index 2517d75746..2820ff9689 100644

meta/classes/kernel-fitimage.bbclass +2 -1
@@ -10,6 +10,8 @@ python __anonymous () {
          uarch = d.getVar("UBOOT_ARCH")
          if uarch == "arm64":
              replacementtype = "Image"
+        elif uarch == "riscv":
+            replacementtype = "Image"
          elif uarch == "mips":
              replacementtype = "vmlinuz.bin"
          elif uarch == "x86":
--

2.21.0

Quoted 5 lines
Quoted 5 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
Michael Scott
Embedded Software Engineer at Foundries.io
"microPlatforms™ for Connected Products"
E: [email protected]
W: https://www.foundries.io