mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
build-all.py: Update defconfigs with savedefconfig
Copy the savedefconfig (or minimal defconfig) instead of the .config when updating defconfigs. Change-Id: I0ba0b7a774dd3de0dc090420bd5c118eb6199eb6 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> (cherry picked from commit 6575c0b29f060a5ebdeec0ff9bcfe0f1af9f0bc8)
This commit is contained in:
parent
2ebef7c7e9
commit
45bc44dc22
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
# Copyright (c) 2009, Code Aurora Forum. All rights reserved.
|
||||
# Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -137,6 +137,7 @@ def build(target):
|
|||
os.mkdir(dest_dir)
|
||||
defconfig = 'arch/arm/configs/%s_defconfig' % target
|
||||
dotconfig = '%s/.config' % dest_dir
|
||||
savedefconfig = '%s/defconfig' % dest_dir
|
||||
shutil.copyfile(defconfig, dotconfig)
|
||||
|
||||
devnull = open('/dev/null', 'r')
|
||||
|
@ -159,7 +160,11 @@ def build(target):
|
|||
|
||||
# Copy the defconfig back.
|
||||
if all_options.configs or all_options.updateconfigs:
|
||||
shutil.copyfile(dotconfig, defconfig)
|
||||
devnull = open('/dev/null', 'r')
|
||||
subprocess.check_call(['make', 'O=%s' % dest_dir,
|
||||
'savedefconfig'], env=make_env, stdin=devnull)
|
||||
devnull.close()
|
||||
shutil.copyfile(savedefconfig, defconfig)
|
||||
|
||||
def build_many(allconf, targets):
|
||||
print "Building %d target(s)" % len(targets)
|
||||
|
|
Loading…
Reference in a new issue