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 9058fb2 commit 7f83ac0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/mkdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def bsp_update_kconfig(dist_dir):

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

with open(os.path.join(dist_dir, 'Kconfig'), 'r') as f:
Expand All @@ -141,6 +141,16 @@ def bsp_update_kconfig_library(dist_dir):
found = 0
f.write(line)

# change board/kconfig path
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

0 comments on commit 7f83ac0

Please sign in to comment.