Hi,
While trying to start the QEMU emulation using qemu-system-ppc64 I am getting error as below from the boot log
. . . .
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 81324K (c3000000 - c7f6b000)
audit: initializing netlink socket (disabled)
type=2000 audit(0.592:1): initialized
HugeTLB registered 1 MB page size, pre-allocated 0 pages
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
. . .
RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (22321 != 32768)
write error
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 288K (c08a4000 - c08ec000)
attempt to access beyond end of device
ram0: rw=0, want=454704, limit=262144
Buffer I/O error on device ram0, logical block 227351
attempt to access beyond end of device
ram0: rw=0, want=455366, limit=262144
Buffer I/O error on device ram0, logical block 227682
attempt to access beyond end of device
ram0: rw=0, want=463142, limit=262144
Buffer I/O error on device ram0, logical block 231570
attempt to access beyond end of device
ram0: rw=0, want=454704, limit=262144
Buffer I/O error on device ram0, logical block 227351
attempt to access beyond end of device
ram0: rw=0, want=455366, limit=262144
Buffer I/O error on device ram0, logical block 227682
attempt to access beyond end of device
ram0: rw=0, want=463142, limit=262144
Buffer I/O error on device ram0, logical block 231570
attempt to access beyond end of device
ram0: rw=0, want=418868, limit=262144
Buffer I/O error on device ram0, logical block 209433
attempt to access beyond end of device
ram0: rw=0, want=424160, limit=262144
Buffer I/O error on device ram0, logical block 212079
attempt to access beyond end of device
ram0: rw=0, want=427966, limit=262144
Buffer I/O error on device ram0, logical block 213982
attempt to access beyond end of device
ram0: rw=0, want=418868, limit=262144
Buffer I/O error on device ram0, logical block 209433
attempt to access beyond end of device
ram0: rw=0, want=424160, limit=262144
attempt to access beyond end of device
ram0: rw=0, want=427966, limit=262144
attempt to access beyond end of device
ram0: rw=0, want=418868, limit=262144
attempt to access beyond end of device
ram0: rw=0, want=424160, limit=262144
attempt to access beyond end of device
ram0: rw=0, want=427966, limit=262144
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #2
Call Trace:
[ce033e80] [c0007190] show_stack+0x40/0x150 (unreliable)
[ce033ec0] [c06cc978] dump_stack+0x78/0xa0
[ce033ed0] [c06cacb8] panic+0xd8/0x1fc
[ce033f20] [c0002b9c] kernel_init+0x16c/0x170
[ce033f40] [c000ff20] ret_from_kernel_thread+0x5c/0x64
Rebooting in 180 seconds..Connection closed by foreign host.
The command which I fired for bring up the machine is given below
sudo ~/QorIQ-SDK-V1.6-20140619-yocto/build_t1040rdb_release/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-ppc64 -kernel uImage -net nic,model=e1000 -net tap,ifname=tap0,script=no,downscript=no -cpu e5500 -M ppce500 -initrd fsl-image-virt-t1040rdb-20150105132202.rootfs.ext2.gz -no-reboot -show-cursor -no-reboot -m 256 --append "root=/dev/ram rw console=ttyS0,115200 ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=256M " -serial tcp::4444,server,telnet -drive file=mydisk,cache=none,if=virtio -nographic
Now when we try to pass -hda option for below command
sudo ~/QorIQ-SDK-V1.6-20140619-yocto/build_t1040rdb_release/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-ppc64 -kernel uImage -net nic,model=e1000 -net tap,ifname=tap0,script=no,downscript=no -cpu e5500 -M ppce500 -hda fsl-image-virt-t1040rdb-20150105132202.rootfs.ext2.gz -no-reboot -show-cursor -no-reboot -m 256 --append "root=/dev/hda rw console=ttyS0,115200 ip=192.168.7.2::192.168.7.1:255.255.255.0 mem=256M " -serial tcp::4444,server,telnet -drive file=mydisk,cache=none,if=virtio -nographic
The error being reported is given below
VFS: Cannot open root device "hda" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
fe00 1048576 vda driver: virtio_blk
fe01 1047552 vda1 0f1cd4fc-01
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a #2
Call Trace:
[ce03bda0] [c0007190] show_stack+0x40/0x150 (unreliable)
[ce03bde0] [c06cc978] dump_stack+0x78/0xa0
[ce03bdf0] [c06cacb8] panic+0xd8/0x1fc
[ce03be40] [c08a4ce4] mount_block_root+0x1b0/0x248
[ce03bea0] [c08a4fb0] mount_root+0xfc/0x110
[ce03bed0] [c08a514c] prepare_namespace+0x188/0x1d0
[ce03bef0] [c08a4958] kernel_init_freeable+0x1bc/0x1d0
[ce03bf20] [c0002a48] kernel_init+0x18/0x170
[ce03bf40] [c000ff20] ret_from_kernel_thread+0x5c/0x64
Rebooting in 180 seconds..Connection closed by foreign host.
So any thoughts how to make system boot using a -hda and not using -initrd as we want to have IMAGE_ROOT_FS=1G so that we can have some space for working with application and other dependent library.
Please let me know if you need more information.
Thanks,
Abhinav