1 Star 0 Fork 0

kong-ling/configs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
goto_dir.py 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
kong-ling 提交于 2020-01-21 16:46 . fix bugs
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))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kong-ling/configs.git
git@gitee.com:kong-ling/configs.git
kong-ling
configs
configs
master

搜索帮助