All of lore.kernel.org
 help / color / mirror / Atom feed
* Could we document exact steps for loongson3-virt in the manual?
@ 2021-04-06 13:06 Alex Bennée
  2021-04-07  3:47 ` Jiaxun Yang
  2021-04-07  7:47 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Alex Bennée @ 2021-04-06 13:06 UTC (permalink / raw)
  To: Huacai Chen, Jiaxun Yang; +Cc: Philippe Mathieu-Daudé, qemu-devel

Hi,

I was trying to bootstrap a Loongson3 Debian image but ran into some
roadblocks. Philippe pointed me at:

  https://www.mail-archive.com/qemu-devel@nongnu.org/msg768848.html

which gives a bit of detail but elides over details such as how to
handle block devices. AFAICT it should support virtio-blk although maybe
Debian bullseye doesn't support the target, it's hard to say:

  ./qemu-system-mips64el -M loongson3-virt -m 4096 -nographic -blockdev driver=raw,node-name=hd0,discard=unmap,file.driver=host_device,file.filename=/dev/zvol/hackpool-0/debian-bullseye-mips64le -device virtio-blk,drive=hd0 -kernel ./vmlinuz-5.9.0-4-loongson-3 -initrd initrd.gz -append "root=/dev/sda1 console=tty0 nokaslr"

Gets as far as:

[    0.008641] printk: console [tty0] enabled
[    0.009507] printk: bootconsole [early0] disabled

and then just goes silent. It would be nice if we could add enough
detail to the appropriate target-mips.rst to:

 - give guidance on the best model to use for general purpose distros
 - describe a common command line for such
 - detail bootstraping a modern kernel

In the ARM section there is a nice "Choosing a board model" which
discusses what you want (probably "virt") and then we have varying
levels of detail for the various myriad zoo of ARM machines that are
emulated. I recently added sections to the versatile and vexpress
sections after going through similar pain trying to get those up and
running.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Could we document exact steps for loongson3-virt in the manual?
  2021-04-06 13:06 Could we document exact steps for loongson3-virt in the manual? Alex Bennée
@ 2021-04-07  3:47 ` Jiaxun Yang
  2021-04-07  7:47 ` Peter Maydell
  1 sibling, 0 replies; 4+ messages in thread
From: Jiaxun Yang @ 2021-04-07  3:47 UTC (permalink / raw)
  To: Alex Bennée, Huacai Chen
  Cc: Philippe Mathieu-Daudé, BALATON Zoltan via



On Tue, Apr 6, 2021, at 9:06 PM, Alex Bennée wrote:
> Hi,
> 
> I was trying to bootstrap a Loongson3 Debian image but ran into some
> roadblocks. Philippe pointed me at:
> 
>   https://www.mail-archive.com/qemu-devel@nongnu.org/msg768848.html
> 
> which gives a bit of detail but elides over details such as how to
> handle block devices. AFAICT it should support virtio-blk although maybe
> Debian bullseye doesn't support the target, it's hard to say:
> 
>   ./qemu-system-mips64el -M loongson3-virt -m 4096 -nographic -blockdev 
> driver=raw,node-name=hd0,discard=unmap,file.driver=host_device,file.filename=/dev/zvol/hackpool-0/debian-bullseye-mips64le -device virtio-blk,drive=hd0 -kernel ./vmlinuz-5.9.0-4-loongson-3 -initrd initrd.gz -append "root=/dev/sda1 console=tty0 nokaslr"

missing console=ttyS0,115200 in cmdline.


> 
> Gets as far as:
> 
> [    0.008641] printk: console [tty0] enabled
> [    0.009507] printk: bootconsole [early0] disabled
> 
> and then just goes silent. It would be nice if we could add enough
> detail to the appropriate target-mips.rst to:
> 
>  - give guidance on the best model to use for general purpose distros
>  - describe a common command line for such
>  - detail bootstraping a modern kernel
> 
> In the ARM section there is a nice "Choosing a board model" which
> discusses what you want (probably "virt") and then we have varying
> levels of detail for the various myriad zoo of ARM machines that are
> emulated. I recently added sections to the versatile and vexpress
> sections after going through similar pain trying to get those up and
> running.

I’ll take a look.

Thanks!


> 
> -- 
> Alex Bennée
>

-- 
- Jiaxun


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Could we document exact steps for loongson3-virt in the manual?
  2021-04-06 13:06 Could we document exact steps for loongson3-virt in the manual? Alex Bennée
  2021-04-07  3:47 ` Jiaxun Yang
@ 2021-04-07  7:47 ` Peter Maydell
  2021-04-07  8:37   ` Alex Bennée
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2021-04-07  7:47 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Huacai Chen, Philippe Mathieu-Daudé, QEMU Developers

On Tue, 6 Apr 2021 at 14:23, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Hi,
>
> I was trying to bootstrap a Loongson3 Debian image but ran into some
> roadblocks. Philippe pointed me at:
>
>   https://www.mail-archive.com/qemu-devel@nongnu.org/msg768848.html
>
> which gives a bit of detail but elides over details such as how to
> handle block devices. AFAICT it should support virtio-blk although maybe
> Debian bullseye doesn't support the target, it's hard to say:
>
>   ./qemu-system-mips64el -M loongson3-virt -m 4096 -nographic -blockdev driver=raw,node-name=hd0,discard=unmap,file.driver=host_device,file.filename=/dev/zvol/hackpool-0/debian-bullseye-mips64le -device virtio-blk,drive=hd0 -kernel ./vmlinuz-5.9.0-4-loongson-3 -initrd initrd.gz -append "root=/dev/sda1 console=tty0 nokaslr"
>
> Gets as far as:
>
> [    0.008641] printk: console [tty0] enabled
> [    0.009507] printk: bootconsole [early0] disabled
>
> and then just goes silent.

Oddly enough somebody on stackoverflow had the same problem for
a different board (malta) the other day:
https://stackoverflow.com/questions/66904366/qemu-system-mips-stuck-after-console-tty0-enabled/66910192

As Jiaxun says, the problem is that your kernel command line says "send the
console output to the virtual console on the graphics device (tty0)" but your
QEMU command line is using a serial console and not trying to use graphics.
So as soon as the kernel gets to the point where it can honour your request
it disables the early-boot console and enables tty0 and then you don't
see anything any more :-)

thanks
-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Could we document exact steps for loongson3-virt in the manual?
  2021-04-07  7:47 ` Peter Maydell
@ 2021-04-07  8:37   ` Alex Bennée
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2021-04-07  8:37 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Huacai Chen, Philippe Mathieu-Daudé, QEMU Developers


Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 6 Apr 2021 at 14:23, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Hi,
>>
>> I was trying to bootstrap a Loongson3 Debian image but ran into some
>> roadblocks. Philippe pointed me at:
>>
>>   https://www.mail-archive.com/qemu-devel@nongnu.org/msg768848.html
>>
>> which gives a bit of detail but elides over details such as how to
>> handle block devices. AFAICT it should support virtio-blk although maybe
>> Debian bullseye doesn't support the target, it's hard to say:
>>
>>   ./qemu-system-mips64el -M loongson3-virt -m 4096 -nographic
>> -blockdev
>> driver=raw,node-name=hd0,discard=unmap,file.driver=host_device,file.filename=/dev/zvol/hackpool-0/debian-bullseye-mips64le
>> -device virtio-blk,drive=hd0 -kernel ./vmlinuz-5.9.0-4-loongson-3
>> -initrd initrd.gz -append "root=/dev/sda1 console=tty0 nokaslr"
>>
>> Gets as far as:
>>
>> [    0.008641] printk: console [tty0] enabled
>> [    0.009507] printk: bootconsole [early0] disabled
>>
>> and then just goes silent.
>
> Oddly enough somebody on stackoverflow had the same problem for
> a different board (malta) the other day:
> https://stackoverflow.com/questions/66904366/qemu-system-mips-stuck-after-console-tty0-enabled/66910192
>
> As Jiaxun says, the problem is that your kernel command line says "send the
> console output to the virtual console on the graphics device (tty0)" but your
> QEMU command line is using a serial console and not trying to use graphics.
> So as soon as the kernel gets to the point where it can honour your request
> it disables the early-boot console and enables tty0 and then you don't
> see anything any more :-)

Doh - should have spotted that. I guess the -nographic doesn't prompt
the kernel enough to warn about switching to a non-existent graphics
device. I can get to the installer now although it fails later failing
to find kernel modules. I suspect this is a Debian problem with a
mismatch between installer and archives.

>
> thanks
> -- PMM


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-07  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 13:06 Could we document exact steps for loongson3-virt in the manual? Alex Bennée
2021-04-07  3:47 ` Jiaxun Yang
2021-04-07  7:47 ` Peter Maydell
2021-04-07  8:37   ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.