• 大小: 40KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-06
  • 语言: 其他
  • 标签: Hi3861  海思  wifi模组  

资源简介

配合博客文章《【填坑】海思wifi平台Hi3861开发(2)》查看更佳,里面提到了boot链接第三方库的问题

资源截图

代码片段和文件信息

#!/usr/bin/env python3
# coding=utf-8

“““
* Copyright (c) HiSilicon Technologies Co. Ltd. 2019-2020. All rights reserved.
* Description: SCons Compile environment init.
* Author: HiSilicon
* Create: 2019-12-31
“““

import os
import sys

from copy import deepcopy
from scons_utils import scons_usr_string_option
from scons_utils import scons_pre_check
from scons_utils import select_added_cfg
from scons_utils import scons_get_cfg_val
from scons_utils import condition_str
from scons_utils import scons_usr_bool_option
from scons_utils import scons_get_cfg_val
from scons_utils import traverse_subdir

#Module to be built by default.
compile_module = [‘drv‘ ‘sys‘ ‘os‘ ‘wpa‘ ‘mbedtls‘ ‘lwip‘ ‘at‘ ‘spiffs‘]

#Get settings from menuconfig
product_soft_ver_str = scons_usr_string_option(‘CONFIG_TARGET_SOFT_VER‘)
log_output_flag = False

#library path for linking
os_lib_path = [
    os.path.join(‘build‘ ‘scripts‘)
    os.path.join(‘build‘ ‘libs‘)
]

#library path for boot linking
os_boot_path = [
    os.path.join(‘build‘ ‘libs‘)
]
“““
module_dir dictionary. Format as
module name : relative directory where the module is located
“““
module_dir = {
    ‘boot‘: os.path.join(‘boot‘ ‘flashboot‘)
    ‘loaderboot‘: os.path.join(‘boot‘ ‘loaderboot‘)
    ‘drv‘: os.path.join(‘platform‘ ‘drivers‘)
    ‘sys‘: os.path.join(‘platform‘ ‘system‘)
    ‘os‘: os.path.join(‘platform‘ ‘os‘ ‘Huawei_LiteOS‘)
    ‘mqtt‘: os.path.join(‘third_party‘ ‘paho.mqtt.c‘)
    ‘mbedtls‘: os.path.join(‘third_party‘ ‘mbedtls‘)
    ‘coap‘: os.path.join(‘third_party‘ ‘libcoap‘)
    ‘at‘: os.path.join(‘components‘ ‘at‘)
    ‘iperf‘: os.path.join(‘components‘ ‘iperf2‘)
    ‘cjson‘: os.path.join(‘third_party‘ ‘cjson‘)
    ‘spiffs‘: os.path.join(‘third_party‘ ‘spiffs‘)
    ‘lwip‘: os.path.join(‘components‘ ‘lwip_sack‘)
    ‘wpa‘: os.path.join(‘platform‘ ‘os‘ ‘Huawei_LiteOS‘ ‘net‘ ‘wpa_supplicant‘)
    ‘hilink‘: os.path.join(‘components‘ ‘hilink‘)
    ‘harmonyos‘: os.path.join(‘components‘ ‘harmonyos‘ ‘kv‘)
}

“““
proj_lib_cfg dictionary contains the sub-folders which includes the source code.
Format as
    module name : {library name:[“folder1“ “folder2“]}
“““
proj_lib_cfg = {
    #flashboot
    ‘boot‘:{ #module name
        ‘boot‘: [ #library name
            ‘startup‘ #source code folders
            os.path.join(‘drivers‘ ‘lsadc‘)
            os.path.join(‘drivers‘ ‘flash‘)
            os.path.join(‘drivers‘ ‘efuse‘)
            os.path.join(‘drivers‘ ‘gpio‘)
            os.path.join(‘drivers‘ ‘io‘)
            os.path.join(‘common‘ ‘nvm‘)
            os.path.join(‘common‘ ‘partition_table‘)
            os.path.join(‘..‘ ‘..‘ ‘third_party‘ ‘u-boot-v2019.07‘ ‘lib‘)
            os.path.join(‘..‘ ‘commonboot‘ ‘efuse‘)
            os.path.join(‘..‘ ‘commonboot‘ ‘flash‘)
            ‘lzmaram‘
            ‘upg‘
            ‘secure‘
        ]
    }
    #loaderboot
    ‘loaderboot‘:{ #module name
        ‘loaderboot‘: [ #librar

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\boot\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\boot\flashboot\
     文件        4230  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\flashboot\Makefile
     文件        6866  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\flashboot\SConscript
     文件        2211  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\flashboot\module_config.mk
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\boot\loaderboot\
     文件        3911  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\loaderboot\Makefile
     文件        6167  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\loaderboot\SConscript
     文件        1747  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\boot\loaderboot\module_config.mk
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\build\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\new\build\scripts\
     文件       31201  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\build\scripts\common_env.py
     文件       14585  2020-09-10 17:19  测试patch_HSCP2020073076109_2020091001\new\build\scripts\scons_env_cfg.py
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\old\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\old\boot\
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\old\boot\flashboot\
     文件        4060  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\flashboot\Makefile
     文件        6675  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\flashboot\SConscript
     文件        2215  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\flashboot\module_config.mk
     目录           0  2020-09-10 09:56  测试patch_HSCP2020073076109_2020091001\old\boot\loaderboot\
     文件        3741  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\loaderboot\Makefile
     文件        5976  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\loaderboot\SConscript
     文件        1751  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\boot\loaderboot\module_config.mk
     目录           0  2020-09-10 09:55  测试patch_HSCP2020073076109_2020091001\old\build\
     目录           0  2020-09-10 09:55  测试patch_HSCP2020073076109_2020091001\old\build\scripts\
     文件       31116  2020-08-07 21:59  测试patch_HSCP2020073076109_2020091001\old\build\scripts\common_env.py
     文件       13988  2020-08-07 21:48  测试patch_HSCP2020073076109_2020091001\old\build\scripts\scons_env_cfg.py

评论

共有 条评论