From 9002975ff0d08d64f604b6fb36db10bd9bf459b1 Mon Sep 17 00:00:00 2001 From: Sonny Rao Date: Thu, 1 Mar 2012 01:15:51 +0000 Subject: [PATCH] Add chroot upgrade script to clear out stumpy root when moving to 64bit BUG=chrome-os-partner:8235 TEST=Ad hoc, apply update to 64bit, run this script, make sure build works Change-Id: I43fe93cfc4af2b4904ecb9a3d331769acd2a5e16 Reviewed-on: https://gerrit.chromium.org/gerrit/17115 Reviewed-by: David James Tested-by: Sonny Rao --- .../29_64bit_convert_stumpy | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 chroot_version_hooks.d/29_64bit_convert_stumpy diff --git a/chroot_version_hooks.d/29_64bit_convert_stumpy b/chroot_version_hooks.d/29_64bit_convert_stumpy new file mode 100644 index 0000000000..1541cd278f --- /dev/null +++ b/chroot_version_hooks.d/29_64bit_convert_stumpy @@ -0,0 +1,19 @@ +# 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. + +board="stumpy" +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