2022-01-19 13:27:36 +01:00
|
|
|
# Copyright 1999-2022 Gentoo Authors
|
2022-01-10 22:05:10 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2022-01-19 13:27:36 +01:00
|
|
|
|
2022-01-10 22:05:10 +01:00
|
|
|
EAPI="8"
|
|
|
|
ETYPE="sources"
|
2022-01-19 13:27:36 +01:00
|
|
|
K_WANT_GENPATCHES="base extras"
|
|
|
|
K_GENPATCHES_VER="1"
|
|
|
|
|
2022-01-21 11:06:50 +01:00
|
|
|
MEGI_PATCH_URI="https://xff.cz/kernels/${PV:0:4}/patches/all.patch"
|
|
|
|
|
2022-01-10 22:05:10 +01:00
|
|
|
inherit kernel-2
|
|
|
|
detect_version
|
2022-01-19 13:27:36 +01:00
|
|
|
detect_arch
|
2022-01-10 22:05:10 +01:00
|
|
|
|
|
|
|
KEYWORDS="~arm64"
|
|
|
|
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
>=sys-devel/patch-2.7.5"
|
|
|
|
|
2022-01-21 11:06:50 +01:00
|
|
|
DESCRIPTION="Full sources for the Linux kernel with gentoo patchset and with megi's patch for the PinePhone and PinePhone Pro"
|
2022-01-10 22:05:10 +01:00
|
|
|
|
2022-01-21 11:06:50 +01:00
|
|
|
SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${MEGI_PATCH_URI} -> all-${PV}.patch"
|
2022-01-10 22:05:10 +01:00
|
|
|
|
|
|
|
PATCHES=(
|
2022-01-21 11:06:50 +01:00
|
|
|
#Megi patch set
|
2022-01-10 22:05:10 +01:00
|
|
|
${DISTDIR}/all-${PV}.patch
|
2022-01-11 10:06:42 +01:00
|
|
|
# Pinephone Keyboard
|
2022-01-21 11:06:50 +01:00
|
|
|
${FILESDIR}/pp-keyboard.patch
|
|
|
|
${FILESDIR}/ppp-keyboard.patch
|
2022-01-10 22:05:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
default
|
|
|
|
eapply_user
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
kernel-2_pkg_postinst
|
|
|
|
einfo "For more info on this patchset, and how to report problems, see:"
|
|
|
|
einfo "${HOMEPAGE}"
|
|
|
|
einfo "To build the kernel use the following command:"
|
|
|
|
einfo "make Image Image.gz modules"
|
|
|
|
einfo "make DTC_FLAGS="-@" dtbs"
|
|
|
|
einfo "make install; make modules_intall; make dtbs_install"
|
|
|
|
einfo "if you want to cross compile pinephone kernel on amd64 host, follow the https://wiki.gentoo.org/wiki/Cross_build_environment"
|
|
|
|
einfo "to setup cross toolchain environment, then create a xmake wrapper like the following, and replace make with xmake in above commands"
|
|
|
|
einfo "#!/bin/sh"
|
|
|
|
einfo "exec make ARCH='arm64' CROSS_COMPILE='aarch64-unknown-linux-gnu-' INSTALL_MOD_PATH='${SYSROOT}' '$@'"
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm() {
|
|
|
|
kernel-2_pkg_postrm
|
|
|
|
}
|
2022-01-21 11:06:50 +01:00
|
|
|
|