Issue
I tried to use jcowgill's pre-compiled kernel and QCOW2 Disk Image, but qemu got stuck here after some output. Don't know what happened, qemu is just stuck here and I can't enter any commands.
Command:
qemu-system-mips64el \
-M malta \
-cpu MIPS64R2-generic \
-m 2G \
-append 'root=/dev/sda2 console=tty0 mem=2048m nokaslr' \
-nographic \
-kernel vmlinux-4.9.0-4-5kc-malta.mipsel.stretch \
-initrd initrd.img-4.9.0-4-5kc-malta.mipsel.stretch \
-drive file=debian-stretch-mipsel.qcow2
Output:
[ 0.000000] Linux version 4.9.0-4-5kc-malta ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 Debian 4.9.65-3 (2017-12-03)
[ 0.000000] earlycon: uart8250 at I/O port 0x3f8 (options '38400n8')
[ 0.000000] bootconsole [uart8250] enabled
[ 0.000000] CPU0 revision is: 00010000 (MIPS GENERIC QEMU)
[ 0.000000] FPU revision is: 007f0000
[ 0.000000] Checking for the multiply/shift bug... [ 0.000000] no.
[ 0.000000] Checking for the daddiu bug... [ 0.000000] no.
[ 0.000000] MIPS: machine is mti,malta
[ 0.000000] Software DMA cache coherency enabled
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 0000000010000000 @ 0000000000000000 (usable)
[ 0.000000] memory: 0000000070000000 @ 0000000090000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 0000000080000000 @ 0000000000000000 (usable)
[ 0.000000] Initial ramdisk at: 0x900000000ed70000 (19204358 bytes)
[ 0.000000] Reserving 0MB of memory at 0MB for crashkernel
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 516096
[ 0.000000] Kernel command line: rd_start=0xffffffff8ed70000 rd_size=19204358 root=/dev/sda2 console=tty0 mem=2048m nokaslr
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 2030840K/2097152K available (6118K kernel code, 982K rwdata, 1596K rodata, 1516K init, 360K bss, 66312K reserved, 0K cma-reserved)
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU frequency 200.00 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112681107 ns
[ 0.000108] sched_clock: 32 bits at 99MHz, resolution 10ns, wraps every 21474922490ns
[ 0.004826] Console: colour dummy device 80x25
[ 0.005174] console [tty0] enabled
[ 0.005521] bootconsole [uart8250] disabled
The kernel and img files are downloaded from https://people.debian.org/~jcowgill/qemu-mips/
vmlinux-4.9.0-4-5kc-malta.mipsel.stretch
initrd.img-4.9.0-4-5kc-malta.mipsel.stretch
debian-stretch-mipsel.qcow2
Solution
Your kernel command line says "console=tty0", which means "please send console to the first virtual terminal", ie to the graphics device. But there is no graphics device in the machine you're running (you say "-nographic" on your QEMU command line and the kernel says "Console: colour dummy device 80x25"). So what happens is that you see the initial bootup messages via the "uart8250" earlycon (ie the serial port), but as soon as the kernel gets to a point where it can honour your command line request, it enables tty0 (which goes nowhere) and disables uart8250 (so you see no further output).
You need to tell the kernel to send the console output to the serial port if that's where you'd like to see it appear, which for the malta board I think you can do by using "console=ttyS0" instead. Alternatively, you can drop '-nographic', make sure your kernel has the driver for the VGA card built in, and leave "console=tty0" and you'll see the console on the virtual console on the graphical window.
If you look at the README for the website you downloaded your image files from you'll see that it does indeed suggest using "console=ttyS0".
Answered By - Peter Maydell
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.