On Sun, 25 Aug 2024 at 11:45, Mario Marietto <marietto2...@gmail.com> wrote:
>
> Please look at this example :
>
> qemu-system-aarch64 \
> -smp 4 \
> -m 2048 \
> -cpu cortex-a72 \
> -machine virt \
> -serial stdio \
> -kernel 
> /mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/boot/Image
>  \

This (assuming it's the complete command line your script is
running) doesn't pass any arguments telling QEMU to provide a
root disk, and it doesn't pass any arguments to the kernel
telling it what root disk to use...

> [    0.000000] Kernel command line: console=ttyAMA0,115200 
> kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait 
> androidboot.serialno=10000000abcd1234 androidboot.btmacaddr=11:22:33:44:55:66

...so the kernel defaults to "/dev/mmcblk0p2" as its root disk because
it's using the command line argument that was compiled into it...

> [    0.658240] Waiting for root device /dev/mmcblk0p2...

...and then it's hanging around forever waiting for that.

You need to:
 (1) pass QEMU arguments telling it to provide a root fs
 (2) pass the kernel arguments telling it to look for the
     root fs in the place where QEMU is providing it

Your other command line looks more on the right lines:

        -kernel
/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/boot/Image
\
        -initrd
/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/0.fat
\
        -drive 
index=0,if=none,id=system,file=/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/1.img
\
        -device virtio-blk-pci,drive=system \
        -drive 
index=1,if=none,id=vendor,file=/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/2.img
\
        -device virtio-blk-pci,drive=vendor \
        -drive 
index=2,if=none,id=userdata,file=/mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/3.img
\
        -device virtio-blk-pci,drive=userdata \

though I wonder if the kernel really expects a
FAT file for the initrd, given it complains:

[    0.344033] Trying to unpack rootfs image as initramfs...
[    0.344947] rootfs image is not initramfs (invalid magic at start
of compressed archive); looks like an initrd

and then later

[    5.905329] RAMDISK: Couldn't find valid RAM disk image starting at 0.

I think if I were you I'd start by figuring out what's going on
with the initrd.

thanks
-- PMM

Reply via email to