lxbuildenv: sync with current upstream tools

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2018-12-18 17:41:46 +08:00
parent 095d5c8cd7
commit 3f20d25688

View File

@ -310,14 +310,14 @@ def lx_main(args):
print("bin/ directory exists -- remove bin/ directory to re-initialize") print("bin/ directory exists -- remove bin/ directory to re-initialize")
else: else:
bin_tools = { bin_tools = {
'litex_server': 'litex.soc.tools.remote.litex_server', 'mkmscimg': 'litex.soc.tools.mkmscimg:main',
'litex_term': 'litex.soc.tools.litex_term', 'litex_term': 'litex.utils.litex_term:main',
'mkmscimg': 'litex.soc.tools.mkmscimg', 'litex_server': 'litex.utils.litex_server:main',
'litex_sim': 'litex.boards.targets.sim', 'litex_sim': 'litex.utils.litex_sim:main',
'litex_simple': 'litex.boards.targets.simple', 'litex_read_verilog': 'litex.utils.litex_read_verilog:main',
'litex_simple': 'litex.boards.targets.simple:main',
} }
bin_template = """ bin_template = """#!/usr/bin/env python3
#!/usr/bin/env python3
import sys import sys
import os import os
@ -337,6 +337,8 @@ import lxbuildenv
new_bin.write(bin_template) new_bin.write(bin_template)
new_bin.write('from ' + python_module + ' import main\n') new_bin.write('from ' + python_module + ' import main\n')
new_bin.write('main()\n') new_bin.write('main()\n')
import stat
os.chmod('bin' + os.path.sep + bin_name, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
if not args.no_git: if not args.no_git:
lx_git('add', '--chmod=+x', 'bin' + os.path.sep + bin_name) lx_git('add', '--chmod=+x', 'bin' + os.path.sep + bin_name)