Update hooks: migrate amd64-generic and x86-generic to freon

BUG=chromium:532719
TEST=run_chroot_version_hooks
CQ-DEPEND=CL:320117

Change-Id: I3621039a963bbf8b4a68b1b8673d2811e40a0fad
Reviewed-on: https://chromium-review.googlesource.com/320118
Commit-Ready: Haixia Shi <hshi@chromium.org>
Tested-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/chroot_version_hooks.d/138_amd64_and_x86_generic_to_freon b/chroot_version_hooks.d/138_amd64_and_x86_generic_to_freon
new file mode 100644
index 0000000..5a84975
--- /dev/null
+++ b/chroot_version_hooks.d/138_amd64_and_x86_generic_to_freon
@@ -0,0 +1,20 @@
+# Copyright 2016 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.
+
+# We moved a lot of files to the project-freon overlay. Make sure we
+# regen the board setup for each freon board.
+
+BOARDS=(
+  amd64-generic
+  x86-generic
+)
+
+for b in "${BOARDS[@]}"; do
+  if [[ -d /build/${b} ]]; then
+    ~/trunk/src/scripts/setup_board \
+      --board=${b} \
+      --skip_chroot_upgrade \
+      --regen_configs
+  fi
+done