Skip to content

Commit

Permalink
[modify] crypto kconfig path to be absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernest committed Jul 18, 2019
1 parent b4afc77 commit ec79e99
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tools/mkdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ 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.crypto') != -1:
position = line.find('../libraries/HAL_Drivers/Kconfig.crypto')
print("position 156: %d"%position)
line = line[0:position] + 'libraries/HAL_Drivers/Kconfig.crypto"\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 +390,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 ec79e99

Please sign in to comment.