Force coreboot mconf to create temp files in the output directory
authorVadim Bendebury <vbendeb@chromium.org>
Mon, 24 Oct 2011 21:06:23 +0000 (14:06 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Mon, 2 Apr 2012 16:39:22 +0000 (18:39 +0200)
commitc302d20ed3f67f863e02dce51aeef8aa90ef2742
tree638b849c007612b794f25a51068ffde9ebffc30a
parente1bb49e2ece1eda6a3d566b48b7a8e50a3469f63
Force coreboot mconf to create temp files in the output directory

This change partially addresses the problem with attempting to
generate coreboot image out of tree. The configuration step fails when
in cheroot, if the destination directory is placed in /tmp.

The problem is that the mconf package tries renaming the temporary
file created in the local directory into the destination config file.
If the destination root and the local directory are located on
different file systems, the rename operation fails.

The proper fix (still upcoming) would be to identify all places where
mconf creates temp files, and make sure that all temp files get
created in the destination tree.

This change modifies just one location, which prevents building out of
tree in the most common case.

Test:
  run the following in the coreboot directory in chroot:
    (coreboot) cp config.lumpy .config
    (coreboot) /bin/rm -rf /tmp/cb
    (coreboot) CROSS_COMPILE=i686-pc-linux-gnu- make obj=/tmp/cb oldconfig
    (coreboot) CROSS_COMPILE=i686-pc-linux-gnu- make obj=/tmp/cb

  Observe the build succeed (it was failing during the config phase
  before this change)

Change-Id: If4506e984b8afc192a1689c7b0aa956dd35f66c6
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/815
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
util/kconfig/confdata.c