blob: 70257aa37fae71195cc589ce8a802c3de7c9d884 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cros-constants
CROS_WORKON_COMMIT="f35f2919309cf11b0ddd9deb24a6b145d40d9254"
CROS_WORKON_TREE=("a625767bb59509159091f2ab0b71f8b9b4b2e353" "6fc4c6b35e5c71304e6fed40a7a24e6401d38df3" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
#CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_REPO="${CROS_GIT_HOST_URL}"
#CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk verity .gn"
CROS_WORKON_DESTDIR="${S}/platform2"
CROS_WORKON_EGIT_BRANCH="main"
PLATFORM_SUBDIR="verity"
inherit cros-workon platform
DESCRIPTION="File system integrity image generator for Chromium OS"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/verity/"
LICENSE="BSD-Google GPL-2"
KEYWORDS="*"
PATCHES=(
"${FILESDIR}/verity-print.patch"
)
src_prepare() {
# The workdir is platform2/nnapi - we need to pop up one level in the stack
# to apply our patches.
pushd .. || exit
eapply -p1 "${FILESDIR}/support-new-dm-verity-format.patch"
popd || exit
eapply_user
}
src_install() {
dobin "${OUT}"/verity
dolib.so "${OUT}"/lib/libdm-bht.so
insinto "/usr/$(get_libdir)/pkgconfig"
doins libdm-bht.pc
insinto /usr/include/verity
doins dm-bht.h dm-bht-userspace.h file_hasher.h
cd include || die
doins -r asm-generic
}
platform_pkg_test() {
platform_test "run" "${OUT}/verity_tests"
}