Add init.cpuset.rc for pantheon

Pantheon has 0-7 cpus instead of the default 0-3, so it needs custom
cpus assignment.

BUG=b:117949544
TEST=cheets_ContainerMount passes.
Change-Id: I1b084407a6da478e7ce2c9602dad4ee3144ad963
Reviewed-on: https://chromium-review.googlesource.com/1369866
Commit-Ready: Risan <risan@chromium.org>
Tested-by: Risan <risan@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
(cherry picked from commit 052997cd65c470091b8c83c78658aa91198cbdcf)
diff --git a/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1-r2.ebuild b/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1-r3.ebuild
similarity index 100%
rename from baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1-r2.ebuild
rename to baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1-r3.ebuild
diff --git a/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1.ebuild b/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1.ebuild
index 7635ed5..362bef9 100644
--- a/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1.ebuild
+++ b/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/chromeos-bsp-baseboard-nami-0.0.1.ebuild
@@ -9,10 +9,18 @@
 LICENSE="BSD-Google"
 SLOT="0"
 KEYWORDS="-* amd64 x86"
-IUSE=""
+IUSE="cheets"
 S="${WORKDIR}"
 
 # Add dependencies on other ebuilds from within this board overlay
 RDEPEND="
 "
 DEPEND="${RDEPEND}"
+
+src_install() {
+	# Install cpuset adjustments.
+	if use cheets; then
+		insinto "/opt/google/containers/android/vendor/etc/init/"
+		doins "${FILESDIR}/init.cpusets.rc"
+	fi
+}
diff --git a/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/files/init.cpusets.rc b/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/files/init.cpusets.rc
new file mode 100644
index 0000000..bbd78a1
--- /dev/null
+++ b/baseboard-nami/chromeos-base/chromeos-bsp-baseboard-nami/files/init.cpusets.rc
@@ -0,0 +1,9 @@
+# Copyright 2018 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.
+
+# Pantheon has 0-7 cpus instead of the default 0-3, so it needs custom
+# cpus assignment.
+on property:sys.boot_completed=1
+    copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus
+    copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus