summaryrefslogtreecommitdiff
path: root/tools/mkdist.py
diff options
context:
space:
mode:
authorliang yongxiang <[email protected]>2018-08-03 19:47:24 +0800
committerliang yongxiang <[email protected]>2018-08-03 19:47:24 +0800
commitb2efa8eeff27db7ec7169ea9160ed3df2908bd5a (patch)
treee3abc1be0f40da203ccf675839faaed47fb3d134 /tools/mkdist.py
parent981afddee307ce039bbb1fdcd876418655f99412 (diff)
[tools] update 'scons --dist-strip': copy all sal_socket and add more info to libcpu
Diffstat (limited to 'tools/mkdist.py')
-rw-r--r--tools/mkdist.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/mkdist.py b/tools/mkdist.py
index 40a3928b13..eef6bfd118 100644
--- a/tools/mkdist.py
+++ b/tools/mkdist.py
@@ -178,6 +178,8 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
target_list = []
libcpu_dir = os.path.join(RTT_ROOT, 'libcpu').lower()
libc_dir = os.path.join(RTT_ROOT, 'components', 'libc', 'compilers').lower()
+ sal_dir = os.path.join(RTT_ROOT, 'components', 'net', 'sal_socket').lower()
+ sources_include_sal = False
for src in source_list:
if src.lower().startswith(BSP_ROOT.lower()):
continue
@@ -187,6 +189,9 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
continue
if src.lower().startswith(libc_dir):
continue
+ if src.lower().startswith(sal_dir):
+ sources_include_sal = True
+ continue
if src.lower().startswith(RTT_ROOT.lower()):
target_list.append(src)
@@ -237,11 +242,16 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
print('=> %s' % os.path.join('components', 'libc', 'compilers'))
do_copy_folder(os.path.join(RTT_ROOT, 'components', 'libc', 'compilers'), os.path.join(target_path, 'components', 'libc', 'compilers'))
+ if sources_include_sal:
+ print('=> %s' % os.path.join('components', 'net', 'sal_socket'))
+ do_copy_folder(os.path.join(RTT_ROOT, 'components', 'net', 'sal_socket'), os.path.join(target_path, 'components', 'net', 'sal_socket'))
+
# copy all libcpu/ARCH directory
- print('=> libcpu')
import rtconfig
+ print('=> %s' % (os.path.join('libcpu', rtconfig.ARCH, rtconfig.CPU)))
do_copy_folder(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, rtconfig.CPU), os.path.join(target_path, 'libcpu', rtconfig.ARCH, rtconfig.CPU))
if os.path.exists(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, 'common')):
+ print('=> %s' % (os.path.join('libcpu', rtconfig.ARCH, 'common')))
do_copy_folder(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, 'common'), os.path.join(target_path, 'libcpu', rtconfig.ARCH, 'common'))
do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'Kconfig'), os.path.join(target_path, 'libcpu', 'Kconfig'))
do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'SConscript'), os.path.join(target_path, 'libcpu', 'SConscript'))