Build the Linux kernel independently from Buildroot

This will allow for other types of root filesystems that don't rely on Buildroot
to be added and used in the future.

Propagate --verbose on all build scripts to see full GCC commands.

build-all: allow for neat subsets

also 9p share rootfs_overlay. TODO document.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-09-28 08:31:38 +01:00
parent e8cd0caa9e
commit bc73cebff1
27 changed files with 942 additions and 214 deletions

View File

@@ -44,15 +44,17 @@ def main(args, extra_args=None):
break_at = []
if args.baremetal is None:
image = common.vmlinux
allowed_toolchains = ['buildroot', 'crosstool-ng', 'host']
else:
image = common.image
allowed_toolchains = ['crosstool-ng', 'buildroot', 'host']
cmd = (
[common.get_toolchain_tool('gdb')] +
[common.get_toolchain_tool('gdb', allowed_toolchains=allowed_toolchains)] +
before +
['-q']
)
if args.baremetal is None:
cmd.extend(['-ex', 'add-auto-load-safe-path {}'.format(common.linux_variant_dir)])
cmd.extend(['-ex', 'add-auto-load-safe-path {}'.format(common.linux_build_dir)])
if args.sim:
target = 'sim'
else:
@@ -85,7 +87,7 @@ def main(args, extra_args=None):
# which gets put on the kernel build root when python debugging scripts are enabled.
cmd.extend(['-ex', 'continue'] + lx_symbols)
cmd.extend(after)
return common.run_cmd(cmd, cmd_file=os.path.join(common.run_dir, 'run-gdb.sh'), cwd=common.linux_variant_dir)
return common.run_cmd(cmd, cmd_file=os.path.join(common.run_dir, 'run-gdb.sh'), cwd=common.linux_build_dir)
if __name__ == '__main__':
parser = common.get_argparse(argparse_args={'description': 'Connect with GDB to an emulator to debug Linux itself'})