0e254652aa
* add:air105 bsp * add:去掉注释代码 * add:注释修改 * fix:格式化一遍代码格式 * add:main函数添加闪灯 * add:完善bsp * add:添加一些信息 * add:使用工作队列喂狗 * add:整理目录 * add:去掉乱码部分 * add:修改readme * add:更新readme说明 * add:去掉bootloader.bin和soc_download.exe,README.md中添加标注 * fix:去除多余文件 * add:补充license * add:支持scons --dist * add:更新soc_download.exe连接地址
30 lines
909 B
Python
30 lines
909 B
Python
|
|
import os
|
|
import sys
|
|
import shutil
|
|
import urllib
|
|
|
|
out_path='./'
|
|
bin_file_name='rtthread.bin'
|
|
pack_path='./pack'
|
|
out_file='./rtthread_air105'
|
|
|
|
cwd_path = os.getcwd()
|
|
if __name__=='__main__':
|
|
|
|
print(cwd_path)
|
|
if os.path.exists(out_file+'.soc'):
|
|
os.remove(out_file+'.soc')
|
|
|
|
if not os.path.exists(pack_path+'/bootloader.bin'):
|
|
urllib.urlretrieve("http://cdndownload.openluat.com/rt-thread/airm2m/air105/bootloader.bin", pack_path+'/bootloader.bin')
|
|
|
|
if not os.path.exists(pack_path+'/soc_download.exe'):
|
|
urllib.urlretrieve("http://cdndownload.openluat.com/rt-thread/airm2m/air105/soc_download.exe", pack_path+'/soc_download.exe')
|
|
|
|
shutil.copy(out_path+bin_file_name, pack_path+'/'+bin_file_name)
|
|
shutil.make_archive(out_file, 'zip', root_dir=pack_path)
|
|
os.remove(pack_path+'/'+bin_file_name)
|
|
os.rename(out_file+'.zip',out_file+'.soc')
|
|
print('end')
|