qemu编译安装&&运行COREBOOT 记录

1.下载qemu源码

wget https://download.qemu.org/qemu-4.1.0.tar.xz
或5.0版本
wget https://download.qemu.org/qemu-5.0.0-rc3.tar.xz
tar xvJf qemu-4.1.0.tar.xz
cd qemu-4.1.0
./configure
make

2.安装编译工具(CENTOS7)

yum install gcc
yum install autoconf automake libtoo

3.安装编译工具(ubuntu 18.10)

apt-get install pkg-config
apt install autoconf automake gcc
sudo apt-get install zlib1g-dev
sudo apt-get install libglib2.0-0
sudo apt-get install libglib2.0-dev
apt-get install libpixman-1-dev

4.编译QEMU源码

cd qemu
./configure --target-list=i386-softmmu --enable-debug
make -j4
等待编译完成 大约 1hour
make install

5.编译COREBOOT包含seabios

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
把工具与文件放在同一个目录

6.QEMU加载COREBOOT

#qemu-system-i386 -nographic -bios /20200410/coreboot/build/coreboot.rom
在这里插入图片描述

coreboot-4.11-2099-g00058f513e-dirty Wed Apr 8 21:45:11 UTC 2020 ramstage starting (log level: 7)…
BS: BS_DEV_INIT_CHIPS run times (exec / console): 1 / 0 ms
Enumerating buses…
Root Device scanning…
CPU_CLUSTER: 0 enabled
DOMAIN: 0000 enabled
CPU_CLUSTER: 0 scanning…
QEMU: firmware config interface detected
Firmware config version id: 3
QEMU: max_cpus is 1
CPU: APIC: 00 enabled
scan_bus: bus CPU_CLUSTER: 0 finished in 6 msecs
DOMAIN: 0000 scanning…
PCI: pci_scan_bus for bus 00
PCI: 00:00.0 [8086/1237] enabled
PCI: 00:01.0 [8086/7000] enabled
PCI: 00:01.1 [8086/7010] enabled
PCI: 00:01.3 [8086/7113] enabled
PCI: 00:02.0 [1234/1111] enabled
PCI: 00:03.0 [8086/100e] enabled
PCI: 00:01.0 scanning…
scan_bus: bus PCI: 00:01.0 finished in 0 msecs
PCI: 00:01.3 scanning…
scan_bus: bus PCI: 00:01.3 finished in 0 msecs
scan_bus: bus DOMAIN: 0000 finished in 15 msecs
scan_bus: bus Root Device finished in 25 msecs
done
BS: BS_DEV_ENUMERATE run times (exec / console): 22 / 10 ms
found VGA at PCI: 00:02.0
Setting up VGA for PCI: 00:02.0
Setting PCI_BRIDGE_CTL_VGA for bridge DOMAIN: 0000
Setting PCI_BRIDGE_CTL_VGA for bridge Root Device
Allocating resources…
Reading resources…
QEMU: e820/ram: 0x00000000 + 0x08000000
QEMU: reserve ioports 0x0510-0x0511 [firmware-config]
QEMU: reserve ioports 0x5658-0x5658 [vmware-port]
QEMU: reserve ioports 0xae00-0xae0f [pci-hotplug]
QEMU: reserve ioports 0xaf00-0xaf1f [cpu-hotplug]
QEMU: reserve ioports 0xafe0-0xafe3 [piix4-gpe0]
Done reading resources.
Setting resources…
PCI: 00:01.1 20 <- [0x0000005840 - 0x000000584f] size 0x00000010 gran 0x04 io
PCI: 00:02.0 10 <- [0x00fd000000 - 0x00fdffffff] size 0x01000000 gran 0x18 prefmem
PCI: 00:02.0 18 <- [0x00fe070000 - 0x00fe070fff] size 0x00001000 gran 0x0c mem
PCI: 00:02.0 30 <- [0x00fe060000 - 0x00fe06ffff] size 0x00010000 gran 0x10 romem
PCI: 00:03.0 10 <- [0x00fe040000 - 0x00fe05ffff] size 0x00020000 gran 0x11 mem
PCI: 00:03.0 14 <- [0x0000005800 - 0x000000583f] size 0x00000040 gran 0x06 io
PCI: 00:03.0 30 <- [0x00fe000000 - 0x00fe03ffff] size 0x00040000 gran 0x12 romem
Done setting resources.
Done allocating resources.
BS: BS_DEV_RESOURCES run times (exec / console): 41 / 22 ms
Enabling resources…
PCI: 00:00.0 cmd <- 00
PCI: 00:01.0 cmd <- 00
PCI: 00:01.1 cmd <- 01
PCI: 00:01.3 cmd <- 00
PCI: 00:02.0 cmd <- 03
PCI: 00:03.0 cmd <- 03
done.
BS: BS_DEV_ENABLE run times (exec / console): 7 / 2 ms
Initializing devices…
Root Device init
Root Device init finished in 0 msecs
CPU_CLUSTER: 0 init
Initializing CPU #0
CPU: vendor Intel device 663
CPU: family 06, model 06, stepping 03
Setting up local APIC…
apic_id: 0x00 done.
CPU #0 initialized

猜你喜欢

转载自blog.csdn.net/crystal_li_9/article/details/106007313