From d6e32cd9c19e7fb8a3711422428e3e0905a50d02 Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Thu, 8 Mar 2012 18:35:52 +0000 Subject: [PATCH] Add chroot upgrade script to clear out atom board root(s) when moving to 64bit BUG=chrome-os-partner:8349 TEST=Ad hoc, apply update to 64bit, run this script, make sure build works Change-Id: I708addf055faf90b250bb38da5b292ecabc26edb Reviewed-on: https://gerrit.chromium.org/gerrit/17597 Reviewed-by: Mike Frysinger Tested-by: Sonny Rao --- chroot_version_hooks.d/31_64bit_convert_atom | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 chroot_version_hooks.d/31_64bit_convert_atom diff --git a/chroot_version_hooks.d/31_64bit_convert_atom b/chroot_version_hooks.d/31_64bit_convert_atom new file mode 100644 index 0000000000..6435c302f4 --- /dev/null +++ b/chroot_version_hooks.d/31_64bit_convert_atom @@ -0,0 +1,20 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This is meant to happen immediately after we update these boards +# from 32bit to 64bit. It moves the existing build root out of the +# way and re-creates the build root. The user must remove the copy +# of the old build root manually if it is not needed. + +for board in x86-mario x86-alex x86-zgb ; do + build="/build/${board}" + if [[ -d ${build} ]] ; then + info "Moving 32bit ${board} to ${board}.32bit" + info "If you don't need it, please run " + info "sudo rm -rf ${build}.32bit" + sudo mv ${build}{,.32bit} + info "Running setup_board --board=${board}" + ~/trunk/src/scripts/setup_board --board=${board} --skip_chroot_upgrade + fi +done