| # |
| # Copyright 2024 Google LLC |
| # |
| # This program is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU General Public License |
| # version 2 as published by the Free Software Foundation. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| EAPI="7" |
| |
| inherit eutils cos-linux-mod |
| |
| DESCRIPTION="Kernel module for working with dmabufs in userland" |
| HOMEPAGE="https://github.com/google/dmabuf_importer_helper" |
| SRC_URI="https://github.com/google/dmabuf_importer_helper/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
| |
| LICENSE="GPL-2" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| S="${WORKDIR}/${PN//-/_}-${PV}" |
| |
| PATCHES=( |
| "${FILESDIR}/${PN}-1.2-fix-build.patch" |
| ) |
| |
| # modulename(libdir:srcdir:objdir) |
| MODULE_NAMES="import-helper(kernel/misc/dma-buf/google:${S}/src:${S}/src)" |
| |
| src_compile() { |
| cros_allow_gnu_build_tools |
| BUILD_PARAMS="CC=${CC} LD=${LD} KERNEL_SOURCES=\"${KBUILD_OUTPUT}\"" |
| BUILD_TARGETS="module" |
| cos-linux-mod_src_compile |
| } |
| |
| src_install() { |
| cos-linux-mod_src_install |
| } |