Skip to content

Commit

Permalink
[dist][modify] crypto kconfig path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernest committed Jul 18, 2019
1 parent b4afc77 commit 35dc162
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/mkdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ def bsp_update_kconfig_library(dist_dir):
found = 0
f.write(line)

def bsp_update_kconfig_library_crypto(dist_dir):
# change RTT_ROOT in Kconfig
if not os.path.isfile(os.path.join(dist_dir, 'board/Kconfig')):
return

with open(os.path.join(dist_dir, 'board/Kconfig'), 'r') as f:
data = f.readlines()
with open(os.path.join(dist_dir, 'board/Kconfig'), 'w') as f:
for line in data:
if line.find('../libraries/HAL_Drivers/Kconfig') != -1:
position = line.find('../libraries/HAL_Drivers/Kconfig')
line = line[0:position] + 'libraries/HAL_Drivers/Kconfig"\n'
f.write(line)

def bs_update_ide_project(bsp_root, rtt_root, rttide = None):
import subprocess
# default update the projects which have template file
Expand Down Expand Up @@ -375,6 +389,7 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None):
# change RTT_ROOT in Kconfig
bsp_update_kconfig(dist_dir)
bsp_update_kconfig_library(dist_dir)
bsp_update_kconfig_library_crypto(dist_dir)

# update all project files
if rttide == None:
Expand Down

0 comments on commit 35dc162

Please sign in to comment.