Re: Linux booting issue with edk2 uefi on riscv64 qemu

Palanivel Duraisamy

Hi Sunil,

I followed the given instructions in the document.
I am getting UEFI shell prompt.
The document says the following commands(step 6) need to be run on uefi shell.
FS0 has the linux-riscv64.elf file.

embeddedramdisk 4f2f3d7b-35ef-411b-9d26-e76ecacbaf8b
map -r

The "embbedramdisk" command in my setup fails.
I think this command is missing and some modifications in EDK2 are needed to add this command.

I am ok with "virt" machine type.

From: Sunil V L <sunilvl@...>
Sent: 11 January 2023 20:55
To: <>; Palanivel Duraisamy <Palanivel.d@...>
Subject: Re: [edk2-discuss] Linux booting issue with edk2 uefi on riscv64 qemu

Hi Palanivel,

Could you follow the instructions at

I am not the maintainer of this SoC. But let me know if you see any
issues. I will try to help.

Having said that, there is a series I am working on to support qemu virt
machine which is not yet merged. If you are fine with "virt" machine
instead of U540, let me know. It has latest design and supports disks
similar to other architectures.


On Mon, Jan 09, 2023 at 11:39:38PM -0800, Palanivel Duraisamy wrote:

I am trying to boot Linux Kernel with statically linked initramfs on QEMU-riscv64 target.
I followed the steps provided in the link "".
Built firmware for u540 board using the command "build -a RISCV64 -p Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc -t GCC5".
Ran the command "qemu-system-riscv64 -cpu sifive-u54 -machine sifive_u -bios U540.fd" to boot Linux.
I am getting uefi shell prompt. The uefi map commands gives "map: No mapping found." error.

I would like to know the procedure to bring up Linux with UEFI firmware.



Join { to automatically receive all group messages.