[Python] Trying to install the edk2-rk3399 code but the script fails because some (minor) bug

Discussão em 'Python' iniciado por Stack, Agosto 17, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to install the "Rockchip RK3399 UEFI Firmware" that I found here :

    https://github.com/mouseos/edk2-rk3399

    on my KHADAS Edge-V (and on my RockPro64 RK3399) because I'm building a FreeBSD modular phone and I've chosen this board as the main board. I can't use u-boot because it does not support the screen that I've bought (a 4 inches 720x720 display),but I've been able to use it using the Jared McNeill UEFI for the Rockchip RK356X.

    I think I have good chances to use it also with the RockChip RK3399. But only if someone can help me,I presume,to fix a bug in the code. I want to clarify that I don't want to steal your time. I ask for your help only because I presume that the bug is easy to fix (it seems only a matter of using lowercase or uppercase in the *.c files),but if you find more problems,feel free to don't help...

    The script fails to produce the file "SDM845PKG_UEFI.fd".

    I will show you :

    .....
    test_build___init__ (CheckPythonSyntax.Tests) ... ok
    test_build_build (CheckPythonSyntax.Tests) ... ok
    test_sitecustomize (CheckPythonSyntax.Tests) ... ok
    test32bitUnicodeCharInUtf8Comment (CheckUnicodeSourceFiles.Tests) ... ok
    test32bitUnicodeCharInUtf8File (CheckUnicodeSourceFiles.Tests) ... ok
    testSupplementaryPlaneUnicodeCharInUtf16File (CheckUnicodeSourceFiles.Tests) ... ok
    testSurrogatePairUnicodeCharInUtf16File (CheckUnicodeSourceFiles.Tests) ... ok
    testSurrogatePairUnicodeCharInUtf8File (CheckUnicodeSourceFiles.Tests) ... ok
    testSurrogatePairUnicodeCharInUtf8FileWithBom (CheckUnicodeSourceFiles.Tests) ... ok
    testUtf16InUniFile (CheckUnicodeSourceFiles.Tests) ... ok
    testValidUtf8File (CheckUnicodeSourceFiles.Tests) ... ok
    testValidUtf8FileWithBom (CheckUnicodeSourceFiles.Tests) ... ok

    ----------------------------------------------------------------------
    Ran 280 tests in 0.685s

    OK
    make[1]: uscita dalla directory «/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Tests»
    make: uscita dalla directory «/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools»
    + rm -f boot_polaris.img uefi_img
    + rm -f workspace/Build/sdm845Pkg/DEBUG_GCC5/FV/SDM845PKG_UEFI.fd
    + GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
    + build -s -n 0 -a AARCH64 -t GCC5 -p sdm845Pkg/polaris.dsc -b DEBUG
    Build environment: Linux-5.15.0-139-generic-x86_64-with-glibc2.29
    Build start time: 22:43:58, Aug.15 2025

    WORKSPACE = /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/workspace
    PACKAGES_PATH = /home/marietto/Scaricati/workspace-edk2/edk2:/home/marietto/Scaricati/workspace-edk2/edk2-platforms:/home/marietto/Scaricati/workspace-edk2/edk2-rk3399
    EDK_TOOLS_PATH = /home/marietto/Scaricati/workspace-edk2/edk2/BaseTools
    CONF_PATH = /home/marietto/Scaricati/workspace-edk2/edk2/Conf
    PYTHON_COMMAND = /usr/bin/python3.8


    Architecture(s) = AARCH64
    Build target = DEBUG
    Toolchain = GCC5

    Active Platform = /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/polaris.dsc

    Processing meta-data ..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

    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/Common/caching.py", line 28, in get
    Value = obj.dict[self._function.name] = self._function(obj)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py", line 980, in AutoGenFileList
    GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, AutoGenUniIdf, UniStringBinBuffer, StringIdf, AutoGenUniIdf, IdfGenBinBuffer)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/GenC.py", line 2032, in CreateCode
    CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/GenC.py", line 1582, in CreateProtocolDefinitionCode
    if Info.ProtocolList:
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/Common/caching.py", line 28, in get
    Value = obj.dict[self._function.name] = self._function(obj)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py", line 1091, in ProtocolList
    RetVal = OrderedDict(self.Module.Protocols)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/Common/caching.py", line 28, in get
    Value = obj.dict[self._function.name] = self._function(obj)
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/Workspace/InfBuildData.py", line 604, in Protocols
    EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
    File "/home/marietto/Scaricati/workspace-edk2/edk2/BaseTools/Source/Python/Common/EdkLogger.py", line 284, in error
    raise FatalError(ErrorCode)
    Common.BuildToolError.FatalError: 16384
    .build: : warning: Module MetaFile [Sources] is missing local header!
    Local Header: /home/marietto/scaricati/workspace-edk2/edk2-rk3399/sdm845pkg/sdm845dxe/sdm845dxe.h not found in /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/sdm845Dxe/sdm845Dxe.inf


    - Done -
    Build end time: 22:44:01, Aug.15 2025
    Build total time: 00:00:02

    + echo 'Build done. check workspace/Build/sdm845Pkg/DEBUG_GCC5/FV/SDM845PKG_UEFI.fd Use it as a Linux kernel'
    Build done. check workspace/Build/sdm845Pkg/DEBUG_GCC5/FV/SDM845PKG_UEFI.fd Use it as a Linux kernel


    the file SDM845PKG_UEFI.fd IS NOT produced because of this error ?


    —-> Local Header: /home/marietto/scaricati/workspace-edk2/edk2-rk3399/sdm845pkg/sdm845dxe/sdm845dxe.h not found in /home/marietto/Scaricati/workspace-edk2/edk2-rk3399/sdm845Pkg/sdm845Dxe/sdm845Dxe.inf
    ​

    The missing file is on the right place,but is called differently : "sdm845dxe.inf"

    [​IMG]

    I tried to rename it,but I entered a loop of other files that are named incorrectly. I changed their names too,but probably I did it in the wrong way because I still see errors.

    Very thanks.

    Continue reading...

Compartilhe esta Página