Files
linux-kernel-module-cheat/run-toolchain
Ciro Santilli 六四事件 法轮功 a8b6f758ba split --prebuilt and --host into --gcc-which and --qemu-which
Only one --host exists at ./build-modules, since that can select the host
kernel, which is independent from the toolchain.

Document that user mode simulation stopped working.
2019-02-16 00:00:00 +00:00

51 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
import os
import sys
import common
from shell_helpers import LF
parser = self.get_argparse(argparse_args={
'description': '''Run a Buildroot ToolChain tool like readelf or objdump.
For example, to get some information about the arm vmlinux:
....
./%(prog)s readelf -- -e "$(./getvar vmlinux)"
....
Get the list of available tools with:
....
ls "$(./getvar -a arm buildroot_host_bin_dir)"
....
'''
})
parser.add_argument(
'--dry',
help='Just output the tool path to stdout but actually run it',
)
parser.add_argument('tool', help='Which tool to run.')
parser.add_argument(
'extra_args',
default=[],
help='Extra arguments for the tool.',
metavar='extra-args',
nargs='*'
)
args = self.setup(parser)
if kwargs['baremetal'] is None:
image = kwargs['vmlinux']
else:
image = kwargs['image']
tool= self.get_toolchain_tool(kwargs['tool'])
if kwargs['dry']:
print(tool)
else:
sys.exit(self.sh.run_cmd(
[tool, LF]
+ self.sh.add_newlines(kwargs['extra_args']),
cmd_file=os.path.join(kwargs['run_dir'], 'run-toolchain.sh'),
))