All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: GRUB loader support for RISC-V Linux
@ 2021-04-04 15:42 Atish Patra
  2021-04-07 15:48 ` Nikita Ermakov
  0 siblings, 1 reply; 9+ messages in thread
From: Atish Patra @ 2021-04-04 15:42 UTC (permalink / raw)
  To: Nikita Ermakov; +Cc: Heinrich Schuchardt, GRUB development mailing list

Hi Nikita,
Yes. It was discussed earlier that we should consolidate riscv & ARM64 implementation as the ARM64 has a very generic implementation. RISC-V should also use LOAD_FILE2 always.

However, I couldn’t get time to revise the patches. I am on leave until May. Is it possible to revise your patch series based on above suggestions ? You can takeover my patches if you want or just start from the scratch.

Sent from my iPhone

> On Apr 4, 2021, at 2:09 AM, Nikita Ermakov <arei@altlinux.org> wrote:
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-04-04 15:42 GRUB loader support for RISC-V Linux Atish Patra
@ 2021-04-07 15:48 ` Nikita Ermakov
  2021-04-08 15:26   ` Daniel Kiper
  0 siblings, 1 reply; 9+ messages in thread
From: Nikita Ermakov @ 2021-04-07 15:48 UTC (permalink / raw)
  To: Atish Patra; +Cc: Heinrich Schuchardt, GRUB development mailing list

Hi Atish,

Thank you for the answer.

On Sun, 4 Apr 2021 at 18:42, Atish Patra <Atish.Patra@wdc.com> wrote:
>
> Hi Nikita,
> Yes. It was discussed earlier that we should consolidate riscv & ARM64 implementation as the ARM64 has a very generic implementation. RISC-V should also use LOAD_FILE2 always.
>
> However, I couldn’t get time to revise the patches. I am on leave until May. Is it possible to revise your patch series based on above suggestions ? You can takeover my patches if you want or just start from the scratch.
>
Yes, I will try to implement these suggestions.

-- 
Thanks,
Nikita
B8 00 4C CD 21


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-04-07 15:48 ` Nikita Ermakov
@ 2021-04-08 15:26   ` Daniel Kiper
  2021-04-10  8:18     ` Nikita Ermakov
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Kiper @ 2021-04-08 15:26 UTC (permalink / raw)
  To: Nikita Ermakov
  Cc: Atish Patra, Heinrich Schuchardt, GRUB development mailing list

Hey,

On Wed, Apr 07, 2021 at 06:48:54PM +0300, Nikita Ermakov wrote:
> Hi Atish,
>
> Thank you for the answer.
>
> On Sun, 4 Apr 2021 at 18:42, Atish Patra <Atish.Patra@wdc.com> wrote:
> > Hi Nikita,
> > Yes. It was discussed earlier that we should consolidate riscv &
> > ARM64 implementation as the ARM64 has a very generic implementation.
> > RISC-V should also use LOAD_FILE2 always.

I was going to ask about it at some point. So, I am happy that you
brought this up guys.

> > However, I couldn’t get time to revise the patches. I am on leave
> > until May. Is it possible to revise your patch series based on above
> > suggestions ? You can takeover my patches if you want or just start
> > from the scratch.
>
> Yes, I will try to implement these suggestions.

May I ask you to take a look at [1] too? This patch set waits for review
but I think it is good starting point. Or at least reference point...

Daniel

[1] https://lists.gnu.org/archive/html/grub-devel/2020-10/msg00124.html


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-04-08 15:26   ` Daniel Kiper
@ 2021-04-10  8:18     ` Nikita Ermakov
  2021-05-19 15:26       ` Nikita Ermakov
  0 siblings, 1 reply; 9+ messages in thread
From: Nikita Ermakov @ 2021-04-10  8:18 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Atish Patra, Heinrich Schuchardt, GRUB development mailing list

Hei,

On Thu, 8 Apr 2021 at 18:26, Daniel Kiper <dkiper@net-space.pl> wrote:
>
> Hey,
>
> On Wed, Apr 07, 2021 at 06:48:54PM +0300, Nikita Ermakov wrote:
> > Hi Atish,
> >
> > Thank you for the answer.
> >
> > On Sun, 4 Apr 2021 at 18:42, Atish Patra <Atish.Patra@wdc.com> wrote:
> > > Hi Nikita,
> > > Yes. It was discussed earlier that we should consolidate riscv &
> > > ARM64 implementation as the ARM64 has a very generic implementation.
> > > RISC-V should also use LOAD_FILE2 always.
>
> I was going to ask about it at some point. So, I am happy that you
> brought this up guys.
>
> > > However, I couldn’t get time to revise the patches. I am on leave
> > > until May. Is it possible to revise your patch series based on above
> > > suggestions ? You can takeover my patches if you want or just start
> > > from the scratch.
> >
> > Yes, I will try to implement these suggestions.
>
> May I ask you to take a look at [1] too? This patch set waits for review
> but I think it is good starting point. Or at least reference point...
>
Sure!

> Daniel
>
> [1] https://lists.gnu.org/archive/html/grub-devel/2020-10/msg00124.html



-- 
Thanks,
Nikita
B8 00 4C CD 21


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-04-10  8:18     ` Nikita Ermakov
@ 2021-05-19 15:26       ` Nikita Ermakov
  2021-05-27 15:46         ` Daniel Kiper
  0 siblings, 1 reply; 9+ messages in thread
From: Nikita Ermakov @ 2021-05-19 15:26 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Ard Biesheuvel, Atish Patra, Heinrich Schuchardt,
	GRUB development mailing list

Hi!

I'm sorry for such a long delay.
I rebased Ard's patches to the current master branch and then rebased
Atish's patches on top of the Ard's patches. It almost worked, except
that load_file2 and device_path GUIDs were allocated on a stack and
therefore were overridden outside of the function scope. This [1]
commit fixes that.
The branch with the work could be found here [2].

I prepared a QEMU image with this GRUB for demonstration.
The QEMU image could be found here [3] (SHA1:
911270c583248c656b9a105910344b96e8c6ad02).
The default password for root is:
Login: root
Password: alt

For convenience one could use the OpenSBI+U-Boot payload for QEMU from
this RPM package [4].
$ rpm2cpio opensbi-firmware-generic-0.9-alt1.noarch.rpm | cpio -idv
./usr/share/opensbi/generic/firmware/fw_payload.bin
$ qemu-system-riscv64 -nographic -machine virt -bios
./usr/share/opensbi/generic/firmware/fw_payload.bin -m 2G -smp cpus=4
-drive file=regular-jeos-systemd-alpha20210519-riscv64.qcow2c,id=hd0
-device virtio-blk-device,drive=hd0 -netdev
user,id=eth0,hostfwd=tcp::6660-:22 -device
virtio-net-device,netdev=eth0

A little snippet from the Linux kernel booting:

Loading Linux vmlinuz ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services and installing virtual address map...
[    0.000000] Linux version 5.11.8-un-def-alt1.rv64
(builder@localhost.localdomain) (gcc-9 (GCC) 9.2.1 20190827 (ALT
9.2.1-alt3), GNU ld (GNU Binutils) 2.31.1.20181202) #1 SMP Thu Apr 8
12:07:41 UTC 2021
[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[    0.000000] efi: EFI v2.80 by Das U-Boot
[    0.000000] efi: RTPROP=0xfe72f020 SMBIOS=0xfe72b000 MEMRESERVE=0xdcb31020
[    0.000000] OF: fdt: Ignoring memory block 0x80000000 - 0x80020000
[    0.000000] OF: fdt: Ignoring memory range 0x80020000 - 0x80200000
[    0.000000] Initial ramdisk at: 0x(____ptrval____) (4009984 bytes)


[1] http://git.altlinux.org/people/arei/public/grub.git?p=grub.git;a=commit;h=cd03f6d285c91d39b819fe635c592602265ef6ce
[2] http://git.altlinux.org/people/arei/public/grub.git?p=grub.git;a=shortlog;h=refs/heads/wip-efi
[3] http://ftp.altlinux.org/pub/people/arei/images/grub-efi/regular-jeos-systemd-alpha20210519-riscv64.qcow2c
[4] http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-generic-0.9-alt1.noarch.rpm

On Sat, 10 Apr 2021 at 11:18, Nikita Ermakov <arei@altlinux.org> wrote:
>
> Hei,
>
> On Thu, 8 Apr 2021 at 18:26, Daniel Kiper <dkiper@net-space.pl> wrote:
> >
> > Hey,
> >
> > On Wed, Apr 07, 2021 at 06:48:54PM +0300, Nikita Ermakov wrote:
> > > Hi Atish,
> > >
> > > Thank you for the answer.
> > >
> > > On Sun, 4 Apr 2021 at 18:42, Atish Patra <Atish.Patra@wdc.com> wrote:
> > > > Hi Nikita,
> > > > Yes. It was discussed earlier that we should consolidate riscv &
> > > > ARM64 implementation as the ARM64 has a very generic implementation.
> > > > RISC-V should also use LOAD_FILE2 always.
> >
> > I was going to ask about it at some point. So, I am happy that you
> > brought this up guys.
> >
> > > > However, I couldn’t get time to revise the patches. I am on leave
> > > > until May. Is it possible to revise your patch series based on above
> > > > suggestions ? You can takeover my patches if you want or just start
> > > > from the scratch.
> > >
> > > Yes, I will try to implement these suggestions.
> >
> > May I ask you to take a look at [1] too? This patch set waits for review
> > but I think it is good starting point. Or at least reference point...
> >
> Sure!
>
> > Daniel
> >
> > [1] https://lists.gnu.org/archive/html/grub-devel/2020-10/msg00124.html
>

--
Thanks,
Nikita
B8 00 4C CD 21


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-05-19 15:26       ` Nikita Ermakov
@ 2021-05-27 15:46         ` Daniel Kiper
  2021-05-28 11:21           ` Nikita Ermakov
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Kiper @ 2021-05-27 15:46 UTC (permalink / raw)
  To: Nikita Ermakov
  Cc: Ard Biesheuvel, Atish Patra, Heinrich Schuchardt,
	GRUB development mailing list

Hi Nikita,

On Wed, May 19, 2021 at 06:26:42PM +0300, Nikita Ermakov wrote:
> Hi!
>
> I'm sorry for such a long delay.

No worries. We are still busy with the release...

> I rebased Ard's patches to the current master branch and then rebased
> Atish's patches on top of the Ard's patches. It almost worked, except
> that load_file2 and device_path GUIDs were allocated on a stack and
> therefore were overridden outside of the function scope. This [1]
> commit fixes that.
> The branch with the work could be found here [2].

Nice to hear that. May I ask you to post the patches to the grub-devel
and CC Ard, Atish, Heinrich, Leif and me?

Daniel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-05-27 15:46         ` Daniel Kiper
@ 2021-05-28 11:21           ` Nikita Ermakov
  0 siblings, 0 replies; 9+ messages in thread
From: Nikita Ermakov @ 2021-05-28 11:21 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Ard Biesheuvel, Atish Patra, Heinrich Schuchardt,
	GRUB development mailing list

Hi!

On Thu, 27 May 2021 at 18:46, Daniel Kiper <dkiper@net-space.pl> wrote:
>
> Hi Nikita,
>
> On Wed, May 19, 2021 at 06:26:42PM +0300, Nikita Ermakov wrote:
> > Hi!
> >
> > I'm sorry for such a long delay.
>
> No worries. We are still busy with the release...
>
> > I rebased Ard's patches to the current master branch and then rebased
> > Atish's patches on top of the Ard's patches. It almost worked, except
> > that load_file2 and device_path GUIDs were allocated on a stack and
> > therefore were overridden outside of the function scope. This [1]
> > commit fixes that.
> > The branch with the work could be found here [2].
>
> Nice to hear that. May I ask you to post the patches to the grub-devel
> and CC Ard, Atish, Heinrich, Leif and me?
>
Sure!

-- 
Thanks,
Nikita
B8 00 4C CD 21


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: GRUB loader support for RISC-V Linux
  2021-04-02 15:06 Heinrich Schuchardt
@ 2021-04-04  9:08 ` Nikita Ermakov
  0 siblings, 0 replies; 9+ messages in thread
From: Nikita Ermakov @ 2021-04-04  9:08 UTC (permalink / raw)
  To: Heinrich Schuchardt, Atish Patra; +Cc: GRUB development mailing list

Hello!

On Fri, 2 Apr 2021 at 18:06, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> I have seen these alternative patch series implementing launching Linux
> via the RISC-V EFI stub.
>
> Nikita Ermakov, 2021/03/24
> [PATCH 0/2] Linux loader for riscv64
> https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00343.html
>
> Atish Patra, 2020/04/26
> [PATCH RFC/RFT 0/3] Add grub loader support for RISC-V Linux
> https://lists.gnu.org/archive/html/grub-devel/2020-04/msg00203.html
>

I'm sorry, I overlooked the patch series by Atish and the discussion thread.
I guess the series by Atish is better than mine because it uses the
single loader (efi/linux.c) for arm and riscv.
Also, I didn't implement the suggestions from this thread:
https://lists.gnu.org/archive/html/grub-devel/2020-04/msg00203.html

-- 
Thanks,
Nikita
B8 00 4C CD 21


^ permalink raw reply	[flat|nested] 9+ messages in thread

* GRUB loader support for RISC-V Linux
@ 2021-04-02 15:06 Heinrich Schuchardt
  2021-04-04  9:08 ` Nikita Ermakov
  0 siblings, 1 reply; 9+ messages in thread
From: Heinrich Schuchardt @ 2021-04-02 15:06 UTC (permalink / raw)
  To: Atish Patra, Nikita Ermakov; +Cc: GRUB development mailing list

Hello Atish, hello Nikita,

I have seen these alternative patch series implementing launching Linux
via the RISC-V EFI stub.

Nikita Ermakov, 2021/03/24
[PATCH 0/2] Linux loader for riscv64
https://lists.gnu.org/archive/html/grub-devel/2021-03/msg00343.html

Atish Patra, 2020/04/26
[PATCH RFC/RFT 0/3] Add grub loader support for RISC-V Linux
https://lists.gnu.org/archive/html/grub-devel/2020-04/msg00203.html

Do you have git repositories from where the current version of the
respective series can be downloaded?

Do you have started to consolidate your work?

Best regards

Heinrich



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-28 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 15:42 GRUB loader support for RISC-V Linux Atish Patra
2021-04-07 15:48 ` Nikita Ermakov
2021-04-08 15:26   ` Daniel Kiper
2021-04-10  8:18     ` Nikita Ermakov
2021-05-19 15:26       ` Nikita Ermakov
2021-05-27 15:46         ` Daniel Kiper
2021-05-28 11:21           ` Nikita Ermakov
  -- strict thread matches above, loose matches on Subject: below --
2021-04-02 15:06 Heinrich Schuchardt
2021-04-04  9:08 ` Nikita Ermakov

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.