Skip to content

Commit ec79e99

Browse files
author
Ernest
committed
[modify] crypto kconfig path to be absolute
1 parent b4afc77 commit ec79e99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tools/mkdist.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,21 @@ def bsp_update_kconfig_library(dist_dir):
141141
found = 0
142142
f.write(line)
143143

144+
def bsp_update_kconfig_library_crypto(dist_dir):
145+
# change RTT_ROOT in Kconfig
146+
if not os.path.isfile(os.path.join(dist_dir, 'board/Kconfig')):
147+
return
148+
149+
with open(os.path.join(dist_dir, 'board/Kconfig'), 'r') as f:
150+
data = f.readlines()
151+
with open(os.path.join(dist_dir, 'board/Kconfig'), 'w') as f:
152+
for line in data:
153+
if line.find('../libraries/HAL_Drivers/Kconfig.crypto') != -1:
154+
position = line.find('../libraries/HAL_Drivers/Kconfig.crypto')
155+
print("position 156: %d"%position)
156+
line = line[0:position] + 'libraries/HAL_Drivers/Kconfig.crypto"\n'
157+
f.write(line)
158+
144159
def bs_update_ide_project(bsp_root, rtt_root, rttide = None):
145160
import subprocess
146161
# default update the projects which have template file
@@ -375,6 +390,7 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None):
375390
# change RTT_ROOT in Kconfig
376391
bsp_update_kconfig(dist_dir)
377392
bsp_update_kconfig_library(dist_dir)
393+
bsp_update_kconfig_library_crypto(dist_dir)
378394

379395
# update all project files
380396
if rttide == None:

0 commit comments

Comments
 (0)