qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to implement PCI


From: Frantisek Rysanek
Subject: Re: How to implement PCI
Date: Sat, 25 Dec 2021 09:16:57 +0100

Hello Sukreet,

you're telling the VM guest's kernel to look for an MMC device. E.g.
an SD card accessible via an SD/MMC controller chip, or an eMMC SSD.

And the kernel is telling you that there's no such device, but that
it has found an "MTD block" device.
MTDblock normally sounds like kernel's own sotfware abstraction of a
block device, on top of some physical dedicated RAM chips / RAM-based
device. I understand that NAND Flash based direct-attached devices
require an NFTL layer, which is a different animal...

Interestingly, you're also telling QEMU to map a file called
RootFS.ext3 to a raw block device, to be visible in the kernel as a
SCSI disk device. Which should correspond to your SYM53C8XX driver -
except that the kernel does not detect such a controller? Or does it?

QEMU can indeed use the mtdblock abstraction to present your raw
drive to the guest OS, as an alternative to SCSI - normally you'd
have to explicitly ask QEMU to do this.

As far as I can tell, the SCSI emulation has not yet been dropped
from QEMU in the modern versions (6.x), and that SYM53C8XX driver
still seems to be the right one.

Would you consider starting your ARM kernel with an initrd, which
would allow you to run some further investigation in your guest, as
to what PCI and other emulated devices actually become available?

A complete boot log of your guest kernel might also shed some light
on things...

Frank


On 23 Dec 2021 at 13:51, Sukreet pal wrote:

Hi ,
I am using linux kernel -3.18.31 to emulateĀ versatilepb and with PCI
and SCSI implementation for which I followed the qemu system
developmentĀ page and I edited my linux configuration file with this:-


CONFIG_PCI=y
CONFIG_PCI_VERSATILE=y
CONFIG_SCSI=y
CONFIG_SCSI_SYM53C8XX_2=y



and I am using busybox for the root file system.




I am facing problem while booting the kernel



Command used for emulation :-




sudo qemu-system-arm -M versatilepb -kernel 
/home/sukreetngc/PCI_virt/linux-3.18.31/arch/arm/boot/zImage -append 
"root=/dev/mmcblk0 console=ttyAMA0"
 -drive 
index=0,file=/home/sukreetngc/PCI_virt/busybox-1.33.1/RootFS.ext3,if=scsi,format=raw
 -net nic,model=rtl8139 -net user -nographic



but i end up with Vfs mount error :-



VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
1f00           65536 mtdblock0  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.18.31 #1
[<c001a25c>] (unwind_backtrace) from [<c0016e24>] (show_stack+0x10/0x14)
[<c0016e24>] (show_stack) from [<c02d4ec0>] (panic+0x80/0x1dc)
[<c02d4ec0>] (panic) from [<c03bd134>] (mount_block_root+0x1b0/0x25c)
[<c03bd134>] (mount_block_root) from [<c03bd3c0>] (mount_root+0xe4/0x10c)
[<c03bd3c0>] (mount_root) from [<c03bd548>] (prepare_namespace+0x160/0x1b4)
[<c03bd548>] (prepare_namespace) from [<c03bcda8>] 
(kernel_init_freeable+0x16c/0x1b0)
[<c03bcda8>] (kernel_init_freeable) from [<c02d45e4>] (kernel_init+0x8/0xec)
[<c02d45e4>] (kernel_init) from [<c0013bf8>] (ret_from_fork+0x14/0x3c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on 
unknown-block(0,0)



It would be helpful if someone could suggest to me how to proceed.

Regards,
Sukreet Pal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]