diff options
author | Andrew Lutomirski <luto@kernel.org> | 2019-09-27 09:37:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-27 09:37:20 -0700 |
commit | 37e91bf6509b4e607707a68ee698c3b388a8f6db (patch) | |
tree | 2b10975157985f8713f81d5319d630816a30c7a6 | |
parent | 716182ed7f0d5d57a2d488983a9b42698bc501d8 (diff) | |
parent | b17810c2a7263bee7413d0985d49b27c4bab6267 (diff) | |
download | virtme-37e91bf6509b4e607707a68ee698c3b388a8f6db.tar.gz |
Merge pull request #43 from marcosps/mpdesouza_issue7
commands/configkernel.py: Check KBUILD_OUTPUT environment variable
-rw-r--r-- | virtme/commands/configkernel.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/virtme/commands/configkernel.py b/virtme/commands/configkernel.py index 0da6fab..bd3d42f 100644 --- a/virtme/commands/configkernel.py +++ b/virtme/commands/configkernel.py @@ -121,7 +121,14 @@ def main(): if maketarget: subprocess.check_call(['make', 'ARCH=%s' % arch.linuxname, maketarget]) - with open('.config', 'ab') as conffile: + config = '.config' + + # Check if KBUILD_OUTPUT is defined and if it's a directory + config_dir = os.environ.get('KBUILD_OUTPUT', '') + if config_dir and os.path.isdir(config_dir): + config = os.path.join(config_dir, config) + + with open(config, 'ab') as conffile: conffile.write('\n'.join(conf).encode('utf-8')) subprocess.check_call(['make', 'ARCH=%s' % arch.linuxname, updatetarget]) |