Lines Matching full:os

24 import os
31 if not os.path.exists(src):
34 path = os.path.dirname(dst)
36 if not os.path.exists(path):
37 os.makedirs(path)
44 if not os.path.exists(src_dir):
48 if os.path.exists(dst_dir):
77 for parent, dirnames, filenames in os.walk(RTT_ROOT):
86 pathfile = os.path.join(parent, 'Kconfig')
89 pathfile = os.path.join(parent, 'KConfig')
94 do_copy_folder(os.path.join(bsp_root), dist_dir,
98 with open(os.path.join(dist_dir, 'SConstruct'), 'r') as f:
100 with open(os.path.join(dist_dir, 'SConstruct'), 'w') as f:
105 f.write('if not os.getenv("RTT_ROOT"): \n RTT_ROOT="rt-thread"\n\n')
110 if not os.path.isfile(os.path.join(dist_dir, 'Kconfig')):
113 with open(os.path.join(dist_dir, 'Kconfig'), 'r') as f:
115 with open(os.path.join(dist_dir, 'Kconfig'), 'w') as f:
128 if not os.path.isfile(os.path.join(dist_dir, 'Kconfig')):
131 with open(os.path.join(dist_dir, 'Kconfig'), 'r') as f:
133 with open(os.path.join(dist_dir, 'Kconfig'), 'w') as f:
154 scons_env = os.environ.copy()
166 zip_filename = os.path.join(dist_dir)
168 pre_len = len(os.path.dirname(dist_dir))
170 for parent, dirnames, filenames in os.walk(dist_dir):
172 pathfile = os.path.join(parent, filename)
173 arcname = pathfile[pre_len:].strip(os.path.sep)
183 dist_name = os.path.basename(BSP_ROOT)
184 dist_dir = os.path.join(BSP_ROOT, 'dist-strip', dist_name)
185 target_path = os.path.join(dist_dir, 'rt-thread')
187 print('=> %s' % os.path.basename(BSP_ROOT))
191 if os.path.basename(os.path.dirname(BSP_ROOT)) == 'stm32':
193 library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries')
194 library_dir = os.path.join(dist_dir, 'libraries')
195 …bsp_copy_files(os.path.join(library_path, 'HAL_Drivers'), os.path.join(library_dir, 'HAL_Drivers'))
196 …bsp_copy_files(os.path.join(library_path, Env['bsp_lib_type']), os.path.join(library_dir, Env['bsp…
197 shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))
212 libcpu_dir = os.path.join(RTT_ROOT, 'libcpu').lower()
213 libc_dir = os.path.join(RTT_ROOT, 'components', 'libc', 'compilers').lower()
214 sal_dir = os.path.join(RTT_ROOT, 'components', 'net', 'sal_socket').lower()
237 if src[0] == os.sep or src[0] == '/':
240 path = os.path.dirname(src)
241 sub_path = path.split(os.sep)
244 full_path = os.path.join(full_path, item)
250 source_list.append(os.path.join(item, 'SConscript'))
259 if dst[0] == os.sep or dst[0] == '/':
263 dst = os.path.join(target_path, dst)
268 …do_copy_folder(os.path.join(RTT_ROOT, 'tools'), os.path.join(target_path, 'tools'), ignore_pattern…
269 do_copy_file(os.path.join(RTT_ROOT, 'Kconfig'), os.path.join(target_path, 'Kconfig'))
270 do_copy_file(os.path.join(RTT_ROOT, 'AUTHORS'), os.path.join(target_path, 'AUTHORS'))
271 do_copy_file(os.path.join(RTT_ROOT, 'COPYING'), os.path.join(target_path, 'COPYING'))
272 do_copy_file(os.path.join(RTT_ROOT, 'README.md'), os.path.join(target_path, 'README.md'))
273 do_copy_file(os.path.join(RTT_ROOT, 'README_zh.md'), os.path.join(target_path, 'README_zh.md'))
275 print('=> %s' % os.path.join('components', 'libc', 'compilers'))
276 …do_copy_folder(os.path.join(RTT_ROOT, 'components', 'libc', 'compilers'), os.path.join(target_path…
279 print('=> %s' % os.path.join('components', 'net', 'sal_socket'))
280 …do_copy_folder(os.path.join(RTT_ROOT, 'components', 'net', 'sal_socket'), os.path.join(target_path…
284 print('=> %s' % (os.path.join('libcpu', rtconfig.ARCH, rtconfig.CPU)))
285 …do_copy_folder(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, rtconfig.CPU), os.path.join(target_…
286 if os.path.exists(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, 'common')):
287 print('=> %s' % (os.path.join('libcpu', rtconfig.ARCH, 'common')))
288 …do_copy_folder(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH, 'common'), os.path.join(target_path…
289 …do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'Kconfig'), os.path.join(target_path, 'libcpu', 'Kco…
290 …do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'SConscript'), os.path.join(target_path, 'libcpu', '…
308 dist_name = os.path.basename(BSP_ROOT)
309 dist_dir = os.path.join(BSP_ROOT, 'dist', dist_name)
311 target_path = os.path.join(dist_dir, 'rt-thread')
314 print('=> %s' % os.path.basename(BSP_ROOT))
318 if os.path.basename(os.path.dirname(BSP_ROOT)) == 'stm32':
320 library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries')
321 library_dir = os.path.join(dist_dir, 'libraries')
322 …bsp_copy_files(os.path.join(library_path, 'HAL_Drivers'), os.path.join(library_dir, 'HAL_Drivers'))
323 …bsp_copy_files(os.path.join(library_path, Env['bsp_lib_type']), os.path.join(library_dir, Env['bsp…
324 shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))
334 do_copy_folder(os.path.join(RTT_ROOT, 'components'), os.path.join(target_path, 'components'))
341 do_copy_folder(os.path.join(RTT_ROOT, 'include'), os.path.join(target_path, 'include'))
346 …do_copy_folder(os.path.join(RTT_ROOT, 'libcpu', rtconfig.ARCH), os.path.join(target_path, 'libcpu'…
347 …do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'Kconfig'), os.path.join(target_path, 'libcpu', 'Kco…
348 …do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'SConscript'), os.path.join(target_path, 'libcpu', '…
352 do_copy_folder(os.path.join(RTT_ROOT, 'src'), os.path.join(target_path, 'src'))
356 …do_copy_folder(os.path.join(RTT_ROOT, 'tools'), os.path.join(target_path, 'tools'), ignore_pattern…
358 do_copy_file(os.path.join(RTT_ROOT, 'Kconfig'), os.path.join(target_path, 'Kconfig'))
359 do_copy_file(os.path.join(RTT_ROOT, 'AUTHORS'), os.path.join(target_path, 'AUTHORS'))
360 do_copy_file(os.path.join(RTT_ROOT, 'COPYING'), os.path.join(target_path, 'COPYING'))
361 do_copy_file(os.path.join(RTT_ROOT, 'README.md'), os.path.join(target_path, 'README.md'))
362 do_copy_file(os.path.join(RTT_ROOT, 'README_zh.md'), os.path.join(target_path, 'README_zh.md'))