When I unpack this file : lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv.img
I get these files : 0.fat 1.img 2.img 3.img So,I assume that : 0.fat is : initrd 1.img is : system-rw.img 2.img is : vendor-rw.img 3.img is : userdata.img If I use 0.fat as initrd,like this : -initrd /mnt/zroot2/zroot2/OS/Linux/lineage-21.0-20240618-UNOFFICIAL-KonstaKANG-rpi4-atv/0.fat I get this message : rootfs image is not initramfs (invalid magic at start of compressed archive); looks like an initrd it looks like an initrd : right,it's true : it is initrd. (for this reason I've assumed that 0.fat is initrd... On Sun, Aug 25, 2024 at 1:26 PM Peter Maydell <peter.mayd...@linaro.org> wrote: > 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 > -- Mario.