centos7
[root@localhost ~]# uname -a Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxedk2源码地址
地址:mirrors / tianocore / edk2 · CODE CHINA
下载发行版本:edk2-stable202108 · mirrors / tianocore / edk2 · CODE CHINA
下载【资源】内的一个和【其他】内的前7个
编译1、将下载的edk2-edk2-stable202108.tar.gz解压
tar -xzvf edk2-edk2-stable202108.tar.gz
2.将下载的【其他】7个zip包复制到解压的后的文件夹edk2-edk2-stable202108中
3.进入edk2-edk2-stable202108文件夹解压【其他】七个软件包
4.下载nasm和iasl和编译EDKII所需的基本工具。
For MS Windows, prebuilt binaries of the base tools are shipped with the source; on Ubuntu the base tools required for building EDKII need to be built first.
$ yum install nasm iasl $ make -C baseTools
5. 建立构建环境
You need to set EDK_TOOLS_PATH and set up the build environment by running the edksetup.sh script provided in the source. This script will copy template and configuration files to edk2/Conf directory.
$ . edksetup.sh
6.修改Conf/target.txt文件
$ vim Conf/target.txt Find ACTIVE_PLATFORM = Nt32Pkg/Nt32Pkg.dsc and replace it with ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc Find TOOL_CHAIN_TAG = MYTOOLS and replace it with your version on GCC here for example GCC 4.6 will be used. TOOL_CHAIN_TAG = GCC48 Find TARGET_ARCH = IA32 and replace it with 'X64' for 64bit or 'IA32 X64' to build both architectures. TARGET_ARCH = X64 注:根据实际情况进行修改 TOOL_CHAIN_TAG为本环境的GCC版本。
7.Build OvmfPkg
执行如下命令
$ build
On an i7 with 16GB RAM the total build time is less than 30 seconds.
The firmware image produced will be located in Build/OvmfX64/DEBUG_GCC46/FV/OVMF.fd.
If you'd like debug output on the serial console, use the DEBUG_ON_SERIAL_PORT option:
$ build -DDEBUG_ON_SERIAL_PORT=TRUE
8.生成的固件路径为:/OvmfX64/DEBUG_GCC46/FV/OVMF.fd
编译完毕的OVMF.fd文件:OVMF1124.fd-Linux文档类资源-CSDN下载
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)