From 6f26fbb5441c978e393b7e3089effb28f91b4593 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Fri, 17 Jun 2011 12:03:09 -0700 Subject: 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 (cherry picked from commit 6575c0b29f060a5ebdeec0ff9bcfe0f1af9f0bc8) --- scripts/build-all.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts/build-all.py') diff --git a/scripts/build-all.py b/scripts/build-all.py index 80430e8883d..511527076dd 100755 --- a/scripts/build-all.py +++ b/scripts/build-all.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -# Copyright (c) 2009, The Linux Foundation. All rights reserved. +# Copyright (c) 2009-2011, The Linux Foundation. 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) -- cgit v1.2.3