[PATCH 1/1] add machine type name for riscv64

12 views
Skip to first unread message

Felix Moessbauer

unread,
Jan 31, 2023, 3:27:46 AM1/31/23
to efibootg...@googlegroups.com, christi...@siemens.com, daniel.bo...@siemens.com, Felix Moessbauer
By adding the machine type name, the generated efi binary for
riscv64 is suffixed with the corresponding efi machine name.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index d8f9d3a..90d70b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,7 @@ SET_ARCH(X86_64, x86_64*)
SET_ARCH(IA64, ia64*)
SET_ARCH(AARCH64, aarch64*)
SET_ARCH(ARM, arm*)
+SET_ARCH(RISCV64, riscv64*)

ARCH=$(echo $host | sed "s/\(-\).*$//")

@@ -103,6 +104,9 @@ AM_COND_IF(ARCH_AARCH64, [
AM_COND_IF(ARCH_ARM, [
MACHINE_TYPE_NAME=arm])

+AM_COND_IF(ARCH_RISCV64, [
+ MACHINE_TYPE_NAME=riscv64])
+
AC_SUBST([ARCH])
AC_SUBST([MACHINE_TYPE_NAME])
AM_CONDITIONAL([ARCH_IS_X86], [test "$ARCH" = "ia32" -o "$ARCH" = "x86_64"])
--
2.30.2

Jan Kiszka

unread,
Jan 31, 2023, 3:44:45 AM1/31/23
to Felix Moessbauer, efibootg...@googlegroups.com, christi...@siemens.com, daniel.bo...@siemens.com
On 31.01.23 09:27, Felix Moessbauer wrote:
> By adding the machine type name, the generated efi binary for
> riscv64 is suffixed with the corresponding efi machine name.
>

And did you successfully test both the bootloader as well as the UKI
stub on that arch?

Jan

> Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
> ---
> configure.ac | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index d8f9d3a..90d70b0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -87,6 +87,7 @@ SET_ARCH(X86_64, x86_64*)
> SET_ARCH(IA64, ia64*)
> SET_ARCH(AARCH64, aarch64*)
> SET_ARCH(ARM, arm*)
> +SET_ARCH(RISCV64, riscv64*)
>
> ARCH=$(echo $host | sed "s/\(-\).*$//")
>
> @@ -103,6 +104,9 @@ AM_COND_IF(ARCH_AARCH64, [
> AM_COND_IF(ARCH_ARM, [
> MACHINE_TYPE_NAME=arm])
>
> +AM_COND_IF(ARCH_RISCV64, [
> + MACHINE_TYPE_NAME=riscv64])
> +
> AC_SUBST([ARCH])
> AC_SUBST([MACHINE_TYPE_NAME])
> AM_CONDITIONAL([ARCH_IS_X86], [test "$ARCH" = "ia32" -o "$ARCH" = "x86_64"])

--
Siemens AG, Technology
Competence Center Embedded Linux

Moessbauer, Felix

unread,
Jan 31, 2023, 9:59:01 AM1/31/23
to Kiszka, Jan, efibootg...@googlegroups.com, Bovensiepen, Daniel (bovi), Storm, Christian
On Tue, 2023-01-31 at 09:44 +0100, Jan Kiszka wrote:
> On 31.01.23 09:27, Felix Moessbauer wrote:
> > By adding the machine type name, the generated efi binary for
> > riscv64 is suffixed with the corresponding efi machine name.
> >
>
> And did you successfully test both the bootloader as well as the UKI
> stub on that arch?

I successfully tested the stub on an u-boot 2022.04. The image was
assembled via a patched version of the cip-core EBG wic plugin.
The used hardware was a StarFive VisionFive2 board. Just the watchdog
had to be disabled as the JH7110 watchdog is not yet supported in EBG.

I did not test the UKI yet, but would assume that this works as well.
Testers welcome.

Felix

Jan Kiszka

unread,
Feb 1, 2023, 12:52:30 AM2/1/23
to Moessbauer, Felix, efibootg...@googlegroups.com, Bovensiepen, Daniel (bovi), Storm, Christian
On 31.01.23 15:58, Moessbauer, Felix wrote:
> On Tue, 2023-01-31 at 09:44 +0100, Jan Kiszka wrote:
>> On 31.01.23 09:27, Felix Moessbauer wrote:
>>> By adding the machine type name, the generated efi binary for
>>> riscv64 is suffixed with the corresponding efi machine name.
>>>
>>
>> And did you successfully test both the bootloader as well as the UKI
>> stub on that arch?
>
> I successfully tested the stub on an u-boot 2022.04. The image was
> assembled via a patched version of the cip-core EBG wic plugin.
> The used hardware was a StarFive VisionFive2 board. Just the watchdog
> had to be disabled as the JH7110 watchdog is not yet supported in EBG.

Watchdog on U-Boot-based platforms is generally a U-Boot topic.

>
> I did not test the UKI yet, but would assume that this works as well.
> Testers welcome.

We do UKI by default in isar-cip-core. Did you actually deviate from
that (unified-kernel=n)?

Jan

Moessbauer, Felix

unread,
Feb 1, 2023, 1:10:03 AM2/1/23
to Kiszka, Jan, efibootg...@googlegroups.com, Bovensiepen, Daniel (bovi), Storm, Christian
I also used the standard (non secure-boot) pattern from isar-cip-core.
My understanding was that we only use UKI for secure boot, but this is
apparently not the case.

By that, both workflows are tested and I can confirm that this works.

Felix

Jan Kiszka

unread,
Feb 1, 2023, 2:05:32 AM2/1/23
to Moessbauer, Felix, efibootg...@googlegroups.com, Bovensiepen, Daniel (bovi), Storm, Christian
Perfect.

Applied, thanks. CI will follow.
Reply all
Reply to author
Forward
0 new messages