diff options
author | Andy Lutomirski <luto@kernel.org> | 2019-10-05 16:30:57 -0700 |
---|---|---|
committer | Andy Lutomirski <luto@kernel.org> | 2019-10-05 16:30:57 -0700 |
commit | 7cd3acfdae5788ef156702eb06088187025ada4d (patch) | |
tree | b63553fa5431606c8cb42cac303f0ded75bc8ea2 | |
parent | e55ebcc14a39914409a2e88756c1fcb54af9db9c (diff) | |
download | virtme-7cd3acfdae5788ef156702eb06088187025ada4d.tar.gz |
configkernel: Update cross-compiler advice
Linux removed CONFIG_CROSS_COMPILE:
commit f1089c92da791034af73478159626007cba7f092
Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Mon May 28 18:21:39 2018 +0900
kbuild: remove CONFIG_CROSS_COMPILE support
Update virtme-configkernel to give instructions that actually work.
Cross-compiling a kernel is annoying enough now that I think virtme
should add some kind of helper to do the dirty work.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rw-r--r-- | virtme/commands/configkernel.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/virtme/commands/configkernel.py b/virtme/commands/configkernel.py index f7393aa..8199294 100644 --- a/virtme/commands/configkernel.py +++ b/virtme/commands/configkernel.py @@ -9,6 +9,7 @@ from typing import Optional import argparse import os +import shlex import shutil import subprocess import multiprocessing @@ -102,8 +103,10 @@ def main(): ['# Arch-specific options'] + arch.config_base()) + archargs = ['ARCH=%s' % shlex.quote(arch.linuxname)] + if shutil.which('%s-linux-gnu-gcc' % arch.gccname): - conf.append('CONFIG_CROSS_COMPILE="%s-linux-gnu-"' % arch.gccname) + archargs.append('CROSS_COMPILE=%s' % shlex.quote("%s-linux-gnu-" % arch.gccname)) maketarget: Optional[str] @@ -123,7 +126,7 @@ def main(): # Set up an initial config if maketarget: - subprocess.check_call(['make', 'ARCH=%s' % arch.linuxname, maketarget]) + subprocess.check_call(['make'] + archargs + [maketarget]) config = '.config' @@ -135,10 +138,10 @@ def main(): with open(config, 'ab') as conffile: conffile.write('\n'.join(conf).encode('utf-8')) - subprocess.check_call(['make', 'ARCH=%s' % arch.linuxname, updatetarget]) + subprocess.check_call(['make'] + archargs + [updatetarget]) - print("Configured. Build with 'make ARCH=%s -j%d'" % - (arch.linuxname, multiprocessing.cpu_count())) + print("Configured. Build with 'make %s -j%d'" % + (' '.join(archargs), multiprocessing.cpu_count())) return 0 |