qemu-system-aarch64 \
       -smp 4 \
       -m 2048 \
       -cpu cortex-a72 \
       -M virt \
       -device virtio-gpu-pci,xres=1024,yres=768 \
       -display sdl,gl=on \
       -device usb-ehci \
       -device usb-kbd \
       -device virtio-tablet-pci \
       -usb \
       -serial stdio \
       -kernel /mnt/zroot-133/_OS/Android/rpi4/Image \
       -initrd /mnt/zroot-133/_OS/Android/rpi4/ramdisk.img \
       -device sdhci-pci,sd-spec-version=3 \
       -drive
if=none,file=/mnt/zroot-133/_OS/Android/rpi4/boot.img,format=raw,id=MMC1 \
       -device sd-card,drive=MMC1 \
       -drive
if=none,file=/mnt/zroot-133/_OS/Android/rpi4/system.img,format=raw,id=MMC2
\
       -device sd-card,drive=MMC2 \
       -drive
if=none,file=/mnt/zroot-133/_OS/Android/rpi4/vendor.img,format=raw,id=MMC3
\
       -device sd-card,drive=MMC3 \
-append "console=ttyAMA0,38400 drm.debug=0x0 rootwait rootdelay=5
root=/dev/mmcblk0p2 androidboot.hardware=rpi4
androidboot.selinux=permissive security=selinux selinux=1
androidboot.qemu.hw.mainkeys=0 androidboot.lcd.density=160"

= same error :

[    1.111482] init: [libfstab] ReadFstabFromDt(): failed to read fstab
from dt
[    1.149319] init: Failed to read vbmeta partitions.
[    2.046632] init: bool
android::init::BlockDevInitializer::InitDevices(std::set<std::string>):
partition(s) not found in /sys, waiting for their uevent(s): mmcblk0p2,
mmcblk0p3

On Mon, Sep 2, 2024 at 4:05 PM Mario Marietto <marietto2...@gmail.com>
wrote:

> ---> I think it would be better to fix the guest
>
> I have no idea what to do. Please elaborate more.
>
> Tried with these parameters :
>
> -drive if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/boot.img \
> -drive if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/system.img \
> -drive if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/vendor.img \
>
> but :
>
> qemu-system-aarch64: -drive
> if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/boot.img: machine
> type does not support if=sd,bus=0,unit=0
> qemu-system-aarch64: -drive
> if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/system.img: machine
> type does not support if=sd,bus=0,unit=1
> qemu-system-aarch64: -drive
> if=sd,format=raw,file=/mnt/zroot-133/_OS/Android/rpi4/vendor.img: machine
> type does not support if=sd,bus=0,unit=2
>
>
> On Mon, Sep 2, 2024 at 4:00 PM Peter Maydell <peter.mayd...@linaro.org>
> wrote:
>
>> On Mon, 2 Sept 2024 at 14:50, Mario Marietto <marietto2...@gmail.com>
>> wrote:
>>
>> > [ 1.993668] init: bool
>> android::init::BlockDevInitializer::InitDevices(std::set<std::string>):
>> partition(s) not found in /sys, waiting for their uevent(s): mmcblk0p2,
>> mmcblk0p3
>> >
>> >
>> > One user suggested to :
>> >
>> >
>> >
>> >
>> > Hi!!! The "/sys" is a "dynamic fs" created at ram from the kernel, to
>> export a lot of things...so most of the files only exist at runtime.
>> Normally, the partitions from the block device have a symlink at
>> /sys/<something>/<...> that points to /dev/ block node. It seems that there
>> are no such files under /sys according to what init is looking for. You can
>> double check this at init source code to check the exact path but I'm
>> guessing that you'll have to change the qemu arguments regarding the block
>> device.
>>
>> The mmcblk* device names are for an SD card.
>>
>> > So,in short I should change the qemu arguments regarding the block
>> device. I tried in this way :
>> >
>> >
>> > qemu-system-aarch64 \
>> >         -smp 4 \
>> >         -m 2048 \
>> >         -cpu cortex-a72 \
>> >         -M virt \
>> >         -device virtio-gpu-pci,xres=1024,yres=768 \
>> >         -display sdl,gl=on \
>> >         -device usb-ehci \
>> >         -device usb-kbd \
>> >         -device virtio-tablet-pci \
>> >         -usb \
>> >         -serial stdio \
>> >         -kernel /mnt/zroot-133/_OS/Android/rpi4/Image \
>> >         -initrd /mnt/zroot-133/_OS/Android/rpi4/ramdisk.img \
>> >         -hda /mnt/zroot-133/_OS/Android/rpi4/boot.img \
>> >         -hdb /mnt/zroot-133/_OS/Android/rpi4/system.img \
>> >         -hdc /mnt/zroot-133/_OS/Android/rpi4/vendor.img \
>> >         -append "console=ttyAMA0,38400 drm.debug=0x0 rootwait
>> rootdelay=5 root=/dev/mmcblk0p2 androidboot.hardware=rpi4
>> androidboot.selinux=permissive security=selinux selinux=1
>> androidboot.qemu.hw.mainkeys=0 androidboot.lcd.density=160"
>>
>> Your original command line was creating virtio-scsi disks via
>> virtio-blk-pci. This one does the same, just via a different
>> syntax (the default block type for the 'virt' board is IF_VIRTIO).
>>
>> I'm not sure exactly how you would create an SD card for the
>> 'virt' board (probably by using the sdhci-pci device which is
>> a PCI sd controller) but I think it would be better to fix
>> the guest to use the virtio devices and not insist on looking
>> for an SD card -- the performance from an emulated SD card
>> will be a lot worse.
>>
>> thanks
>> -- PMM
>>
>
>
> --
> Mario.
>


-- 
Mario.

Reply via email to