QemuK210/roms/qboot
xuetest 82bdd00ec4 first commit 2021-05-10 20:01:02 +08:00
..
include first commit 2021-05-10 20:01:02 +08:00
LICENSE first commit 2021-05-10 20:01:02 +08:00
README first commit 2021-05-10 20:01:02 +08:00
benchmark.h first commit 2021-05-10 20:01:02 +08:00
code16.c first commit 2021-05-10 20:01:02 +08:00
code32seg.c first commit 2021-05-10 20:01:02 +08:00
cstart.S first commit 2021-05-10 20:01:02 +08:00
entry.S first commit 2021-05-10 20:01:02 +08:00
flat.lds first commit 2021-05-10 20:01:02 +08:00
fw_cfg.c first commit 2021-05-10 20:01:02 +08:00
hwsetup.c first commit 2021-05-10 20:01:02 +08:00
linuxboot.c first commit 2021-05-10 20:01:02 +08:00
main.c first commit 2021-05-10 20:01:02 +08:00
malloc.c first commit 2021-05-10 20:01:02 +08:00
meson.build first commit 2021-05-10 20:01:02 +08:00
mptable.c first commit 2021-05-10 20:01:02 +08:00
pci.c first commit 2021-05-10 20:01:02 +08:00
printf.c first commit 2021-05-10 20:01:02 +08:00
smbios.c first commit 2021-05-10 20:01:02 +08:00
string.c first commit 2021-05-10 20:01:02 +08:00
tables.c first commit 2021-05-10 20:01:02 +08:00

README

A simple x86 firmware that can boot Linux.

Most of QEMU's startup time is spent:

* in the dynamic linker.  This can be reduced by 150 ms simply by
  compiling a stripped down QEMU:

    ./configure --disable-libssh2 --disable-tcmalloc --disable-glusterfs \
        --disable-seccomp --disable-{bzip2,snappy,lzo} --disable-usb-redir \
        --disable-libusb --disable-smartcard-nss --disable-libnfs  \
        --disable-libiscsi --disable-rbd  --disable-spice --disable-attr \
        --disable-cap-ng --disable-linux-aio --disable-brlapi \
        --disable-vnc-{jpeg,tls,sasl,png,ws} --disable-rdma --disable-bluez \
        --disable-fdt --disable-curl --disable-curses --disable-sdl \
        --disable-gtk  --disable-tpm --disable-vte --disable-vnc  \
        --disable-xen --disable-opengl --target-list=x86_64-softmmu

* in the BIOS.  qboot saves another 150 ms.

* until QEMU 2.7+, in fw_cfg.  qboot uses the DMA interface which is pretty
  much instantaneous.

Compile qboot
=============

Clone the source:

    $ git clone https://github.com/bonzini/qboot.git

Compile the qboot firmware (you may need to install the relevant build
time dependancies):

    $ meson build && ninja -C build

The result will be a 64K file named bios.bin under the build/ directory.

Usage
=====

    $ qemu-kvm -bios bios.bin \
      -kernel /boot/vmlinuz-4.0.3-300.fc22.x86_64 \
      -serial mon:stdio -append 'console=ttyS0,115200,8n1'

TODO
====

* Add the possibility to configure out PIC and PCI bridge initialization