All of lore.kernel.org
 help / color / mirror / Atom feed
* Risc-V, qemu, and initrd
@ 2018-06-21  6:11 Guenter Roeck
  2018-06-21  8:11 ` Atish Patra
  2018-06-21 14:30 ` Andreas Schwab
  0 siblings, 2 replies; 11+ messages in thread
From: Guenter Roeck @ 2018-06-21  6:11 UTC (permalink / raw)
  To: linux-riscv

Hi folks,

I tried to boot the latest Linux kernel with qemu from https://github.com/riscv/riscv-qemu.git,
branch qemu-2.13-for-upstream.

My command line is something like

     riscv64-softmmu/qemu-system-riscv64 -machine virt -m 512M -bios bbl -kernel vmlinux \
         -nographic -monitor none -initrd rootfs.cpio -append "rdinit=/sbin/init"

Unfortunately this doesn't work; the image crashes, complaining about a missing
root file system.

Loking into the kernel source, I found arch/riscv/kernel/setup.c:setup_initrd().
Debugging shows that initrd_start and initrd_end is set correctly in
drivers/of/fdt.c:early_init_dt_check_for_initrd(), but overwritten with the value
of __initramfs_start / __initramfs_size in setup_initrd(). This doesn't make
sense to me, since populate_rootfs() tries to populate the root file system
from both __initramfs_start and initrd_start.

Has anyone else noticed this problem ? Any idea what I need to do to load an
initrd with the -initrd option of qemu ?

Thanks,
Guenter

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

end of thread, other threads:[~2018-06-22 16:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21  6:11 Risc-V, qemu, and initrd Guenter Roeck
2018-06-21  8:11 ` Atish Patra
2018-06-21 14:30 ` Andreas Schwab
2018-06-21 14:48   ` Guenter Roeck
2018-06-21 14:52     ` Christoph Hellwig
2018-06-21 16:34       ` Guenter Roeck
2018-06-21 17:33       ` Guenter Roeck
2018-06-21 17:55         ` Christoph Hellwig
2018-06-21 22:08           ` Guenter Roeck
2018-06-22  5:38             ` Christoph Hellwig
2018-06-22 16:34               ` Guenter Roeck

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.