kernel-fitimage: support RISC-V
PATCH v2 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, 1 insertion(+), 1 deletion(-)
meta/classes/kernel-fitimage.bbclass +1 -1
@@ -8,7 +8,7 @@ python __anonymous () { d.setVar("DEPENDS", depends) uarch = d.getVar("UBOOT_ARCH") - if uarch == "arm64": + if uarch == "arm64" or uarch == "riscv": replacementtype = "Image" elif uarch == "mips": replacementtype = "vmlinuz.bin"
Signature · 1 line
2.21.0
Quoted 18 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.
Signed-off-by Michael Scott <[email protected]>--- meta/classes/kernel-fitimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/kernel-fitimage.bbclass +0
-0
meta/classes/kernel-fitimage.bbclass python __anonymous () { · line 11
Quoted 5 lines
meta/classes/kernel-fitimage.bbclass +1
-1@@ -8,7 +8,7 @@ python __anonymous () { d.setVar("DEPENDS", depends) uarch = d.getVar("UBOOT_ARCH") - if uarch == "arm64": + if uarch == "arm64" or uarch == "riscv":
I didn't see any response to this v2 patch. Is this approach acceptible? RISC-V should not attempt to use zImage for fitImage as it now stands.
Quoted 3 lines
meta/classes/kernel-fitimage.bbclass +0
-0replacementtype = "Image" elif uarch == "mips": replacementtype = "vmlinuz.bin"
Signature · 5 lines
Michael Scott Embedded Software Engineer at Foundries.io "microPlatforms™ for Connected Products" E: [email protected] W: https://www.foundries.io
Quoted 22 lines · Michael Scott
Quoted 21 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.
Signed-off-by Michael Scott <[email protected]>--- meta/classes/kernel-fitimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/kernel-fitimage.bbclass +0
-0@@ -8,7 +8,7 @@ python __anonymous () { d.setVar("DEPENDS", depends)
Quoted 7 lines
meta/classes/kernel-fitimage.bbclass python __anonymous () { · line 11
Quoted 3 lines
meta/classes/kernel-fitimage.bbclass +1
-1uarch = d.getVar("UBOOT_ARCH") - if uarch == "arm64": + if uarch == "arm64" or uarch == "riscv":I didn't see any response to this v2 patch. Is this approach acceptible? RISC-V should not attempt to use zImage for fitImage as it now stands.
I think the v1 patch was merged. I'd take a patch to tweak the code to the v2 version as it is slightly neater but its not essential.
Cheers,
Richard
Quoted 29 lines · Richard Purdie
Quoted 22 lines · Michael Scott
Quoted 21 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.
Signed-off-by Michael Scott <[email protected]>--- meta/classes/kernel-fitimage.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/kernel-fitimage.bbclass +0
-0@@ -8,7 +8,7 @@ python __anonymous () { d.setVar("DEPENDS", depends)Quoted 6 lines
meta/classes/kernel-fitimage.bbclass python __anonymous () { · line 11
Quoted 3 lines
meta/classes/kernel-fitimage.bbclass +1
-1uarch = d.getVar("UBOOT_ARCH") - if uarch == "arm64": + if uarch == "arm64" or uarch == "riscv":I didn't see any response to this v2 patch. Is this approach acceptible? RISC-V should not attempt to use zImage for fitImage as it now stands.
Quoted 6 lines
I think the v1 patch was merged. I'd take a patch to tweak the code to the v2 version as it is slightly neater but its not essential.
Cheers,
Richard
Thank you for pointing out that v1 got merged. I didn't realize there isn't a notification for when patches are merged and wasn't watching the warrior branches. I'll submit the tweak patch later this week.
- Mike
Quoted 1 line
Signature · 5 lines
Michael Scott Embedded Software Engineer at Foundries.io "microPlatforms™ for Connected Products" E: [email protected] W: https://www.foundries.io