代码拉取完成,页面将自动刷新
import os
import sys
import argparse
folders = []
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--project', default='e21', help='project info')
args = parser.parse_args()
print(args.project)
if 'e21' in args.project:
target = 'freedom_e21-oe-linux'
elif 'u540' in args.project:
target = 'freedom_u540-oe-linux'
elif 'boot' in args.project:
target = 'freedom_u540-c000-bootloader'
else:
target = 'freedom_e21-oe-linux'
WORK_DIR = '%s/SiFive-OE/riscv-sifive/build/tmp-glibc/work/%s/u-boot/1_2019.07-r0' % (os.getenv('HOME'), target)
print('Current dir:%s' % os.getcwd())
print('Work dir:%s' % WORK_DIR)
#for root, dirs, files in os.walk(os.getcwd()):
#for root, dirs, files in os.walk(WORK_DIR):
# for dir in dirs:
# full_path = os.path.join(root, dir)
# #b,f = os.path.splitext(full_path)
# ##if '.git' in f:
# #print(f)
# if full_path not in folders:
# folders.append(full_path)
#
#for i in range(len(folders)):
# print('%5d: %s' % (i, folders[i]))
#
#target_folder = int(raw_input('Select the target folder index:'))
#print(target_folder)
#os.chdir(folders[target_folder])
u_boot_dirs = [
'build',
'build/arch/riscv/dts',
'git',
'temp'
]
os.system('ls %s' % WORK_DIR)
for d in u_boot_dirs:
print('%s/%s' % (WORK_DIR, d))
u_boot_files = [
'riscv-sifive/meta-sifive/conf/machine/freedom-u540.conf',
'riscv-sifive/meta-sifive/wic/freedom-u540-fsbl-opensbi.wks'
]
for f in u_boot_files:
print('%s' % (f))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。