18.04编译msm8953_64 android 7.1.1 SecImage 报错处理

[  0% 3/74805] Generating signed appsbl using secimage tool for msm8937
FAILED: /bin/bash -c "(rm -rf out/target/product/msm8937_64/signed ) && (SECIMAGE_LOCAL_DIR=vendor/qcom/proprietary/common/scripts/SecImage USES_SEC_POLICY_MULTIPLE_DEFAULT_SIGN=1 USES_SEC_POLICY_DEFAULT_SUBFOLDER_SIGN= USES_SEC_POLICY_INTEGRITY_CHECK=1 python vendor/qcom/proprietary/common/scripts/SecImage/sectools_builder.py -i out/target/product/msm8937_64/emmc_appsboot.mbn -t vendor/qcom/proprietary/common/scripts/SecImage/signed -g appsbl --config=vendor/qcom/proprietary/common/scripts/SecImage/config/integration/secimage.xml --install_base_dir=out/target/product/msm8937_64 > out/target/product/msm8937_64/secimage.log 2>&1 ) && (echo Completed secimage signed appsbl \\(logs in out/target/product/msm8937_64/secimage.log\\) )"
ninja: build stopped: subcommand failed.
 

$ cat out/target/product/msm8937_64/secimage.log

[33mWARNING: Openssl: Not Found[39m
Traceback (most recent call last):
  File "vendor/qcom/proprietary/common/scripts/SecImage/sectools_builder.py", line 29, in
    from sectools.features.isc.builder import scons_secimage_builder
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/__init__.py", line 26, in
    from sectools.features.isc import defines, stager
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/stager/__init__.py", line 89, in
    from image_paths_stager import ImagePathsStager
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/stager/image_paths_stager.py", line 19, in
    from sectools.features.isc.cfgparser import ConfigParser
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/cfgparser/__init__.py", line 20, in
    import defines as defines
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/cfgparser/defines.py", line 22, in
    from sectools.features.isc.parsegen.config.defines import CONFIG_KEY_IMAGE_TYPE, \
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/__init__.py", line 44, in
    from sectools.features.isc.parsegen import bin
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/bin.py", line 14, in
    from sectools.features.isc.parsegen.base import SecParseGenBase
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/features/isc/parsegen/base.py", line 20, in
    from sectools.common.crypto import ecdsa as ecdsa_functions
  File "/root/LA.UM.5.6_CUSTOMER/vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/__init__.py", line 24, in
    from sectools.common.crypto import functions
ImportError: cannot import name functions
解决方法:

将vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/__init__.py 出问题的第24行注释掉;

-from sectools.common.crypto import functions
+#from sectools.common.crypto import functions
 

后来在SecImage模块中陆续报错,相应修改了如下几项:

vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/functions/rsa/__init__.py 第18行

-from sectools.common.crypto import utils
+from sectools.common.crypto.functions import utils

vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/functions/rsa/openssl.py 第14行

-from sectools.common.crypto import utils
+from sectools.common.crypto.functions import utils

将 vendor/qcom/proprietary/common/scripts/SecImage/sectools/common/crypto/functions/utils/__init__.py 中

FORMAT_DER = 'der'
FORMAT_PEM = 'pem'

定义从 class UtilsBase内部提出来,放在__init__.py文件中定义;

--- a/SecImage/sectools/common/crypto/functions/utils/__init__.py
+++ b/SecImage/sectools/common/crypto/functions/utils/__init__.py
@@ -16,6 +16,8 @@ import subprocess

from sectools.common.crypto.functions import FuncImplDiscovery, FUNC_UTILS
 
+FORMAT_DER = 'der'
+FORMAT_PEM = 'pem'
 
 class UtilsImplDiscovery(FuncImplDiscovery):
 
@@ -41,9 +43,6 @@ class UtilsImplDiscovery(FuncImplDiscovery):
 
 class UtilsBase(object):
 
-    FORMAT_DER = 'der'
-    FORMAT_PEM = 'pem'
-
     FORMATS_SUPPORTED = [FORMAT_DER, FORMAT_PEM]

等等,SecImage有较多类似import 报错,起处理方式类似;

你可能感兴趣的:(18.04编译msm8953_64 android 7.1.1 SecImage 报错处理)