EDKII 环境配置
ysh One

环境准备

1
2
3
4
5
6
7
8
9
10
11
12
git clone --recursive https://github.com/tianocore/edk2.git
sudo apt install gcc make uuid-dev g++ nasm iasl
cd edk2
make -C BaseTools
./edksetup.sh BaseTools
vim Conf/target.txt
ACTIVE_PLATFORM= OvmfPkg/OvmfPkgX64.dsc
TARGET_ARCH = X64
TOOL_CHAIN_TAG = GCC5
source edksetup.sh
build
# the target should be in edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd

Run On Qemu

1
2
3
4
5
6
7
8
9
10
11
apt-get install qemu
mkdir run-ovmf
cd run-ovmf
mkdir hda-contents
cp edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd bios.bin
qemu-system-x86_64 -pflash bios.bin \
-hda fat:rw:hda-contents \
-net none \
-debugcon file:debug.log \
-global isa-debugcon.iobase=0x402 \
-nographic
Powered by Hexo & Theme Keep