qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Maintainers, please tell us how to boot your machines!


From: Joel Stanley
Subject: Re: [Qemu-devel] Maintainers, please tell us how to boot your machines!
Date: Mon, 18 Mar 2019 12:10:22 +0000

On Tue, 12 Mar 2019 at 17:36, Markus Armbruster <address@hidden> wrote:

I regularly use the powernv and aspeed machines, but others have
contributed their command lines already.

>     = hw/arm/microbit.c =
>     Joel Stanley <address@hidden> (maintainer:NRF51)
>     Peter Maydell <address@hidden> (maintainer:NRF51)
>     address@hidden (open list:NRF51)

This board can run many the BBC micro:bit firmwares. I have tested it
with micropython, which can be grabbed  from the microbit offical
port[1], built from upstream micropython[2] or downloaded from the
online editor[3]. For development I build it locally so I can use
Qemu's gdb stub to debug qemu models.

$ git clone --recurse-submodules https://github.com/micropython/micropython
$ cd micropthon/ports/nrf/
$ make BOARD=microbit
$ qemu-system-arm -M microbit -kernel build-microbit/firmware.elf
-serial stdio -s
MicroPython v1.10-228-gec6e62efc242 on 2019-03-18; micro:bit with NRF51822
Type "help()" for more information.
>>>

If you have a .hex file from one of the microbit development
environments (try it out on the web IDE at [3]) you can run it like
this:

$ wget https://ozlabs.org/~joel/microbit-micropython.hex
$ qemu-system-arm -M microbit -device
loader,file=microbit-micropython.hex -serial stdio
MicroPython v1.9.2-34-gd64154c73 on 2017-09-01; micro:bit v1.0.1 with nRF51822
Type "help()" for more information.
>>> print("Hello, Qemu!")
Hello, Qemu!
>>> [a*a for a in range(1, 10)]
[1, 4, 9, 16, 25, 36, 49, 64, 81]
>>>

[1] https://github.com/bbcmicrobit/micropython/
[2] https://github.com/micropython/micropython
[3] https://python.microbit.org/v/1.1

>     = hw/lm32/lm32_boards.c =
>     Michael Walle <address@hidden> (maintainer:LM32)
>
>     = hw/lm32/milkymist.c =
>     Michael Walle <address@hidden> (maintainer:milkymist)

I have a port to a lm32 board that is out of tree. A challenge I would
have to upstream that port is it is FPGA based, so it is hard to know
ahead of time the layout, availability and configuration of the
peripherals.

I have reached out to the project that was using it to see if they
still are using it, and if upstreaming would be worthwhile.

>
>     = hw/ppc/ppc440_bamboo.c =
>     David Gibson <address@hidden> (odd fixer:ppc4xx)
>     address@hidden (open list:ppc4xx)

I use this board to test powerpc 32-bit Linux kernels[4]. However, it
was chosen at random so I could switch to a different one.

      make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-  ppc44x_defconfig
      make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-

      qemu-system-ppc -M bamboo \
       -kernel arch/powerpc/boot/zImage \
       -dtb arch/powerpc/boot/dts/bamboo.dtb \
       -initrd ~/ppc32-440-rootfs.cpio \
       -nographic -serial stdio -monitor pty -append "console=ttyS0"

[4] 
https://github.com/ClangBuiltLinux/continuous-integration/blob/master/driver.sh#L108

On that note, I often refer to the buildroot tree for how to boot
Linux machines. They have a good collection of Qemu command lines:

$ git grep qemu-system- board/qemu/
board/qemu/aarch64-virt/readme.txt:  qemu-system-aarch64 -M virt -cpu
cortex-a53 -nographic -smp 1 -kernel output/images/Image -append
"root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device
virtio-net-device,netdev=eth0 -drive
file=output/images/rootfs.ext4,if=none,format=raw,i
board/qemu/arm-versatile/readme.txt:  qemu-system-arm -M versatilepb
-kernel output/images/zImage -dtb output/images/versatile-pb.dtb
-drive file=output/images/rootfs.ext2,if=scsi,format=raw -append
"root=/dev/sda console=ttyAMA0,115200" -serial stdio -net
nic,model=rtl8139 -net user
board/qemu/arm-versatile/readme.txt:  qemu-system-arm -M versatilepb
-kernel output/images/zImage -dtb output/images/versatile-pb.dtb
-append "console=ttyAMA0,115200" -serial stdio -net user -net
nic,model=smc91c111
board/qemu/arm-vexpress/readme.txt:  qemu-system-arm -M vexpress-a9
-smp 1 -m 256 -kernel output/images/zImage -dtb
output/images/vexpress-v2p-ca9.dtb -drive
file=output/images/rootfs.ext2,if=sd,format=raw -append
"console=ttyAMA0,115200 root=/dev/mmcblk0" -serial stdio -net nic,mode
board/qemu/m68k-mcf5208/readme.txt: qemu-system-m68k -M mcf5208evb
-cpu m5208 -kernel output/images/vmlinux -nographic
board/qemu/m68k-q800/readme.txt: qemu-system-m68k -M q800 -kernel
output/images/vmlinux -nographic -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/sda
console=ttyS0"
board/qemu/microblazebe-mmu/readme.txt: qemu-system-microblaze -M
petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio
board/qemu/microblazeel-mmu/readme.txt: qemu-system-microblazeel -M
petalogix-s3adsp1800 -kernel output/images/linux.bin -serial stdio
board/qemu/mips32r2-malta/readme.txt: qemu-system-mips -M malta
-kernel output/images/vmlinux -serial stdio -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net
nic,model=pcnet -net user
board/qemu/mips32r2el-malta/readme.txt: qemu-system-mipsel -M malta
-kernel output/images/vmlinux -serial stdio -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net
nic,model=pcnet -net user
board/qemu/mips32r6-malta/readme.txt:qemu-system-mips -M malta -cpu
mips32r6-generic -kernel output/images/vmlinux -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"
-nographic
board/qemu/mips32r6el-malta/readme.txt:qemu-system-mipsel -M malta
-cpu mips32r6-generic -kernel output/images/vmlinux -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda" -net
nic,model=pcnet -net user -nographic
board/qemu/mips64-malta/readme.txt: qemu-system-mips64 -M malta
-kernel output/images/vmlinux -serial stdio -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"
board/qemu/mips64el-malta/readme.txt: qemu-system-mips64el -M malta
-kernel output/images/vmlinux -serial stdio -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"
board/qemu/mips64r6-malta/readme.txt: qemu-system-mips64 -M malta -cpu
I6400 -kernel output/images/vmlinux -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"
-nographic
board/qemu/mips64r6el-malta/readme.txt: qemu-system-mips64el -M malta
-cpu I6400 -kernel output/images/vmlinux -drive
file=output/images/rootfs.ext2,format=raw -append "root=/dev/hda"
-nographic
board/qemu/nios2-10m50/readme.txt:  qemu-system-nios2 -kernel
output/images/vmlinux -nographic
board/qemu/or1k/readme.txt: qemu-system-or1k -kernel
output/images/vmlinux -nographic
board/qemu/ppc-g3beige/readme.txt:  qemu-system-ppc -M g3beige -kernel
output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw
-append "console=ttyS0 root=/dev/hda" -serial stdio -net
nic,model=rtl8139 -net user
board/qemu/ppc-mpc8544ds/readme.txt: qemu-system-ppc -M mpc8544ds
-kernel output/images/vmlinux -serial stdio -net nic,model=e1000 -net
user
board/qemu/ppc-virtex-ml507/readme.txt: qemu-system-ppc -M
virtex-ml507 -kernel output/images/vmlinux -m 256 -nographic -append
"console=ttyS0" -dtb output/images/virtex440-ml507.dtb
board/qemu/ppc64-e5500/readme.txt: qemu-system-ppc64 -M ppce500 -cpu
e5500 -m 256 -kernel output/images/uImage -drive
file=output/images/rootfs.ext2,if=virtio,format=raw -append
"console=ttyS0 root=/dev/vda" -serial mon:stdio -nographic
board/qemu/ppc64-pseries/readme.txt: qemu-system-ppc64 -M pseries -cpu
POWER7 -m 256 -kernel output/images/vmlinux -append "console=hvc0
root=/dev/sda" -drive
file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial
stdio -display curses
board/qemu/ppc64le-pseries/readme.txt:qemu-system-ppc64 -M pseries
-cpu POWER8 -m 256 -kernel output/images/vmlinux -append "console=hvc0
root=/dev/sda" -drive
file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial
stdio -display curses
board/qemu/riscv32-virt/readme.txt:  qemu-system-riscv32 -M virt
-kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0"
-drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0 -netdev user,id=net0 -device
virtio-net-device,netdev=net0 -
board/qemu/riscv64-virt/readme.txt:  qemu-system-riscv64 -M virt
-kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0"
-drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0 -netdev user,id=net0 -device
virtio-net-device,netdev=net0 -
board/qemu/sh4-r2d/readme.txt:  qemu-system-sh4 -M r2d -kernel
output/images/zImage -drive
file=output/images/rootfs.ext2,if=ide,format=raw -append
"root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial
stdio -net nic,model=rtl8139 -net user
board/qemu/sh4eb-r2d/readme.txt:  qemu-system-sh4eb -M r2d -kernel
output/images/zImage -drive
file=output/images/rootfs.ext2,if=ide,format=raw -append
"root=/dev/sda console=ttySC1,115200 noiotrap" -serial null -serial
stdio -net nic,model=rtl8139 -net user
board/qemu/sparc-ss10/readme.txt:  qemu-system-sparc -M SS-10 -kernel
output/images/zImage -drive file=output/images/rootfs.ext2,format=raw
-append "root=/dev/sda console=ttyS0,115200" -serial stdio -net
nic,model=lance -net user
board/qemu/sparc64-sun4u/readme.txt:  qemu-system-sparc64 -M sun4u
-kernel output/images/vmlinux -append "root=/dev/sda
console=ttyS0,115200" -serial stdio -drive
file=output/images/rootfs.ext2,format=raw -net nic,model=e1000 -net
user
board/qemu/x86/readme.txt:  qemu-system-i386 -M pc -kernel
output/images/bzImage -drive
file=output/images/rootfs.ext2,if=virtio,format=raw -append
"root=/dev/vda" -net nic,model=virtio -net user
board/qemu/x86_64/readme.txt:  qemu-system-x86_64 -M pc -kernel
output/images/bzImage -drive
file=output/images/rootfs.ext2,if=virtio,format=raw -append
"root=/dev/vda" -net nic,model=virtio -net user
board/qemu/xtensa-lx60/readme.txt: qemu-system-xtensa -M lx60 -cpu
dc233c -monitor null -nographic -kernel output/images/Image.elf

Cheers,

Joel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]