Fork cros-workon packages into overlay-lakitu.

The only change that I made was deleting the 9999 ebuilds. This is our
solution to the uprev problem for now; we will treat these cros-workon
packages as normal ebuilds that pin their source.

To prevent the build from using the chromiumos copies of these packages,
I masked those packages in packages.mask.

In a follow-up CL, I will refactor these ebuilds to download their
source from GCS.

BUG=b/161825120
TEST=sponge2/f7a309fc-3dc3-4677-8a93-f1cb4eeb5732

Change-Id: I31e0a8685b66794794a4ded2fedf6c03637964ee
diff --git a/overlay-lakitu/chromeos-base/chromeos-common-script/chromeos-common-script-0.0.1-r205.ebuild b/overlay-lakitu/chromeos-base/chromeos-common-script/chromeos-common-script-0.0.1-r205.ebuild
new file mode 100644
index 0000000..577f58d
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/chromeos-common-script/chromeos-common-script-0.0.1-r205.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2018 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+CROS_WORKON_COMMIT="c142078820d0707858873cedb290a78d36f531af"
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "0468cec41388f85dd89a5eb66bef35fcf7a5c524" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
+CROS_WORKON_PROJECT="chromiumos/platform2"
+CROS_WORKON_LOCALNAME="platform2"
+CROS_WORKON_OUTOFTREE_BUILD=1
+CROS_WORKON_SUBTREE="common-mk chromeos-common-script .gn"
+
+PLATFORM_SUBDIR="chromeos-common-script"
+
+inherit cros-workon platform
+
+DESCRIPTION="Chrome OS storage info tools"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/chromeos-common-script/"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+SLOT="0"
+KEYWORDS="*"
+IUSE="direncryption"
+
+DEPEND=""
+
+RDEPEND="!<chromeos-base/chromeos-installer-0.0.3"
+
+src_install() {
+	insinto /usr/share/misc
+	doins share/chromeos-common.sh
+	if use direncryption; then
+		sed -i '/local direncryption_enabled=/s/false/true/' \
+			"${D}/usr/share/misc/chromeos-common.sh" ||
+			die "Can not set directory encryption in common library"
+	fi
+}
diff --git a/overlay-lakitu/chromeos-base/chromeos-installer/chromeos-installer-0.0.3-r3381.ebuild b/overlay-lakitu/chromeos-base/chromeos-installer/chromeos-installer-0.0.3-r3381.ebuild
new file mode 100644
index 0000000..6953a19
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/chromeos-installer/chromeos-installer-0.0.3-r3381.ebuild
@@ -0,0 +1,79 @@
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+CROS_WORKON_COMMIT="c142078820d0707858873cedb290a78d36f531af"
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "3a608885c9d4dc5bc5fee48f1bac2c54e75363e1" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
+CROS_WORKON_PROJECT="chromiumos/platform2"
+CROS_WORKON_LOCALNAME="platform2"
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_OUTOFTREE_BUILD=1
+CROS_WORKON_SUBTREE="common-mk installer .gn"
+
+PLATFORM_SUBDIR="installer"
+
+inherit cros-workon platform systemd
+
+DESCRIPTION="Chrome OS Installer"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/installer/"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+SLOT="0"
+KEYWORDS="*"
+IUSE="cros_embedded cros_host enable_slow_boot_notify -mtd pam systemd test +oobe_config"
+
+COMMON_DEPEND="
+	chromeos-base/libbrillo:=
+	chromeos-base/vboot_reference
+"
+
+DEPEND="${COMMON_DEPEND}
+	chromeos-base/verity
+	dev-libs/openssl:0=
+"
+
+RDEPEND="${COMMON_DEPEND}
+	pam? ( app-admin/sudo )
+	chromeos-base/chromeos-common-script
+	!cros_host? (
+		!cros_embedded? ( chromeos-base/chromeos-storage-info )
+		oobe_config? ( chromeos-base/oobe_config )
+		dev-libs/openssl:0=
+	)
+	dev-util/shflags
+	sys-apps/rootdev
+	sys-apps/util-linux
+	sys-apps/which
+	sys-fs/e2fsprogs"
+
+platform_pkg_test() {
+	platform_test "run" "${OUT}/cros_installer_test"
+}
+
+src_install() {
+	if use cros_host ; then
+		dosbin chromeos-install
+	else
+		dobin "${OUT}"/{cros_installer,cros_oobe_crypto}
+		if use mtd ; then
+			dobin "${OUT}"/nand_partition
+		fi
+		dosbin chromeos-* encrypted_import "${OUT}"/evwaitkey
+		dosym usr/sbin/chromeos-postinst /postinst
+
+		# Install init scripts.
+		if use systemd; then
+			systemd_dounit init/install-completed.service
+			systemd_enable_service boot-services.target install-completed.service
+			systemd_dounit init/crx-import.service
+			systemd_enable_service system-services.target crx-import.service
+		else
+			insinto /etc/init
+			doins init/*.conf
+		fi
+		exeinto /usr/share/cros/init
+		doexe init/crx-import.sh
+	fi
+}
diff --git a/overlay-lakitu/chromeos-base/chromeos-installer/files/chromeos-version.sh b/overlay-lakitu/chromeos-base/chromeos-installer/files/chromeos-version.sh
new file mode 100755
index 0000000..43df299
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/chromeos-installer/files/chromeos-version.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Copyright 2017 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 echo statement sets the package base version (without its -r value).
+# If it is necessary to add a new blocker or version dependency on this ebuild
+# at the same time as revving the ebuild to a known version value, editing this
+# version can be useful.
+echo 0.0.3
diff --git a/overlay-lakitu/chromeos-base/crash-reporter/OWNERS b/overlay-lakitu/chromeos-base/crash-reporter/OWNERS
new file mode 100644
index 0000000..b457d36
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/crash-reporter/OWNERS
@@ -0,0 +1,2 @@
+set noparent
+include chromiumos/platform2:/crash-reporter/OWNERS
diff --git a/overlay-lakitu/chromeos-base/crash-reporter/crash-reporter-0.0.1-r3312.ebuild b/overlay-lakitu/chromeos-base/crash-reporter/crash-reporter-0.0.1-r3312.ebuild
new file mode 100644
index 0000000..742af3c
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/crash-reporter/crash-reporter-0.0.1-r3312.ebuild
@@ -0,0 +1,142 @@
+# Copyright 2014 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT="a1b9a034138b73293749ad546a885d23ddba5f82"
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "197046ff3b04ce2b8d6a73c415ec3b924bccdc44" "7e189936f29d145c4191ea147e48256c92fac75d" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_LOCALNAME="platform2"
+CROS_WORKON_PROJECT="chromiumos/platform2"
+CROS_WORKON_OUTOFTREE_BUILD=1
+# TODO(crbug.com/809389): Avoid directly including headers from other packages.
+CROS_WORKON_SUBTREE="common-mk crash-reporter metrics .gn"
+
+PLATFORM_SUBDIR="crash-reporter"
+
+inherit cros-i686 cros-workon platform systemd udev user
+
+DESCRIPTION="Crash reporting service that uploads crash reports with debug information"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/crash-reporter/"
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="cheets chromeless_tty cros_embedded -direncryption kvm_guest systemd fuzzer"
+
+COMMON_DEPEND="
+	chromeos-base/minijail:=
+	chromeos-base/google-breakpad:=[cros_i686?]
+	chromeos-base/metrics:=
+	dev-libs/libpcre:=
+	dev-libs/protobuf:=
+	dev-libs/re2:=
+	kvm_guest? ( net-libs/grpc:= )
+	net-misc/curl:=
+	sys-libs/zlib:=
+"
+RDEPEND="${COMMON_DEPEND}
+	chromeos-base/chromeos-ca-certificates
+	|| ( sys-apps/journald:= sys-apps/systemd:= )
+	direncryption? ( sys-apps/keyutils:= )
+"
+DEPEND="
+	${COMMON_DEPEND}
+	chromeos-base/debugd-client:=
+	chromeos-base/session_manager-client:=
+	chromeos-base/shill-client:=
+	chromeos-base/system_api:=[fuzzer?]
+	chromeos-base/vboot_reference:=
+	chromeos-base/vm_protos:=
+"
+
+src_configure() {
+	platform_src_configure
+	use cheets && use_i686 && platform_src_configure_i686
+}
+
+src_compile() {
+	platform_src_compile
+	use cheets && use_i686 && platform_src_compile_i686 "core_collector"
+}
+
+pkg_setup() {
+	# Has to be done in pkg_setup() instead of pkg_preinst() since
+	# src_install() will need the crash user and group.
+	enewuser "crash"
+	enewgroup "crash"
+	# A group to manage file permissions for files that crash reporter
+	# components need to access.
+	enewgroup "crash-access"
+	# A group to grant access to the user's crash directory (in /home)
+	enewgroup "crash-user-access"
+	cros-workon_pkg_setup
+}
+
+src_install() {
+	into /
+	dosbin "${OUT}"/crash_reporter
+	dosbin "${OUT}"/crash_sender
+
+	insinto /etc/dbus-1/system.d
+	doins dbus/org.chromium.AnomalyEventService.conf
+
+	local daemon_store="/etc/daemon-store/crash"
+	dodir "${daemon_store}"
+	fperms 3770 "${daemon_store}"
+	fowners crash:crash-user-access "${daemon_store}"
+
+	into /usr
+	use cros_embedded || dobin "${OUT}"/anomaly_detector
+	dosbin kernel_log_collector.sh
+
+	if use cheets; then
+		dobin "${OUT}"/core_collector
+		use_i686 && newbin "$(platform_out_i686)"/core_collector "core_collector32"
+	fi
+
+	if use systemd; then
+		systemd_dounit init/crash-reporter.service
+		systemd_dounit init/crash-boot-collect.service
+		systemd_enable_service multi-user.target crash-reporter.service
+		systemd_enable_service multi-user.target crash-boot-collect.service
+		systemd_dounit init/crash-sender.service
+		systemd_enable_service multi-user.target crash-sender.service
+		systemd_dounit init/crash-sender.timer
+		systemd_enable_service timers.target crash-sender.timer
+		if ! use cros_embedded; then
+			systemd_dounit init/anomaly-detector.service
+			systemd_enable_service multi-user.target anomaly-detector.service
+		fi
+	else
+		insinto /etc/init
+		doins init/crash-reporter.conf
+		doins init/crash-reporter-early-init.conf
+		doins init/crash-boot-collect.conf
+		doins init/crash-sender.conf
+		use cros_embedded || doins init/anomaly-detector.conf
+	fi
+
+	insinto /etc
+	doins crash_reporter_logs.conf
+
+	udev_dorules 99-crash-reporter.rules
+
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/crash_sender_fuzzer \
+		--dict "${S}"/crash_sender_fuzzer.dict
+
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/anomaly_detector_fuzzer \
+		--dict "${S}"/anomaly_detector_fuzzer.dict
+}
+
+platform_pkg_test() {
+	local gtest_filter_user_tests="-*.RunAsRoot*:"
+	local gtest_filter_root_tests="*.RunAsRoot*-"
+
+	platform_test "run" "${OUT}/crash_reporter_test" "0" \
+		"${gtest_filter_user_tests}"
+	platform_test "run" "${OUT}/crash_reporter_test" "1" \
+		"${gtest_filter_root_tests}"
+	platform_test "run" "${OUT}/anomaly_detector_test"
+	platform_test "run" "${OUT}/anomaly_detector_text_file_reader_test"
+	platform_test "run" "${OUT}/anomaly_detector_log_reader_test"
+}
diff --git a/overlay-lakitu/chromeos-base/google-breakpad/OWNERS b/overlay-lakitu/chromeos-base/google-breakpad/OWNERS
new file mode 100644
index 0000000..b457d36
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/google-breakpad/OWNERS
@@ -0,0 +1,2 @@
+set noparent
+include chromiumos/platform2:/crash-reporter/OWNERS
diff --git a/overlay-lakitu/chromeos-base/google-breakpad/files/chromeos-version.sh b/overlay-lakitu/chromeos-base/google-breakpad/files/chromeos-version.sh
new file mode 100755
index 0000000..0e459c2
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/google-breakpad/files/chromeos-version.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Copyright (c) 2013 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 script is given one argument: the base of the source directory of
+# the package, and it prints a string on stdout with the numerical version
+# number for said repo.
+
+# Use the timestamp of the last git commit as our version.
+# In practice, it should never go backwards in time ...
+stamp=$(git --git-dir="$1/.git" log -n1 --pretty=format:%ci HEAD)
+exec date --date="${stamp}" -u "+%Y.%m.%d.%H%M%S"
diff --git a/overlay-lakitu/chromeos-base/google-breakpad/google-breakpad-2020.06.05.013145-r187.ebuild b/overlay-lakitu/chromeos-base/google-breakpad/google-breakpad-2020.06.05.013145-r187.ebuild
new file mode 100644
index 0000000..f86920c
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/google-breakpad/google-breakpad-2020.06.05.013145-r187.ebuild
@@ -0,0 +1,134 @@
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT=("2757a2c9c819fcae3784576aef0c8400c7ad06d7" "8048ece6c16c91acfe0d36d1d3cc0890ab6e945c")
+CROS_WORKON_TREE=("db3eb4400e3481586bfabec9075d3aebbfee8d1b" "84dd0fabdc4d0729885dc7ce3ac35903504ba5e6")
+CROS_WORKON_PROJECT=(
+	"chromiumos/platform/google-breakpad"
+	"linux-syscall-support"
+)
+CROS_WORKON_LOCALNAME=(
+	"third_party/breakpad"
+	"third_party/breakpad/src/third_party/lss"
+)
+CROS_WORKON_DESTDIR=(
+	"${S}"
+	"${S}/src/third_party/lss"
+)
+
+inherit cros-i686 cros-workon flag-o-matic multiprocessing
+
+DESCRIPTION="Google crash reporting"
+HOMEPAGE="https://chromium.googlesource.com/breakpad/breakpad"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="-alltests cros_host test"
+
+COMMON_DEPEND="net-misc/curl:="
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+	test? (
+		dev-cpp/gtest:=
+	)
+"
+
+src_prepare() {
+	default
+	find "${S}" -type f -exec touch -r "${S}"/configure {} +
+}
+
+src_configure() {
+	append-flags -g
+
+	# Disable flaky tests by default.  Do it here because the CPPFLAGS
+	# are recorded at configure time and not read on the fly.
+	# http://crbug.com/359999
+	use alltests && append-cppflags -DENABLE_FLAKY_TESTS
+
+	multijob_init
+
+	mkdir build
+	pushd build >/dev/null || die
+	ECONF_SOURCE=${S} multijob_child_init econf --enable-system-test-libs
+	popd >/dev/null || die
+
+	if use cros_host || use_i686; then
+		# The mindump code is still wordsize specific.  Needs to be redone
+		# like https://code.google.com/p/google-breakpad/source/detail?r=987.
+		einfo "Configuring 32-bit build"
+		mkdir work32
+		pushd work32 >/dev/null
+		use cros_host && append-flags "-m32"
+		use_i686 && push_i686_env
+		# Can be dropped once this is merged upstream:
+		# https://breakpad.appspot.com/619002/
+		append-lfs-flags # crbug.com/266064
+		ECONF_SOURCE=${S} multijob_child_init econf
+		filter-lfs-flags
+		use_i686 && pop_i686_env
+		use cros_host && filter-flags "-m32"
+		popd >/dev/null
+	fi
+
+	multijob_finish
+}
+
+src_compile() {
+	emake -C build
+
+	if use cros_host; then
+		einfo "Building 32-bit tools"
+		emake -C work32 \
+			src/tools/linux/md2core/minidump-2-core
+	fi
+
+	if use_i686; then
+		einfo "Building 32-bit library"
+		push_i686_env
+		emake -C work32 src/client/linux/libbreakpad_client.a
+		pop_i686_env
+	fi
+}
+
+src_test() {
+	if ! use x86 && ! use amd64 ; then
+		einfo Skipping unit tests on non-x86 platform
+		return
+	fi
+	emake -C build check
+}
+
+src_install() {
+	pushd build >/dev/null
+	emake DESTDIR="${D}" install
+	dobin src/tools/linux/core2md/core2md \
+	      src/tools/linux/md2core/minidump-2-core \
+	      src/tools/linux/dump_syms/dump_syms \
+	      src/tools/linux/symupload/sym_upload \
+	      src/tools/linux/symupload/minidump_upload
+	popd >/dev/null
+
+	insinto /usr/include/google-breakpad/client/linux/handler
+	doins src/client/linux/handler/*.h
+	insinto /usr/include/google-breakpad/client/linux/crash_generation
+	doins src/client/linux/crash_generation/*.h
+	insinto /usr/include/google-breakpad/common/linux
+	doins src/common/linux/*.h
+	insinto /usr/include/google-breakpad/processor
+	doins src/processor/*.h
+
+	if use cros_host; then
+		newbin work32/src/tools/linux/md2core/minidump-2-core \
+		       minidump-2-core.32
+	fi
+
+	if use_i686; then
+		push_i686_env
+		dolib.a work32/src/client/linux/libbreakpad_client.a
+		pop_i686_env
+	fi
+}
diff --git a/overlay-lakitu/chromeos-base/libbrillo/files/chromeos-version.sh b/overlay-lakitu/chromeos-base/libbrillo/files/chromeos-version.sh
new file mode 100755
index 0000000..cb927b8
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libbrillo/files/chromeos-version.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Copyright 2015 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 echo statement sets the package base version (without its -r value).
+# If it is necessary to add a new blocker or version dependency on this ebuild
+# at the same time as revving the ebuild to a known version value, editing this
+# version can be useful.
+echo 0.0.1
diff --git a/overlay-lakitu/chromeos-base/libbrillo/libbrillo-0.0.1-r1668.ebuild b/overlay-lakitu/chromeos-base/libbrillo/libbrillo-0.0.1-r1668.ebuild
new file mode 100644
index 0000000..ea5cf07
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libbrillo/libbrillo-0.0.1-r1668.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2014 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT="aec2eaa3b24aa7fc9ec3c27a8675265cb67837c7"
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "9da9751f965ac8cdb8411a0766dad4f0676e1083" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_LOCALNAME="platform2"
+CROS_WORKON_PROJECT="chromiumos/platform2"
+CROS_WORKON_OUTOFTREE_BUILD=1
+CROS_WORKON_SUBTREE="common-mk libbrillo .gn"
+
+PLATFORM_SUBDIR="libbrillo"
+
+# platform.eclass automatically add dependency to libbrillo by default,
+# but this package should not have the dependency.
+WANT_LIBBRILLO="no"
+
+inherit cros-workon platform
+
+DESCRIPTION="Base library for Chromium OS"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/libbrillo/"
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="cros_host +dbus +device_mapper fuzzer +udev"
+
+COMMON_DEPEND="
+	chromeos-base/minijail:=
+	dbus? ( dev-libs/dbus-glib:= )
+	dev-libs/openssl:=
+	dev-libs/protobuf:=
+	net-libs/grpc:=
+	net-misc/curl:=
+	sys-apps/rootdev:=
+	device_mapper? ( sys-fs/lvm2:= )
+	udev? ( virtual/libudev )
+"
+RDEPEND="
+	${COMMON_DEPEND}
+	!cros_host? ( chromeos-base/libchromeos-use-flags )
+	chromeos-base/chromeos-ca-certificates
+	!chromeos-base/libchromeos
+"
+DEPEND="
+	${COMMON_DEPEND}
+	>=chromeos-base/protofiles-0.0.39:=
+	dbus? ( chromeos-base/system_api:=[fuzzer?] )
+	dev-libs/modp_b64:=
+"
+
+src_install() {
+	insinto "/usr/$(get_libdir)/pkgconfig"
+
+	dolib.so "${OUT}"/lib/lib{brillo,installattributes,policy}*.so
+	dolib.a "${OUT}"/libbrillo*.a
+	# Install libbrillo with and without version number as a temporary
+	# measure.
+	doins "${OUT}"/obj/libbrillo/libbrillo*.pc
+
+	# Install all the header files from libbrillo/brillo/*.h into
+	# /usr/include/brillo (recursively, with sub-directories).
+	local dir
+	while read -d $'\0' -r dir; do
+		insinto "/usr/include/${dir}"
+		doins "${dir}"/*.h
+	done < <(find brillo -type d -print0)
+
+	insinto /usr/include/policy
+	doins policy/*.h
+	insinto /usr/include/install_attributes
+	doins install_attributes/libinstallattributes.h
+
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/libbrillo_data_encoding_fuzzer
+	platform_fuzzer_install "${S}"/OWNERS \
+		"${OUT}"/libbrillo_dbus_data_serialization_fuzzer
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/libbrillo_http_form_data_fuzzer
+}
+
+platform_pkg_test() {
+	local gtest_filter_qemu="-*DeathTest*"
+	platform_test "run" "${OUT}/libbrillo_tests" "" "" "${gtest_filter_qemu}"
+	platform_test "run" "${OUT}/libinstallattributes_tests"
+	platform_test "run" "${OUT}/libpolicy_tests"
+	platform_test "run" "${OUT}/libbrillo-grpc_tests"
+}
diff --git a/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-memory-allocator.patch b/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-memory-allocator.patch
new file mode 100644
index 0000000..2e0f06a
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-memory-allocator.patch
@@ -0,0 +1,50 @@
+From: Hidehiko Abe <hidehiko@chromium.org>
+Date: Thu, 22 Nov 2018 01:59:18 +0900
+Subject: [PATCH] libchrome: Disable memory allocator in asan builds.
+
+Memory allocator in //base/allocator should not be used
+with address sanitizer. Otherwise, it breaks asan builds since
+many memory allocations will go to the base allocator instead
+of asan.
+
+BUG=chromium:807685
+TEST=Build.
+---
+ base/allocator/allocator_shim_override_cpp_symbols.h  | 2 ++
+ base/allocator/allocator_shim_override_libc_symbols.h | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/base/allocator/allocator_shim_override_cpp_symbols.h b/base/allocator/allocator_shim_override_cpp_symbols.h
+index 3313687..9f57025 100644
+--- a/base/allocator/allocator_shim_override_cpp_symbols.h
++++ b/base/allocator/allocator_shim_override_cpp_symbols.h
+@@ -15,6 +15,7 @@
+ 
+ #include "base/allocator/allocator_shim_internals.h"
+ 
++#if 0
+ SHIM_ALWAYS_EXPORT void* operator new(size_t size) {
+   return ShimCppNew(size);
+ }
+@@ -49,3 +50,4 @@ SHIM_ALWAYS_EXPORT void operator delete[](void* p,
+                                           const std::nothrow_t&) __THROW {
+   ShimCppDelete(p);
+ }
++#endif
+diff --git a/base/allocator/allocator_shim_override_libc_symbols.h b/base/allocator/allocator_shim_override_libc_symbols.h
+index b77cbb1..c501c23 100644
+--- a/base/allocator/allocator_shim_override_libc_symbols.h
++++ b/base/allocator/allocator_shim_override_libc_symbols.h
+@@ -14,6 +14,7 @@
+ 
+ #include "base/allocator/allocator_shim_internals.h"
+ 
++#if 0
+ extern "C" {
+ 
+ SHIM_ALWAYS_EXPORT void* malloc(size_t size) __THROW {
+@@ -61,3 +62,4 @@ SHIM_ALWAYS_EXPORT int posix_memalign(void** r, size_t a, size_t s) __THROW {
+ //   size_t malloc_usable_size(const void*);
+ 
+ }  // extern "C"
++#endif
diff --git a/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-object-tracking.patch b/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-object-tracking.patch
new file mode 100644
index 0000000..2cf628d
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libchrome/files/libchrome-Disable-object-tracking.patch
@@ -0,0 +1,16 @@
+Remove the object tracking code as it is causing memory leaks
+in sanitizer builds, https://crbug.com/908138.
+This code is already removed from upstream chromium //base code.
+
+diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
+index 1507c09..882f5fb 100644
+--- a/base/tracked_objects.cc
++++ b/base/tracked_objects.cc
+@@ -891,7 +891,6 @@ void ThreadData::ShutdownSingleThreadedCleanup(bool leak) {
+ // static
+ ThreadData* ThreadData::GetRetiredOrCreateThreadData(
+     const std::string& sanitized_thread_name) {
+-  SCOPED_UMA_HISTOGRAM_TIMER("TrackedObjects.GetRetiredOrCreateThreadData");
+ 
+   {
+     base::AutoLock lock(*list_lock_.Pointer());
diff --git a/overlay-lakitu/chromeos-base/libchrome/files/ubsan_blocklist.txt b/overlay-lakitu/chromeos-base/libchrome/files/ubsan_blocklist.txt
new file mode 100644
index 0000000..e5b4d51
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libchrome/files/ubsan_blocklist.txt
@@ -0,0 +1,3 @@
+# Suppress spurious Incorrect-function-pointer-type error.
+# https://crbug.com/950000
+fun:*internal*BindStateBaseRefCountTraits*Destruct*
diff --git a/overlay-lakitu/chromeos-base/libchrome/libchrome-0.0.1-r37.ebuild b/overlay-lakitu/chromeos-base/libchrome/libchrome-0.0.1-r37.ebuild
new file mode 100644
index 0000000..85efe71
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/libchrome/libchrome-0.0.1-r37.ebuild
@@ -0,0 +1,240 @@
+# Copyright 2014 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+CROS_WORKON_COMMIT=("3c84ec7b4a00f71d4c24b04aeeb0533d9242150d" "58af3a81c74511678039bf6a17f21f4aae54eae3")
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "debc0344fe932d71dd37515f6fd39ce72638529a")
+CROS_WORKON_PROJECT=("chromiumos/platform2" "aosp/platform/external/libchrome")
+CROS_WORKON_LOCALNAME=("platform2" "aosp/external/libchrome")
+CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/libchrome")
+CROS_WORKON_SUBTREE=("common-mk .gn" "")
+
+WANT_LIBCHROME="no"
+IS_LIBCHROME="yes"
+inherit cros-workon libchrome-version platform
+
+DESCRIPTION="Chrome base/ and dbus/ libraries extracted for use on Chrome OS"
+HOMEPAGE="http://dev.chromium.org/chromium-os/packages/libchrome"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="cros_host +crypto +dbus fuzzer +mojo +timers"
+
+PLATFORM_SUBDIR="libchrome"
+
+# TODO(avakulenko): Put dev-libs/nss behind a USE flag to make sure NSS is
+# pulled only into the configurations that require it.
+# TODO(fqj): remove !chromeos-base/libchrome-${BASE_VER} on next uprev to r680000.
+RDEPEND="dev-libs/glib:2=
+	dev-libs/libevent:=
+	dev-libs/modp_b64:=
+	crypto? (
+		dev-libs/nss:=
+		dev-libs/openssl:=
+	)
+	dbus? (
+		sys-apps/dbus:=
+		dev-libs/protobuf:=
+	)
+	dev-libs/re2:=
+	!~chromeos-base/libchrome-576279
+	!chromeos-base/libchrome:576279
+	!chromeos-base/libchrome:462023
+	!chromeos-base/libchrome:456626
+	!chromeos-base/libchrome:395517
+"
+DEPEND="${RDEPEND}
+	dev-cpp/gtest:=
+"
+
+# libmojo used to be in a separate package, which now conflicts with libchrome.
+# Add softblocker here, to resolve the conflict, in case building the package
+# on the environment where old libmojo is installed.
+# TODO(hidehiko): Clean up the blocker after certain period.
+RDEPEND="${RDEPEND}
+	!chromeos-base/libmojo"
+
+# libmojo depends on libbase-crypto.
+REQUIRED_USE="mojo? ( crypto )"
+
+src_prepare() {
+	# epatch "${FILESDIR}"/${PN}-Replace-std-unordered_map-with-std-map-for-dbus-Prop.patch
+	# epatch "${FILESDIR}"/${PN}-dbus-Filter-signal-by-the-sender-we-are-interested-i.patch
+	# epatch "${FILESDIR}"/${PN}-dbus-Make-MockObjectManager-useful.patch
+	# epatch "${FILESDIR}"/${PN}-dbus-Don-t-DCHECK-unexpected-message-type-but-ignore.patch
+	# epatch "${FILESDIR}"/${PN}-Mock-more-methods-of-dbus-Bus-in-dbus-MockBus.patch
+
+	# Disable custom memory allocator when asan is used.
+	# https://crbug.com/807685
+	use_sanitizers && epatch "${FILESDIR}"/${PN}-Disable-memory-allocator.patch
+
+	# Disable object lifetime tracking since it cuases memory leaks in
+	# sanitizer builds, https://crbug.com/908138
+	# TODO
+	# epatch "${FILESDIR}"/${PN}-Disable-object-tracking.patch
+
+	# Apply patches
+	while read -r patch; do
+		epatch "${S}/libchrome_tools/patches/${patch}"
+	done < <(grep -E '^[^#]' "${S}/libchrome_tools/patches/patches")
+}
+
+src_install() {
+	export BASE_VER="$(cat BASE_VER)"
+	dolib.so "${OUT}"/lib/libbase*-"${BASE_VER}".so
+	dolib.a "${OUT}"/libbase*-"${BASE_VER}".a
+
+	local mojom_dirs=()
+	local header_dirs=(
+		base
+		base/allocator
+		base/containers
+		base/debug
+		base/files
+		base/hash
+		base/i18n
+		base/json
+		base/memory
+		base/message_loop
+		base/metrics
+		base/numerics
+		base/posix
+		base/process
+		base/strings
+		base/synchronization
+		base/system
+		base/task
+		base/task/common
+		base/task/sequence_manager
+		base/task/thread_pool
+		base/third_party/icu
+		base/third_party/nspr
+		base/third_party/valgrind
+		base/threading
+		base/time
+		base/timer
+		base/trace_event
+		base/trace_event/common
+		build
+		components/policy
+		components/policy/core/common
+		testing/gmock/include/gmock
+		testing/gtest/include/gtest
+	)
+	use dbus && header_dirs+=( dbus )
+	use timers && header_dirs+=( components/timers )
+
+	insinto /usr/include/base-"${BASE_VER}"/base/test
+	doins \
+		base/test/bind_test_util.h \
+		base/test/scoped_task_environment.h \
+		base/test/simple_test_clock.h \
+		base/test/simple_test_tick_clock.h \
+		base/test/task_environment.h \
+		base/test/test_mock_time_task_runner.h \
+		base/test/test_pending_task.h \
+		base/test/test_timeouts.h \
+
+	if use crypto; then
+		insinto /usr/include/base-${BASE_VER}/crypto
+		doins \
+			crypto/crypto_export.h \
+			crypto/hmac.h \
+			crypto/libcrypto-compat.h \
+			crypto/nss_key_util.h \
+			crypto/nss_util.h \
+			crypto/nss_util_internal.h \
+			crypto/openssl_util.h \
+			crypto/p224.h \
+			crypto/p224_spake.h \
+			crypto/random.h \
+			crypto/rsa_private_key.h \
+			crypto/scoped_nss_types.h \
+			crypto/scoped_openssl_types.h \
+			crypto/scoped_test_nss_db.h \
+			crypto/secure_hash.h \
+			crypto/secure_util.h \
+			crypto/sha2.h \
+			crypto/signature_creator.h \
+			crypto/signature_verifier.h
+	fi
+
+	insinto /usr/$(get_libdir)/pkgconfig
+	doins "${OUT}"/obj/libchrome/libchrome*-"${BASE_VER}".pc
+
+	# Install libmojo.
+	if use mojo; then
+		# Install binary.
+		dolib.a "${OUT}"/libmojo-"${BASE_VER}".a
+
+		# Install headers.
+		header_dirs+=(
+			ipc
+			mojo/core/
+			mojo/core/embedder
+			mojo/core/ports
+			mojo/public/c/system
+			mojo/public/cpp/base
+			mojo/public/cpp/bindings
+			mojo/public/cpp/bindings/lib
+			mojo/public/cpp/platform
+			mojo/public/cpp/system
+		)
+		mojom_dirs+=(
+			mojo/public/interfaces/bindings
+			mojo/public/mojom/base
+		)
+
+		# Install libmojo.pc.
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins "${OUT}"/obj/libchrome/libmojo-"${BASE_VER}".pc
+
+		# Install generate_mojom_bindings.
+		# TODO(hidehiko): Clean up tools' install directory.
+		insinto /usr/src/libmojo-"${BASE_VER}"/mojo
+		doins -r mojo/public/tools/bindings/*
+		doins build/gn_helpers.py
+		doins -r build/android/gyp/util
+		doins -r build/android/pylib
+		exeinto /usr/src/libmojo-"${BASE_VER}"/mojo
+		doexe libchrome_tools/mojom_generate_type_mappings.py
+
+		insinto /usr/src/libmojo-"${BASE_VER}"/third_party
+		doins -r third_party/jinja2
+		doins -r third_party/markupsafe
+		doins -r third_party/ply
+
+		# Mark scripts executable.
+		fperms +x \
+			/usr/src/libmojo-"${BASE_VER}"/mojo/generate_type_mappings.py \
+			/usr/src/libmojo-"${BASE_VER}"/mojo/mojom_bindings_generator.py
+	fi
+
+	# Install header files.
+	local d
+	for d in "${header_dirs[@]}" ; do
+		insinto /usr/include/base-"${BASE_VER}"/"${d}"
+		doins "${d}"/*.h
+	done
+	for d in "${mojom_dirs[@]}"; do
+		insinto /usr/include/base-"${BASE_VER}"/"${d}"
+		doins "${OUT}"/gen/include/"${d}"/*.h
+		# Not to install mojom and pickle file to prevent misuse until Chromium IPC
+		# team is ready to have a stable mojo_base. see crbug.com/1055379
+		# insinto /usr/src/libchrome/mojom/"${d}"
+		# doins "${S}"/"${d}"/*.mojom
+		# insinto /usr/share/libchrome/pickle/"${d}"
+		# doins "${OUT}"/gen/include/"${d}"/*.p
+	done
+
+	# Install libchrome base type mojo mapping
+	if use mojo; then
+		insinto /usr/share/libchrome/mojom_type_mappings_typemapping
+		doins "${OUT}"/gen/libchrome/mojom_type_mappings_typemapping
+	fi
+
+	insinto /usr/share/libchrome
+	doins BASE_VER
+}
diff --git a/overlay-lakitu/chromeos-base/metrics/metrics-0.0.1-r3136.ebuild b/overlay-lakitu/chromeos-base/metrics/metrics-0.0.1-r3136.ebuild
new file mode 100644
index 0000000..12d7d20
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/metrics/metrics-0.0.1-r3136.ebuild
@@ -0,0 +1,110 @@
+# Copyright 2014 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT="e120a38324e6a4f913141f6cf31bccdb4d17caa2"
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "7e189936f29d145c4191ea147e48256c92fac75d" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_LOCALNAME="platform2"
+CROS_WORKON_PROJECT="chromiumos/platform2"
+CROS_WORKON_DESTDIR="${S}/platform2"
+CROS_WORKON_SUBTREE="common-mk metrics .gn"
+
+PLATFORM_SUBDIR="metrics"
+
+inherit cros-constants cros-workon libchrome-version platform systemd user
+
+DESCRIPTION="Metrics aggregation service for Chromium OS"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/metrics/"
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="fuzzer metrics_uploader +passive_metrics systemd"
+
+COMMON_DEPEND="
+	dev-libs/dbus-glib:=
+	dev-libs/libpcre:=
+	dev-libs/protobuf:=
+	sys-apps/rootdev:=
+	"
+
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="
+	${COMMON_DEPEND}
+	chromeos-base/session_manager-client:=
+	chromeos-base/system_api:=[fuzzer?]
+	chromeos-base/vboot_reference:=
+	"
+
+src_install() {
+	dobin "${OUT}"/metrics_client
+	dobin "${OUT}"/chromeos-pgmem
+
+	if use passive_metrics; then
+		dobin "${OUT}"/metrics_daemon
+		if use systemd; then
+			systemd_dounit init/metrics-daemon.service
+			systemd_enable_service multi-user.target metrics-daemon.service
+			systemd_dotmpfilesd init/metrics.conf
+		else
+			insinto /etc/init
+			doins init/metrics_library.conf init/metrics_daemon.conf
+		fi
+
+		if use metrics_uploader; then
+			if use systemd; then
+				sed -i '/ExecStart=/s:metrics_daemon:metrics_daemon -uploader:' \
+					"${D}"/usr/lib/systemd/system/metrics-daemon.service || die
+			else
+				sed -i '/DAEMON_FLAGS=/s:=.*:="-uploader":' \
+					"${D}"/etc/init/metrics_daemon.conf || die
+			fi
+		fi
+	fi
+
+	insinto /usr/$(get_libdir)/pkgconfig
+	local v="$(libchrome_ver)"
+	./platform2_preinstall.sh "${OUT}" "${v}"
+	dolib.so "${OUT}/lib/libmetrics-${v}.so"
+	doins "${OUT}/lib/libmetrics-${v}.pc"
+
+	insinto /usr/include/metrics
+	doins c_metrics_library.h \
+		cumulative_metrics.h \
+		metrics_library{,_mock}.h \
+		persistent_integer.h \
+		timer{,_mock}.h
+
+	# Install the protobuf so that autotests can have access to it.
+	insinto /usr/include/metrics/proto
+	doins uploader/proto/*.proto
+
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/metrics_library_consent_id_fuzzer
+	platform_fuzzer_install "${S}"/OWNERS \
+		"${OUT}"/metrics_serialization_utils_fuzzer
+}
+
+platform_pkg_test() {
+	# Disable asan container overflow checks that is coming from gtest,
+	# not metrics code, https://crbug.com/1067977 .
+	export ASAN_OPTIONS+=":detect_container_overflow=0:"
+	local tests=(
+		cumulative_metrics_test
+		metrics_library_test
+		$(usex passive_metrics 'metrics_daemon_test' '')
+		persistent_integer_test
+		process_meter_test
+		timer_test
+		upload_service_test
+	)
+
+	local test_bin
+	for test_bin in "${tests[@]}"; do
+		platform_test "run" "${OUT}/${test_bin}"
+	done
+}
+
+pkg_preinst() {
+	enewuser metrics
+	enewgroup metrics
+}
diff --git a/overlay-lakitu/chromeos-base/minijail/files/chromeos-version.sh b/overlay-lakitu/chromeos-base/minijail/files/chromeos-version.sh
new file mode 100755
index 0000000..e289018
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/minijail/files/chromeos-version.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# 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.
+
+# Look at the set of minijail tags (ignore Android ones) and grab the latest.
+git --git-dir="$1/.git" tag --list 'linux-v*' | \
+  sed 's:^linux-v::' | \
+  sort -V | \
+  tail -n1
diff --git a/overlay-lakitu/chromeos-base/minijail/minijail-14-r8.ebuild b/overlay-lakitu/chromeos-base/minijail/minijail-14-r8.ebuild
new file mode 100644
index 0000000..2c10c31
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/minijail/minijail-14-r8.ebuild
@@ -0,0 +1,115 @@
+# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT="a42182d5658f60679235e37a3cf6bdb8e598dda8"
+CROS_WORKON_TREE="52499e0eb2a6d3eaac83231e956caf2c68f564aa"
+CROS_WORKON_BLACKLIST=1
+CROS_WORKON_LOCALNAME="aosp/external/minijail"
+CROS_WORKON_PROJECT="platform/external/minijail"
+CROS_WORKON_REPO="https://android.googlesource.com"
+PYTHON_COMPAT=( python3_{6,7} )
+
+# TODO(crbug.com/689060): Re-enable on ARM.
+CROS_COMMON_MK_NATIVE_TEST="yes"
+
+DISTUTILS_OPTIONAL=1
+DISTUTILS_SINGLE_IMPL=1
+
+inherit cros-debug cros-sanitizers cros-workon cros-common.mk toolchain-funcs multilib distutils-r1
+
+DESCRIPTION="helper binary and library for sandboxing & restricting privs of services"
+HOMEPAGE="https://android.googlesource.com/platform/external/minijail"
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="asan cros-debug +seccomp test"
+
+COMMON_DEPEND="sys-libs/libcap:=
+	!<chromeos-base/chromeos-minijail-1"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+	cros_host? (
+		${PYTHON_DEPS}
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	)
+	test? (
+		dev-cpp/gtest:=
+	)"
+
+src_configure() {
+	sanitizers-setup-env
+	cros-common.mk_src_configure
+	export LIBDIR="/$(get_libdir)"
+	export USE_seccomp=$(usex seccomp)
+	export ALLOW_DEBUG_LOGGING=$(usex cros-debug)
+	export USE_SYSTEM_GTEST=yes
+	export DEFAULT_PIVOT_ROOT=/mnt/empty
+}
+
+# Use qemu-user to run the platform-specific dump_constants binary in order to
+# generate constants.json.
+generate_constants_json() {
+	local cmd
+	case "${ARCH}" in
+	x86)   cmd=( "${OUT}"/dump_constants ) ;;
+	amd64) cmd=( "${WORKDIR}"/sdk/dump_constants ) ;;
+	arm)   cmd=( qemu-arm "${OUT}"/dump_constants ) ;;
+	arm64) cmd=( qemu-aarch64 "${OUT}"/dump_constants ) ;;
+	*) die "Unsupported architecture in generate_constants_json(): ${ARCH}."
+	esac
+	echo "+" "${cmd[@]}" ">${OUT}/constants.json"
+	"${cmd[@]}" >"${OUT}"/constants.json || die
+}
+
+src_compile() {
+	# Avoid confusing people with our docs.
+	sed -i "s:/var/empty:${DEFAULT_PIVOT_ROOT}:g" minijail0.[15] || die
+
+	local minijail_targets=( all )
+
+	# We need to generate & run dump_constants.  Intel/AMD targets often use newer
+	# ISAs than our build systems & QEMU supports.  The constants care about kernel
+	# headers (for the most part), and our build keeps SDK & board headers in sync,
+	# so using the SDK compiler here should be safe for our needs.
+	if ! use cros_host; then
+		if use amd64; then
+			tc-env_build emake OUT="${WORKDIR}/sdk" dump_constants
+		else
+			minijail_targets+=( dump_constants )
+		fi
+	fi
+
+	cros-common.mk_src_compile "${minijail_targets[@]}"
+	if use cros_host ; then
+		BUILD_DIR="${OUT}" distutils-r1_python_compile
+	else
+		generate_constants_json
+	fi
+}
+
+src_install() {
+	into /
+	dosbin "${OUT}"/minijail0
+	dolib.so "${OUT}"/libminijail{,preload}.so
+
+	doman minijail0.[15]
+
+	if use cros_host ; then
+		distutils-r1_python_install
+	else
+		insinto /build/share
+		doins "${OUT}"/constants.json
+	fi
+
+	local include_dir="/usr/include/chromeos"
+
+	"${S}"/platform2_preinstall.sh "${PV}" "${include_dir}"
+	insinto "/usr/$(get_libdir)/pkgconfig"
+	doins libminijail.pc
+
+	insinto "${include_dir}"
+	doins libminijail.h
+	doins scoped_minijail.h
+}
diff --git a/overlay-lakitu/chromeos-base/update_engine/files/chromeos-version.sh b/overlay-lakitu/chromeos-base/update_engine/files/chromeos-version.sh
new file mode 100755
index 0000000..81da3c7
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/update_engine/files/chromeos-version.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Copyright (c) 2014 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 echo statement sets the package base version (without its -r value).
+# If it is necesary to add a new blocker or version dependency on this ebuild
+# at the same time as revving the ebuild to a known version value, editing this
+# version can be useful.
+echo 0.0.3
diff --git a/overlay-lakitu/chromeos-base/update_engine/files/update-engine.service b/overlay-lakitu/chromeos-base/update_engine/files/update-engine.service
new file mode 100644
index 0000000..716500c
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/update_engine/files/update-engine.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Chromium OS system update service
+After=network.target
+
+[Service]
+IOSchedulingClass=3
+ExecStart=/usr/sbin/update_engine --foreground --logtostderr
+Slice=system-sysdaemons.slice
+Restart=on-failure
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/overlay-lakitu/chromeos-base/update_engine/update_engine-0.0.3-r3572.ebuild b/overlay-lakitu/chromeos-base/update_engine/update_engine-0.0.3-r3572.ebuild
new file mode 100644
index 0000000..02d4d97
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/update_engine/update_engine-0.0.3-r3572.ebuild
@@ -0,0 +1,142 @@
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT=("6b7a4a600d398a34ec63c5b9dec33b4048f9e19f" "cc6ab9f076694a816fa35f133e98e7737542ddd8")
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "a9cad6253f307e9e129fa4dd846f45ebf5c1258e")
+CROS_WORKON_LOCALNAME=("platform2" "aosp/system/update_engine")
+CROS_WORKON_PROJECT=("chromiumos/platform2" "aosp/platform/system/update_engine")
+CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/update_engine")
+CROS_WORKON_USE_VCSID=1
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_SUBTREE=("common-mk .gn" "")
+
+PLATFORM_SUBDIR="update_engine"
+# Some unittests crash when run through qemu/arm.  Should figure this out.
+PLATFORM_NATIVE_TEST="yes"
+
+inherit cros-debug cros-workon platform systemd
+
+DESCRIPTION="Chrome OS Update Engine"
+HOMEPAGE="https://chromium.googlesource.com/aosp/platform/system/update_engine/"
+SRC_URI=""
+
+LICENSE="Apache-2.0"
+KEYWORDS="*"
+IUSE="cfm cros_p2p +dbus dlc fuzzer -hwid_override +power_management systemd"
+
+COMMON_DEPEND="
+	app-arch/bzip2:=
+	chromeos-base/chromeos-ca-certificates:=
+	chromeos-base/metrics:=
+	chromeos-base/vboot_reference:=
+	cros_p2p? ( chromeos-base/p2p:= )
+	dev-libs/expat:=
+	dev-libs/openssl:=
+	dev-libs/protobuf:=
+	dev-libs/xz-embedded:=
+	dev-util/bsdiff:=
+	dev-util/puffin:=
+	net-misc/curl:=
+	sys-apps/rootdev:="
+
+DEPEND="
+	app-arch/xz-utils:=
+	chromeos-base/debugd-client:=
+	dlc? ( chromeos-base/dlcservice-client:= )
+	chromeos-base/power_manager-client:=
+	chromeos-base/session_manager-client:=
+	chromeos-base/shill-client:=
+	chromeos-base/system_api:=[fuzzer?]
+	chromeos-base/update_engine-client:=
+	sys-fs/e2fsprogs:=
+	test? ( sys-fs/squashfs-tools:= )
+	${COMMON_DEPEND}"
+
+DELTA_GENERATOR_RDEPEND="
+	app-arch/unzip
+	app-arch/xz-utils
+	app-shells/bash
+	dev-util/shflags
+	sys-fs/e2fsprogs
+	sys-fs/squashfs-tools
+"
+
+RDEPEND="
+	chromeos-base/chromeos-installer
+	${COMMON_DEPEND}
+	cros_host? ( ${DELTA_GENERATOR_RDEPEND} )
+	power_management? ( chromeos-base/power_manager )
+	virtual/update-policy
+"
+
+platform_pkg_test() {
+	local unittests_binary="${OUT}"/update_engine_unittests
+
+	# The unittests will try to exec `./helpers`, so make sure we're in
+	# the right dir to execute things.
+	cd "${OUT}"
+	# The tests also want keys to be in the current dir.
+	# .pub.pem files are generated on the "gen" directory.
+	for f in unittest_key.pub.pem unittest_key2.pub.pem; do
+		cp "${S}"/${f/.pub} ./ || die
+		ln -fs gen/include/update_engine/$f $f  \
+			|| die "Error creating the symlink for $f."
+	done
+
+	# The unit tests check to make sure the minor version value in
+	# update_engine.conf match the constants in update engine, so we need to be
+	# able to access this file.
+	cp "${S}/update_engine.conf" ./
+
+	# If GTEST_FILTER isn't provided, we run two subsets of tests
+	# separately: the set of non-privileged  tests (run normally)
+	# followed by the set of privileged tests (run as root).
+	# Otherwise, we pass the GTEST_FILTER environment variable as
+	# an argument and run all the tests as root; while this might
+	# lead to tests running with excess privileges, it is necessary
+	# in order to be able to run every test, including those that
+	# need to be run with root privileges.
+	if [[ -z "${GTEST_FILTER}" ]]; then
+		platform_test "run" "${unittests_binary}" 0 '-*.RunAsRoot*'
+		platform_test "run" "${unittests_binary}" 1 '*.RunAsRoot*'
+	else
+		platform_test "run" "${unittests_binary}" 1 "${GTEST_FILTER}"
+	fi
+
+	for f in "omaha_request_action" "delta_performer"; do
+		platform_fuzzer_test "${OUT}/update_engine_${f}_fuzzer"
+	done
+}
+
+src_install() {
+	dosbin "${OUT}"/update_engine
+	dobin "${OUT}"/update_engine_client
+
+	if use cros_host; then
+		dobin "${OUT}"/delta_generator
+	fi
+
+	insinto /etc
+	doins update_engine.conf
+
+	if use systemd; then
+		systemd_dounit "${FILESDIR}"/update-engine.service
+		systemd_enable_service multi-user.target update-engine.service
+	else
+		# Install upstart script
+		insinto /etc/init
+		doins init/update-engine.conf
+	fi
+
+	# Install DBus configuration
+	insinto /etc/dbus-1/system.d
+	doins UpdateEngine.conf
+
+	platform_fuzzer_install "${S}"/OWNERS \
+				"${OUT}"/update_engine_omaha_request_action_fuzzer \
+				--dict "${S}"/fuzz/xml.dict
+	platform_fuzzer_install "${S}"/OWNERS \
+				"${OUT}"/update_engine_delta_performer_fuzzer
+}
diff --git a/overlay-lakitu/chromeos-base/vboot_reference/vboot_reference-1.0-r1980.ebuild b/overlay-lakitu/chromeos-base/vboot_reference/vboot_reference-1.0-r1980.ebuild
new file mode 100644
index 0000000..a70cee1
--- /dev/null
+++ b/overlay-lakitu/chromeos-base/vboot_reference/vboot_reference-1.0-r1980.ebuild
@@ -0,0 +1,104 @@
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CROS_WORKON_COMMIT="1a2ddae3d9782cbf0f0a1ab27ae3820c90abec54"
+CROS_WORKON_TREE="82e77f6c98187361303fffeeba118a1a365e16d5"
+CROS_WORKON_PROJECT="chromiumos/platform/vboot_reference"
+CROS_WORKON_LOCALNAME="platform/vboot_reference"
+
+inherit cros-debug cros-fuzzer cros-sanitizers cros-workon
+
+DESCRIPTION="Chrome OS verified boot tools"
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="cros_host dev_debug_force fuzzer pd_sync test tpmtests tpm tpm2"
+
+REQUIRED_USE="?? ( tpm2 tpm )"
+
+COMMON_DEPEND="dev-libs/libzip:=
+	dev-libs/openssl:=
+	sys-apps/util-linux:="
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}"
+
+get_build_dir() {
+	echo "${S}/build-main"
+}
+
+src_configure() {
+	# Determine sanitizer flags. This is necessary because the Makefile
+	# purposely ignores CFLAGS from the environment. So we collect the
+	# sanitizer flags and pass just them to the Makefile explicitly.
+	SANITIZER_CFLAGS=$(
+		append-flags() {
+			printf "%s" "$* "
+		}
+		sanitizers-setup-env
+	)
+	if use_sanitizers; then
+		# Disable alignment sanitization, https://crbug.com/1015908 .
+		SANITIZER_CFLAGS+=" -fno-sanitize=alignment"
+
+		# Suppressions for unit tests.
+		if use test; then
+			# Do not check memory leaks or odr violations in address sanitizer.
+			# https://crbug.com/1015908 .
+			export ASAN_OPTIONS+=":detect_leaks=0:detect_odr_violation=0:"
+			# Suppress array bound checks, https://crbug.com/1082636 .
+			SANITIZER_CFLAGS+=" -fno-sanitize=array-bounds"
+		fi
+	fi
+	cros-debug-add-NDEBUG
+	default
+}
+
+vemake() {
+	emake \
+		SRCDIR="${S}" \
+		LIBDIR="$(get_libdir)" \
+		ARCH=$(tc-arch) \
+		SDK_BUILD=$(usev cros_host) \
+		TPM2_MODE=$(usev tpm2) \
+		PD_SYNC=$(usev pd_sync) \
+		DEV_DEBUG_FORCE=$(usev dev_debug_force) \
+		FUZZ_FLAGS="${SANITIZER_CFLAGS}" \
+		"$@"
+}
+
+src_compile() {
+	mkdir "$(get_build_dir)"
+	tc-export CC AR CXX PKG_CONFIG
+	# vboot_reference knows the flags to use
+	unset CFLAGS
+	vemake BUILD="$(get_build_dir)" all $(usex fuzzer fuzzers '')
+}
+
+src_test() {
+	! use amd64 && ! use x86 && ewarn "Skipping unittests for non-x86" && return 0
+	vemake BUILD="$(get_build_dir)" runtests
+}
+
+src_install() {
+	einfo "Installing programs"
+	vemake \
+		BUILD="$(get_build_dir)" \
+		DESTDIR="${D}" \
+		install install_dev
+
+	if use tpmtests; then
+		into /usr
+		# copy files starting with tpmtest, but skip .d files.
+		dobin "$(get_build_dir)"/tests/tpm_lite/tpmtest*[^.]?
+		dobin "$(get_build_dir)"/utility/tpm_set_readsrkpub
+	fi
+
+	if use fuzzer; then
+		einfo "Installing fuzzers"
+		fuzzer_install "${S}"/OWNERS "$(get_build_dir)"/tests/cgpt_fuzzer
+		fuzzer_install "${S}"/OWNERS "$(get_build_dir)"/tests/vb2_keyblock_fuzzer
+		fuzzer_install "${S}"/OWNERS "$(get_build_dir)"/tests/vb2_preamble_fuzzer
+	fi
+}
diff --git a/overlay-lakitu/dev-libs/modp_b64/modp_b64-0.0.1-r61.ebuild b/overlay-lakitu/dev-libs/modp_b64/modp_b64-0.0.1-r61.ebuild
new file mode 100644
index 0000000..a575842
--- /dev/null
+++ b/overlay-lakitu/dev-libs/modp_b64/modp_b64-0.0.1-r61.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2015 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+CROS_WORKON_COMMIT=("c142078820d0707858873cedb290a78d36f531af" "467734f4870d3ab23968f5ebdd461f6112e4103b")
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "0d9f5ec1543458ecbe0d97bbabbdd59b79d56c5a")
+inherit cros-constants
+
+CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/modp_b64")
+CROS_WORKON_LOCALNAME=("../platform2" "../third_party/modp_b64")
+CROS_WORKON_PROJECT=("chromiumos/platform2" "aosp/platform/external/modp_b64")
+CROS_WORKON_SUBTREE=("common-mk .gn" "")
+
+PLATFORM_SUBDIR="modp_b64"
+
+WANT_LIBCHROME=no
+
+inherit cros-fuzzer cros-sanitizers cros-workon platform
+
+DESCRIPTION="Base64 encoder/decoder library."
+HOMEPAGE="https://github.com/client9/stringencoders"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="*"
+IUSE="fuzzer"
+
+src_install() {
+	dolib.a "${OUT}"/libmodp_b64.a
+
+	insinto /usr/include
+	doins -r modp_b64
+
+	fuzzer_install "${S}/OWNERS.fuzzer" "${OUT}"/modp_b64_decode_fuzzer
+	fuzzer_install "${S}/OWNERS.fuzzer" "${OUT}"/modp_b64_encode_fuzzer
+}
diff --git a/overlay-lakitu/dev-util/bsdiff/bsdiff-4.3.1-r29.ebuild b/overlay-lakitu/dev-util/bsdiff/bsdiff-4.3.1-r29.ebuild
new file mode 100644
index 0000000..c3e9338
--- /dev/null
+++ b/overlay-lakitu/dev-util/bsdiff/bsdiff-4.3.1-r29.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/bsdiff/bsdiff-4.3-r2.ebuild,v 1.1 2010/12/13 00:35:03 flameeyes Exp $
+
+EAPI=7
+
+CROS_WORKON_COMMIT=("9edc1ccf0b71426a4e0945a82963e78ba9613958" "4500e02a8a33ec8defead90294a1d8fa6d538145")
+CROS_WORKON_TREE=("e2a3a6742f6acdc76df13145ab31b6471243d736" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "a6219da561ac98cfa3cdf9d1fb98cf15b5b28473")
+inherit cros-constants
+
+# cros-workon expects the repo to be in src/third_party, but is in src/aosp.
+CROS_WORKON_LOCALNAME=("../platform2" "../aosp/external/bsdiff")
+CROS_WORKON_PROJECT=("chromiumos/platform2" "platform/external/bsdiff")
+CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/bsdiff")
+CROS_WORKON_REPO=("${CROS_GIT_HOST_URL}" "${CROS_GIT_AOSP_URL}")
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_BLACKLIST=1
+CROS_WORKON_SUBTREE=("common-mk .gn" "")
+
+PLATFORM_SUBDIR="bsdiff"
+
+inherit cros-workon platform
+
+DESCRIPTION="bsdiff: Binary Differencer using a suffix alg"
+HOMEPAGE="http://www.daemonology.net/bsdiff/"
+SRC_URI=""
+
+LICENSE="BSD-2"
+KEYWORDS="*"
+
+RDEPEND="
+	>=app-arch/brotli-1.0.6:=
+	app-arch/bzip2:=
+	dev-libs/libdivsufsort:=
+"
+DEPEND="${RDEPEND}"
+
+src_install() {
+	if use cros_host; then
+		dobin "${OUT}"/bsdiff
+		dobin "${OUT}"/bspatch
+	fi
+	dolib.a "${OUT}"/libbsdiff.a
+	dolib.a "${OUT}"/libbspatch.a
+
+	insinto /usr/include
+	doins -r include/bsdiff
+
+	insinto "/usr/$(get_libdir)/pkgconfig"
+	doins libbsdiff.pc libbspatch.pc
+
+	platform_fuzzer_install "${S}"/OWNERS "${OUT}"/bspatch_fuzzer
+}
+
+platform_pkg_test() {
+	platform_test "run" "${OUT}/bsdiff_test"
+
+	# Run fuzzer.
+	platform_fuzzer_test "${OUT}"/bspatch_fuzzer
+}
diff --git a/overlay-lakitu/dev-util/bsdiff/files/chromeos-version.sh b/overlay-lakitu/dev-util/bsdiff/files/chromeos-version.sh
new file mode 100755
index 0000000..2bcd274
--- /dev/null
+++ b/overlay-lakitu/dev-util/bsdiff/files/chromeos-version.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Copyright 2015 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.
+exec awk '$1 == "Version:" {print $2}' "$2"/README.chromium
diff --git a/overlay-lakitu/dev-util/bsdiff/metadata.xml b/overlay-lakitu/dev-util/bsdiff/metadata.xml
new file mode 100644
index 0000000..42d88df
--- /dev/null
+++ b/overlay-lakitu/dev-util/bsdiff/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>ferringb@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/overlay-lakitu/dev-util/puffin/files/chromeos-version.sh b/overlay-lakitu/dev-util/puffin/files/chromeos-version.sh
new file mode 100755
index 0000000..e199249
--- /dev/null
+++ b/overlay-lakitu/dev-util/puffin/files/chromeos-version.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# 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.
+exec awk '$1 == "Version:" {print $2}' "$2"/README.version
diff --git a/overlay-lakitu/dev-util/puffin/puffin-1.0.0-r434.ebuild b/overlay-lakitu/dev-util/puffin/puffin-1.0.0-r434.ebuild
new file mode 100644
index 0000000..dcb8aa5
--- /dev/null
+++ b/overlay-lakitu/dev-util/puffin/puffin-1.0.0-r434.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2017 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.
+
+EAPI=7
+
+CROS_WORKON_COMMIT=("9edc1ccf0b71426a4e0945a82963e78ba9613958" "3b9a741dc7310d343585ed92667ad6bc8ab0d067")
+CROS_WORKON_TREE=("e2a3a6742f6acdc76df13145ab31b6471243d736" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "7af8a5581078de78894a5f59bbd5e179fc71a804")
+inherit cros-constants
+
+CROS_WORKON_INCREMENTAL_BUILD="1"
+CROS_WORKON_LOCALNAME=("../platform2" "../aosp/external/puffin")
+CROS_WORKON_PROJECT=("chromiumos/platform2" "platform/external/puffin")
+CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/puffin")
+CROS_WORKON_REPO=("${CROS_GIT_HOST_URL}" "${CROS_GIT_AOSP_URL}")
+CROS_WORKON_SUBTREE=("common-mk .gn" "")
+CROS_WORKON_BLACKLIST=1
+
+PLATFORM_SUBDIR="puffin"
+
+inherit cros-workon platform
+
+DESCRIPTION="Puffin: Deterministic patching tool for deflate streams"
+HOMEPAGE="https://android.googlesource.com/platform/external/puffin/"
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="asan fuzzer"
+
+COMMON_DEPEND="chromeos-base/libbrillo:=[asan?,fuzzer?]
+	dev-libs/protobuf:=
+	dev-util/bsdiff:=
+"
+
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}"
+
+src_install() {
+	if use cros_host; then
+		dobin "${OUT}"/puffin
+	fi
+	dolib.a "${OUT}"/libpuffpatch.a
+	dolib.a "${OUT}"/libpuffdiff.a
+
+	insinto /usr/include
+	doins -r src/include/puffin
+
+	insinto "/usr/$(get_libdir)/pkgconfig"
+	doins libpuffdiff.pc libpuffpatch.pc
+
+	for f in "huff" "puff" "puffpatch"; do
+		platform_fuzzer_install "${S}"/OWNERS "${OUT}/puffin_${f}_fuzzer"
+	done
+}
+
+platform_pkg_test() {
+	platform_test "run" "${OUT}/puffin_test"
+
+	# Run fuzzers.
+	for f in "huff" "puff" "puffpatch"; do
+		platform_fuzzer_test "${OUT}/puffin_${f}_fuzzer"
+	done
+}
diff --git a/overlay-lakitu/profiles/base/package.mask b/overlay-lakitu/profiles/base/package.mask
index b168123..368f219 100644
--- a/overlay-lakitu/profiles/base/package.mask
+++ b/overlay-lakitu/profiles/base/package.mask
@@ -3,3 +3,20 @@
 sys-apps/shadow::portage-stable
 # Mask audit from chromiumos-overlay
 sys-process/audit::chromiumos
+# Forked packages from chromiumos-overlay
+chromeos-base/chromeos-common-script::chromiumos
+chromeos-base/chromeos-installer::chromiumos
+chromeos-base/crash-reporter::chromiumos
+chromeos-base/google-breakpad::chromiumos
+chromeos-base/libbrillo::chromiumos
+chromeos-base/libchrome::chromiumos
+chromeos-base/metrics::chromiumos
+chromeos-base/minijail::chromiumos
+chromeos-base/update_engine::chromiumos
+chromeos-base/vboot_reference::chromiumos
+dev-libs/modp_b64::chromiumos
+dev-util/bsdiff::chromiumos
+dev-util/puffin::chromiumos
+sys-apps/flashmap::chromiumos
+sys-apps/mosys::chromiumos
+sys-apps/rootdev::chromiumos
diff --git a/overlay-lakitu/sys-apps/flashmap/flashmap-0.3-r35.ebuild b/overlay-lakitu/sys-apps/flashmap/flashmap-0.3-r35.ebuild
new file mode 100644
index 0000000..26a39ea
--- /dev/null
+++ b/overlay-lakitu/sys-apps/flashmap/flashmap-0.3-r35.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2011 The Chromium OS Authors
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+EAPI=7
+CROS_WORKON_COMMIT="2f7b2e16f588dde75a0c9c28175f16b8cb9e11dc"
+CROS_WORKON_TREE="6fdc81bee0326e66662115d9bda50159bf41db9f"
+CROS_WORKON_PROJECT="chromiumos/third_party/flashmap"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
+
+inherit cros-workon toolchain-funcs python-r1
+
+DESCRIPTION="Utility for manipulating firmware ROM mapping data structure"
+HOMEPAGE="http://flashmap.googlecode.com"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="python"
+
+RDEPEND="python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+
+# Disable unit testing for now because one of the test cases for detecting
+# buffer overflow causes emake to fail when fmap_test is run.
+# RESTRICT="test" will override FEATURES="test" and will also cause
+# src_test() to be ignored by relevant scripts.
+RESTRICT="test"
+
+src_configure() {
+	tc-export AR CC LD NM STRIP OBJCOPY
+}
+
+src_test() {
+	# default "test" target uses lcov, so "test_only" was added to only
+	# build and run the test without generating coverage statistics
+	emake test_only
+}
+
+src_install() {
+	emake LIBDIR=$(get_libdir) DESTDIR="${D}" USE_PKG_CONFIG=1 install
+
+	if use python; then
+		install_python() {
+			insinto "$(python_get_sitedir)"
+			doins "fmap.py"
+		}
+		python_foreach_impl install_python
+	fi
+}
diff --git a/overlay-lakitu/sys-apps/mosys/Manifest b/overlay-lakitu/sys-apps/mosys/Manifest
new file mode 100644
index 0000000..af9166a
--- /dev/null
+++ b/overlay-lakitu/sys-apps/mosys/Manifest
@@ -0,0 +1,41 @@
+DIST aho-corasick-0.6.3.crate 24963 BLAKE2B 7d22a3501664a4324e43a20874fe4d2afcb1576d66f76bcfd894c0ea03b0daefd85e03e20196370dcb86d8c81067c3bc2202889349389c23b876d4b2bf8f2bbd SHA512 4d0d55d8a6657fe13009d66728b7417926325dd9ca4f7ad7cd5d40e59cf0a55b906cd109d724a0b385ee988526535fc64a467ded171419e452c5a8c90196ae45
+DIST ansi_term-0.9.0.crate 11718 BLAKE2B c3a29c8efe994822aa37854cc804ce2ea7f03ea622cfe05dd063f2e07f3d666ab7a8fc21f0f5a7f7f6c2a520b5cf6409ceb8b2438b3a416a44e70de4c094fa20 SHA512 4b5297d80f2a7fa840aeb1c31e7b893b33abcc7ce7f6f54371f6d7fc8e2915b43b5e3be3baab32b0821e174d8f7b58961029569a4f9e59b8a46c05f24ecaf04b
+DIST atty-0.2.3.crate 5486 BLAKE2B 5c1b3bc8cd680ae639302d51fd54a10ad2595ed112d7e179d200d81a0c3bce326cde22458c9c757beb6601f00fcb61000f6f1785b7ca6832ca28b9f58472d604 SHA512 9c944334333ca59d28588e164d2a68750eaf889dcc6b28bc49fe9a7990e0b1694d302a685142866362b7b97ef3f36daa410b59d6222e99cf6f096836850794cb
+DIST bindgen-0.31.3.crate 168734 BLAKE2B 97c57d76538292260cf9b97ad59dba330fe854796cc21e24bf6e1061324950cca8c922f7c00d215566da4bb7c2b969c3ccb2bca2f2a37a1f12d9cd701969f82b SHA512 237480b374c78fa7c87774d4470c704a869f19284fc75138cb0073551ae406298f4b6a9de20af3b8e0e848374b42a189314c154894f36a55cd0b092e654d4f35
+DIST bitflags-0.9.1.crate 12406 BLAKE2B e89527c5411150c09bc16072e0e4e5b2dde4b50fb2ed76984c1b58db225912db580f96c7954cbbf597036e9d743658364977ba24d0d7660312c3b8d38306d879 SHA512 3c106186aa8b5b8d0fba377818618e6428af38f60e4f707873142b44cb6f64d1d7f347840c8bfba084ff569ac8c57d87f2288c4a1d79e282bc02544d69f976c0
+DIST cexpr-0.2.2.crate 15614 BLAKE2B 50053511c9c5db165bfdef54b064ef6ec630a555f2bec7b0183f9e6b015db153e524d63e30566f09b9664ccabc48e58aef41b06a88eba6ee0567a4473dc10f1b SHA512 da28e3450ca5556aec737e1d55eec7206ba5b5ffdfa85d0ff821b002e39982e0a99528d0ae6d7bb3a9cc546e329eda14cabee7c04e99bd1017487b03d1029e55
+DIST cfg-if-0.1.2.crate 6668 BLAKE2B fd1960dfd30b3514bdb9943dba6418957068aaad3548667216d6dd4e4921a0df07d96cc4131f7b5121cacfb91aa59a802a47663a7b04ff401fa5b25ee1d321ea SHA512 ed6732d8ef2c99d99861f5dcfec3bcd2d1b62dcf6e8e4e88ca25148b5566f86418270dbbe9a7d2fae62a8320d432c5e0474059fa25a11c0f66787084e36f36aa
+DIST clang-sys-0.21.1.crate 30607 BLAKE2B 8b6c237cd1701afc0332d685ab2c37a9c42b8220012585eb30421d45b26ee9a6979f78e5cba156ea2c6d215aa49afa0644a8186e9985b83e5869be085c768876 SHA512 13dec9956f03db92e5193c1287d93f59fe6b6a20b49dfadf2e10de95f9009b094ad7c8d11e073af4407e95d94550360cbad45e384c19abc49bffc6047ffbaca3
+DIST clap-2.27.1.crate 186705 BLAKE2B 3bef758537c222d026d23c85b030af6382bb05a530ddc9392e835fd755e9cdc876a91b1c344d88de45f092f66552402a1e5dee5fc6492057b3855f4b17951032 SHA512 741a7f1822bea35be6f0432084767c6c43cf5f8ac20c1fb275ef600566b9bbdfcf012932f1b700b463b10936f8c518db5fcda8a888a20c4fbfe559616bb38aa5
+DIST env_logger-0.4.3.crate 10891 BLAKE2B acbe308cb75ad68f824dd8cbbef13a9bab3234f121952f16af274180ce87bbde6f6327bd98f0d2a4623fa7a4980b554ffecc9280b709df1323de149399537d6d SHA512 ba2c10608f87804e528a2de28c236e780485413dbc3835b5bd9acf4a9c11d9c66665a310747b5d8a5ef7752186ab8a1ab5fbf6042657a3447380cb0869722246
+DIST getopts-0.2.15.crate 17962 BLAKE2B 5f6c76dd978b9457035c0b856088825403bda33510b12c44d41f01c37805c7b9ddd49b14895fb9b1a41c0f51bc68abb104ef7605f39566eeb6fb874e49d5a62d SHA512 eeddb32e1833e658e18ac435d9bf42dc6f09af84b04ed21104de95dc67d31327e35b9bd42cbc8d512cf548ba6ddd0c798524697bbad315dd7f1d87de8f620aee
+DIST getopts-0.2.21.crate 18457 BLAKE2B 10651e947e49acc768d99ae56ca5a7f37c1f61bbd1674e2ca58e3ae563fd64f3563d53ccdd0ae7a878710a39e13a99ac8c274974157db2c691f8c222de14992d SHA512 5515ae6ccb0f03efb783683f46cfd1755342c4e83bb673ff8914c7f9dea0dae333f8d9703865e992659a359067df0e8b0e2253de0d4b0c7707cbe7d73401bb1f
+DIST glob-0.2.11.crate 18065 BLAKE2B 8531890ce378023f0119baccd5c556f297128d3f09c07d320d5cdc3c90032447f2e5a4f2fad0097bd3c6faf93b83256b387d232b3c9f9d3c40e54c48245321eb SHA512 91a1a751bc4ed3b13154aa056180f2b8123c33627cbe972bdd7986fb0b6f1ef90e59abd4128d6e4db5e69523d757440c7df9b9721a61f5ea5a091ffc9843e10e
+DIST kernel32-sys-0.2.2.crate 24537 BLAKE2B dfc4a1e31d3ec9e2ac62b890839919fb7fed1444070c1dcd75bb75acfb53556d6cf2eddf5a6639e7852a3df2a0cc715c5ce1d3fc898ef16a1687020d98f715bc SHA512 682bc7c629aefd035966a2873518fd60719121cca7d63d89d6c97ff5306f24d8b5055a3c91b4eedaec22b1d5dd3fb8b48ff7341a05bbd72d86e06c422dab473b
+DIST lazy_static-0.2.11.crate 12361 BLAKE2B 3fe6a480c30a792448a3a2b378e05634ec59603f07baa03c0881fe5af85ecde5a172bb0733e7043fb6c43eabc261635b23410658d48add09eef6d807a750d22f SHA512 c85ac434d1b7d41d638e76a142a43d925b96bdddda112b1abeca1bae160d828262a85cd333d72499fe1dc7ae9574d3db226106acb433328c056028eb8c42bfe6
+DIST lazy_static-1.0.0.crate 12611 BLAKE2B c7ffeb553b82cacfeacf214ab069cd0abbc6b83d670ad84704ecd30919c390055b3679ddc85e9a7d0add530df588f6cba4cfd7c5e44e9158b609edef2fe85e4e SHA512 73044fce4d00002d35931d4b28810feb5c28c3debfb7bd570d9a8434cf15c29c17f0daf29ac04d748a32f52a205d5f52ecf69aa395f49d46b825e3fc0cbcd41b
+DIST lazy_static-1.4.0.crate 10443 BLAKE2B 25b2e61bbac48f0dcbc79c81d7bf01f2403d8269ecb6be3ea6147bd00f7a588df15a91f44dfc18ada19b21faa71de4637c7d493a8628cbecd0e547d74e616a23 SHA512 e124c0521ec7c950f3c4a066821918da7a9c6e711115d98009ae7c351928fdddead852e7596fea5937a9c30e4e4ce8eee7099b20248b5d6e3b2494b6a6d88cb8
+DIST libc-0.2.33.crate 265087 BLAKE2B 479a45388c8d5bfba8c24a70af55b0a42cbcfe11b163abbb2aa568535c07fc580f3922d08780a0f27b08daa1ed4b7fe1dfc8bd2c15839ae55f8410794b7ba1de SHA512 dfb34d2838effccb3b55d03a9860eee7ac5e6f0f034d230784c51c3b5d08e51590509fed921811ff1834c4db4ac3796b2a78dbaee879de548e5aee992198981b
+DIST libloading-0.4.2.crate 15383 BLAKE2B bf4d8dff81b415cf8f5eba3434525ef98cc41db4307511df5b2d82b97bfe268d6f98083cc62bc948f5ad3625d462e9aa2b878181efc1ccd4ccced9f42a6e3ad8 SHA512 e60b876d8ca92650def7c3190a11354447ac9f372b4705d06f165b4f5c9c5a51b65da33438285445599bffd8d39d3acd186dc3bf3143e983c480efe17da6c9f4
+DIST log-0.3.8.crate 17756 BLAKE2B 1b06efd4625f9192e56629a5c8fd3072d876643ec5d42022e001d8c14139c56b7a2bbbaadeb5218a9ada6cd86aae26819dc4693eadb13ac1dd4ae93ac50554e8 SHA512 9fc80f2a72855a2b0260d6bfbdd55085791c67cb1896fd20da0a4d624125003cb0a10d9080c2fd7810ca67e41652a94177e1d091bdadeb5ea65c7c4acd666bd7
+DIST memchr-1.0.2.crate 8639 BLAKE2B 3177eb1792892c0a74c5a7696ba6a4543fd5fabbea60d77e9b55e9d7eed365f3ed1b6dce44911246b52b8ad9a05e51679f42f9ffd4e6bbdbb5d01b5155eef280 SHA512 322b70bb881bcc2f9046f2daac5d939fd581370fee82b7e0500e27738d1d91e11c3f65fbf4576e0d987043cd08e5cd2b39a5ecf66d0ba7d95f48b6fee502bc24
+DIST nom-3.2.1.crate 104073 BLAKE2B 0aadea9d5b79fb0b34ace1c1c410119c954982810d928a033ebc280a824da6af61035bd1b31fe5f610812b9ebdcc02839ad5e863148aa01733b5c8472335d70e SHA512 2baf05e568c426eaa1560569538e0f08706e40333a797374bd3f897bcadfcf239c6dc9eaabb99e9ac72d8b79e46f12ade8b5d88b04ce10ef24e8b21513392c77
+DIST peeking_take_while-0.1.2.crate 6697 BLAKE2B 31571604d00872900abcb677a483da93654de523bbdb0331c326dc9a3e531f246e571bebcb983e79dc46e33ed6dd32b978be509841ec0d9f1e7209c06289c22a SHA512 7bf8721987c3e2e1986683dd897746592a909382f02b840b777effec7d8b0a864c1a83b03c73d555e359f22c423168a54b75448a7e7b996b739527ce8c88b721
+DIST quote-0.3.15.crate 12041 BLAKE2B c5796b464539b018351b41b5e2287398681ccb2ca76f46178b4f310e61a8184afe9ea2b8dd7638f27bf5bf37f60458895497e51c82b31326abf6feb4f69404d7 SHA512 2e5dbe725c0f76a81c6624181b43b60b95dceac208e2babaad3fa6d1487794805169e2ffd967659e4bb4e1abebe96505be5a1007c514d10f2a63ef282d699ea7
+DIST redox_syscall-0.1.31.crate 13420 BLAKE2B 5e533c5db7dd026c490c4250761d105592a2958aba4643d50642d7e543f2850d09b8debadaebf1a7a5f4bcf4c9584bed3f7f6776d075681a4038d3bc53ba9499 SHA512 162655d5ba07857183a75bd7aaa3e190e8d1c2e80002319e5006a67c09a105fb3f3726fed1a116b7284712bf6a2bfde1607cb8b576251233c12b69582969a9f1
+DIST redox_termios-0.1.1.crate 3227 BLAKE2B 0b109d34e942735e804dd3da2a9639506e8bf6eb5b1f69ae021b115b0b75ae5159e8457abdf647dabfc19d5119cd3a44b8966635d7862cc66a8a997e4468e1ab SHA512 201d051900e919e2c6c6769ef252e51979d90133df16b6605e2a2f424cfb2e6e505e21add75ef5854fe5e0cab1ed1f1c1451010f072ae4bc8703c585a4323981
+DIST regex-0.2.2.crate 193403 BLAKE2B d8b439c1544b7faf15fa073f9e759a1a4bdc905290da12d22526e00d22462e5b4d29fa928a88cd6a60902958b828539d04c65f9d8f2d00b3b75805dff9763afe SHA512 208b671d06b260e4a130718a86ced88ee7f183bd056461bc6d44a15a22260a9ee05a014682bdb8bb7ff674fd33ac4748687c7ebd847578c7fecc8efbbb1993b3
+DIST regex-syntax-0.4.1.crate 121453 BLAKE2B da7f780fdb19e0516cbe94eb3361b8f3b02ed36dcd7e58eb8e3a16601f169652d45dc10657d400796fdb93be560ec6678e34315d9e94a05e9d0b11b476d8ae1a SHA512 0c6996d0b8c16053f6e4e6324053f8b6924313827d9fec59e209852aed11a18902a51bdaa98b95ab706a4b65896a201549cda2972b54ac2e2a2c704b61690a0f
+DIST strsim-0.6.0.crate 8500 BLAKE2B fb5d756691a359d086886bf579445a262d2691285c120670e1b9da828922e43630339d59e4dbc98fe1fd6c92785264bef645be4ca80681059d8ee9f6d7be582b SHA512 43cbcf2cab7f91515f52f20719e8013cff23807ca79a9a69f1997ec1ba2eacf713d64c88e33f4c9ba852fb3dda4b87e943587ae4b6ff5bfbbb81deb6dbf76a97
+DIST termion-1.5.1.crate 20659 BLAKE2B 5b4291c2c26a074c16eac2e7bcb40467380181bac69c941e5c958059dc239cbbfd74872d9bd3da65245d010f9fc39804c43dc96f4caab2499b021cf35977a6b0 SHA512 1d1536f08600c7c1f414b4579a1a6e7eff91f4c105504125118d3cadf71c7886a352d1c5f7e07f3d7c28aa8b4752f07b51eddb4d9adc6a9286f7b6bade2bec76
+DIST textwrap-0.9.0.crate 15795 BLAKE2B c4dd89d5757da74c145b6971cd08844f3a6eeb5d29ca012b67010743a2637ed83bca00eefb54ec3ddb1d02a06c9cc3b84984919e6fd187dd71ed9c2e8af41f63 SHA512 e176f703f971eefb5cfc1ecf9047858bd7610a58fa4103879fd963b292c79872bd8466ef8fc9742a428ac707400dade307e72fa965dc4d61da66e932e5b20c35
+DIST thread_local-0.3.4.crate 11760 BLAKE2B 7d1c7bc70d6f35a04074ae6d25d14b07f4f48742a8090a1465d2b6cfc9a80e50a737cc75d65f4bd1de226c341d10d630092fee3be74daaada88f567767217403 SHA512 51fc5e1f5046fafe794128e6655c3ed5fa54446d9db151abb5da6e2599b6fb03200746ff4e6adffb6b8a04d015966fd4860ea3eac50bc169ec04ba33978f849d
+DIST unicode-width-0.1.4.crate 15283 BLAKE2B 61a72cc00c929624bbf46ab89a8850270ce36d0c986dd302b436b98405e2b53c1199588c70920a3379fa55c9dadd070404a8d3580544c02ffe9bbdb6ed078215 SHA512 f06b243e533ab9c68d88ccd06a283dfff5fd13e9340cf11bfa74473fc9100bb704c34e7fb66919202a97e7d2ba2e7eed968eced02d557835a06e6a0166865ea3
+DIST unicode-width-0.1.6.crate 16394 BLAKE2B 8a4bd3dbe264635cbfe42c131f20a0e8f32989211434fbcc085abeb8b7fac841908e99c6130d626af363edf9b07fb82f6ddbc494812273521941d553980142c9 SHA512 d6c2e5a99ea359d866393a6b00e0e21e5d80e4e665e457c0f2f0bbebda53afeab75b1d9b6b79102339ee621bac5050e7d41621703a8fd9ffe1e74a5a4301aa05
+DIST unreachable-1.0.0.crate 6355 BLAKE2B c41706721e8124c695259c12741ee95f98d3599871bb7fae2f8cb0d63a04f0cff11e01ab0376867de4de8707fd50fbd02f8b6d9c19bedda84bb5938876c5d803 SHA512 054e0a471d1068b7703853d838c7c381ac6865ac1f8abae08747581e3754416ccec5b80a5b04fedbcd01e68bfeba286b849e3b8ea67bbe62444f2974655e4948
+DIST utf8-ranges-1.0.0.crate 8599 BLAKE2B eb356d94a937f5f7cd6ed17ba85c03fc1ced30ab9215aad1cda3e600dc6efd8bedef744a2dadc9664dc2cac0ef815f451e88db5b75f70eb1f50670dceeb7e244 SHA512 da498433597582970860db1c66ff1cc2ed8b0e2bf816e6aabdb40424ec03c3f28e6ca5e7592e464442004077735dca4144acd13c8f6a2e799d67504699422643
+DIST vec_map-0.8.0.crate 13742 BLAKE2B 5e1fd880c56f01d69d1680d77b361c89f94e77d75b0c8d1d49c780e6b729e3bc5e8d9a72e3a298bb350b1c27fac02dd7b31eb2f2018208f242b02d8d6d64af21 SHA512 7ce0c05c0b410577b489adb4d35376bc2a55c6041ce50e011b78415e952b5fb7fcff89fdd00b95e086de742f26ff057e99e55585824bbc0482e0ac2134406520
+DIST void-1.0.2.crate 2356 BLAKE2B 41578fb5507f94e7d135f9595cec107ed00a926f4968df8b59792d1676ba5b6980cd67310f820fc37a9c14ebe43a171833fa8dfc09eac5dd42f2ebe808632a83 SHA512 1cc7d282600dc0164d7e410aa895d5dc99de1174991549c6733c94cc2027026517f66797751d737869eae58c560fa26edbf43f36b3015eb2fd99828fe40e0aa1
+DIST which-1.0.3.crate 4949 BLAKE2B 5632f9bfe5d6118483b86f49e95fa150537386d1e40d14971b631074fccdc3fb366b2b5e91f421ebaf7b599a42e653a61019d22690376a9892250938c7161a5d SHA512 caee698c6461ccc997c422fe4d9bf42fa6adbfbb02f0f468d798793b517b08a65098410eb4d31c74943ac5d64d721673ebeccb64472fb0f1b19564b1e2511a90
+DIST winapi-0.2.8.crate 455145 BLAKE2B 50f3c2a0cf4eeedd6891b11392e520c1cca139a71f8f736eabaf43aa7e4b1b5d57697918978220459572d373940edf971eb8302f292cbff832283e905076319a SHA512 115e6f027cdd4a56f77ca24f4ab249d2a6cac1e1f955c826a9b6ee05db4861790a533f5e674aebbb540370fff52ed41618c2cd7c906e73200e92df213109cebe
+DIST winapi-build-0.1.1.crate 669 BLAKE2B 6c8d8e0f81574c086f06fb3f234b0e6759d293d1d254857c3d491e4d43279e5c2f57f2fcfdc9d5d7b083280f4cc2a75a6ee9bc1541ec6ce8f8d904ded0567faf SHA512 8b0a239e205a5368892f41c870a8a7ea16e3468c364b03382bef7fa3a2e7159b09c07661e95b1227578f6d72c14879daa4444b28c51ae20ef15d985d59ca5a77
diff --git a/overlay-lakitu/sys-apps/mosys/files/chromeos-version.sh b/overlay-lakitu/sys-apps/mosys/files/chromeos-version.sh
new file mode 100755
index 0000000..b054da1
--- /dev/null
+++ b/overlay-lakitu/sys-apps/mosys/files/chromeos-version.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo 1.2.3
diff --git a/overlay-lakitu/sys-apps/mosys/mosys-1.2.3-r1137.ebuild b/overlay-lakitu/sys-apps/mosys/mosys-1.2.3-r1137.ebuild
new file mode 100644
index 0000000..a5e070b
--- /dev/null
+++ b/overlay-lakitu/sys-apps/mosys/mosys-1.2.3-r1137.ebuild
@@ -0,0 +1,110 @@
+# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CROS_WORKON_COMMIT=("e0111498f44234609ad36837d4395ddc7d112ddf" "eff5277a2445e2078a94aeeb73450b713c496c64")
+CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "a33168fa557115c13e015436ab410a6f2038cb5e")
+CROS_WORKON_PROJECT=(
+	"chromiumos/platform2"
+	"chromiumos/platform/mosys"
+)
+CROS_WORKON_LOCALNAME=(
+	"../platform2"
+	"../platform/mosys"
+)
+CROS_WORKON_DESTDIR=(
+	"${S}/platform2"
+	"${S}/platform/mosys"
+)
+CROS_WORKON_INCREMENTAL_BUILD=1
+CROS_WORKON_SUBTREE=(
+	"common-mk"
+	""
+)
+
+MESON_AUTO_DEPEND=no
+
+WANT_LIBCHROME="no"
+WANT_LIBBRILLO="no"
+
+inherit meson flag-o-matic toolchain-funcs cros-unibuild cros-workon platform
+
+DESCRIPTION="Utility for obtaining various bits of low-level system info"
+HOMEPAGE="http://mosys.googlecode.com/"
+
+LICENSE="BSD-Google BSD Apache-2.0 MIT ISC Unlicense"
+SLOT="0"
+KEYWORDS="*"
+IUSE="generated_cros_config unibuild"
+
+RDEPEND="unibuild? (
+		!generated_cros_config? ( chromeos-base/chromeos-config )
+		generated_cros_config? ( chromeos-base/chromeos-config-bsp:= )
+	)
+	dev-util/cmocka
+	>=sys-apps/flashmap-0.3-r4
+	chromeos-base/minijail"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+	cros-workon_src_unpack
+	PLATFORM_TOOLDIR="${S}/platform2/common-mk"
+	S+="/platform/mosys"
+}
+
+src_configure() {
+	local platform_intf=""
+	local emesonargs=(
+		$(meson_use unibuild use_cros_config)
+		-Darch=$(tc-arch)
+	)
+
+	if use unibuild; then
+		emesonargs+=(
+			"-Dcros_config_data_src=${SYSROOT}${UNIBOARD_C_CONFIG}"
+		)
+		platform_intf="$(cros_config_host get-mosys-platform)"
+	else
+		# TODO(jrosenth): hard code some board to platform_intf
+		# mappings here for legacy non-unibuild boards.  For now, this
+		# feature is unibuild only.
+		true
+	fi
+
+	if [[ -n "${platform_intf}" ]]; then
+		emesonargs+=(
+			"-Dplatform_intf=${platform_intf}"
+		)
+	fi
+
+	# Necessary to enable LTO.  See crbug.com/1082378.
+	append-ldflags "-O2"
+
+	meson_src_configure
+}
+
+src_compile() {
+	meson_src_compile
+}
+
+platform_pkg_test() {
+	local tests=(
+		file_unittest
+		math_unittest
+		platform_unittest
+	)
+	local test_bin
+	for test_bin in "${tests[@]}"; do
+		platform_test "run" \
+			"${BUILD_DIR}/unittests/${test_bin}"
+	done
+}
+
+src_install() {
+	dosbin "${BUILD_DIR}/mains/mosys"
+
+	insinto /usr/share/policy
+	newins "seccomp/mosys-seccomp-${ARCH}.policy" mosys-seccomp.policy
+	dodoc README
+}
diff --git a/overlay-lakitu/sys-apps/rootdev/rootdev-0.0.1-r38.ebuild b/overlay-lakitu/sys-apps/rootdev/rootdev-0.0.1-r38.ebuild
new file mode 100644
index 0000000..839a17c
--- /dev/null
+++ b/overlay-lakitu/sys-apps/rootdev/rootdev-0.0.1-r38.ebuild
@@ -0,0 +1,45 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+CROS_WORKON_COMMIT="b2f37be7c25bc83b76f1b7063a4ef38b824dc4ef"
+CROS_WORKON_TREE="40c0bf77fe822e8e504d99f2ef90f3e3c5b58084"
+CROS_WORKON_PROJECT="chromiumos/third_party/rootdev"
+CROS_WORKON_OUTOFTREE_BUILD="1"
+
+inherit toolchain-funcs cros-sanitizers cros-workon
+
+DESCRIPTION="Chrome OS root block device tool/library"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/third_party/rootdev/"
+SRC_URI=""
+
+LICENSE="BSD-Google"
+KEYWORDS="*"
+IUSE="-asan"
+
+src_configure() {
+	sanitizers-setup-env
+	tc-export CC
+	default
+}
+
+src_compile() {
+	emake OUT="${WORKDIR}"
+}
+
+src_test() {
+	if ! use x86 && ! use amd64 ; then
+		einfo Skipping unit tests on non-x86 platform
+	else
+		sudo LD_LIBRARY_PATH=${WORKDIR} \
+			./rootdev_test.sh "${WORKDIR}/rootdev" || die
+	fi
+}
+
+src_install() {
+	cd "${WORKDIR}"
+	dobin rootdev
+	dolib.so librootdev.so*
+	insinto /usr/include/rootdev
+	doins "${S}"/rootdev.h
+}