编译edk2-rk3399代码生成SDM845PKG_UEFI.fd失败,请求技术支持
编译edk2-rk3399代码生成SDM845PKG_UEFI.fd失败,请求技术支持
大家好,我正在为KHADAS Edge-V和RockPro64 RK3399开发板编译Rockchip RK3399 UEFI固件,用来搭建FreeBSD模块化手机。之所以放弃U-boot选择这款UEFI,是因为U-boot不支持我买的4英寸720x720显示屏,但之前用Jared McNeill的RK356X UEFI能正常驱动这个屏幕,所以觉得这款RK3399的UEFI固件应该也能适配,只是代码里可能有个小问题需要帮忙修复——我怀疑只是.c文件或路径里的大小写问题?先说明下,我不想占用大家太多时间,如果问题比我预想的复杂,不用勉强帮忙~
目前我遇到的核心问题是:编译脚本无法生成SDM845PKG_UEFI.fd文件。下面是我在全新Ubuntu 20.04系统上的完整操作步骤,以及编译过程中的关键输出和报错信息:
我的操作步骤
我在全新Ubuntu 20.04上执行了以下命令:
# 更新系统并安装编译依赖 sudo apt update sudo apt install build-essential uuid-dev iasl git nasm python3-distutils gcc-aarch64-linux-gnu # 创建工作区并拉取代码仓库 mkdir workspace-edk2 cd workspace-edk2 git clone https://github.com/tianocore/edk2.git -b edk2-stable201911 --recursive --depth=1 git clone https://github.com/tianocore/edk2-platforms.git -o cfdc7f907d545b14302295b819ea078bc36c6a40 --recursive --depth=1 git clone https://github.com/edk2-porting/edk2-rk3399.git # 进入代码目录启动编译脚本 cd edk2-rk3399 bash build.sh --device polaris
编译过程中的输出与报错
编译前期的测试环节全部通过:
---------------------------------------------------------------------- Ran 280 tests in 0.685s OK
但随后出现了两个路径相关的警告,我怀疑这和Linux系统的大小写敏感特性有关:
build: : warning: Module MetaFile [Sources] is missing local header! Local Header: /home/marietto/scaricati/workspace-edk2/edk2-rk3399/sdm845pkg/library/platformbootmanagerlib/platformbm.h not found in /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf build: : warning: Module MetaFile [Sources] is missing local header! Local Header: /home/marietto/scaricati/workspace-edk2/edk2/embeddedpkg/application/androidfastboot/androidfastbootapp.h not found in /home/marietto/Scaricati/workspace-edk2/edk2/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
可以看到警告里的路径用了全小写(比如sdm845pkg、embeddedpkg),但实际文件路径是大小写混合的(sdm845Pkg、EmbeddedPkg),这应该就是找不到文件的直接原因。
最后出现了致命错误,直接导致编译终止:
build.py... /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/Drivers/DwEmmcDxe/DwEmmcDxe.inf(-1): error 4000: Value of Protocol [gEmbeddedMmcHostProtocolGuid] is not found under [Protocols] section in /home/marietto/Scaricati/workspace-edk2/edk2/EmbeddedPkg/EmbeddedPkg.dec /home/marietto/Scaricati/workspace-edk2/edk2/MdePkg/MdePkg.dec /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/Drivers/DwEmmcDxe/DwEmmcDxe.dec /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/sdm845Pkg.dec Traceback (most recent call last): File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 244, in run Ma.CreateCodeFile(False) File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py", line 1867, in CreateCodeFile for File in self.AutoGenFileList: File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py", line 1582, in AutoGenFileList self.GenMakefile() ...(后续Traceback内容省略)
希望有大佬能帮忙看看,先解决那个大小写路径不匹配的问题,再看看Protocol找不到的错误怎么处理,非常感谢!
内容来源于stack exchange
相关产品推荐
相关产品推荐

