gjdwebserver-overlay/sys-kernel/pinephone-sources/pinephone-sources-5.16.0.ebuild

118 lines
6.7 KiB
Bash
Raw Normal View History

2022-01-10 22:05:10 +01:00
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
K_NOUSENAME="yes"
K_NOSETEXTRAVERSION="yes"
K_SECURITY_UNSUPPORTED="1"
ETYPE="sources"
inherit kernel-2
detect_version
KEYWORDS="~arm64"
DEPEND="${RDEPEND}
>=sys-devel/patch-2.7.5"
DESCRIPTION="Full sources for the Linux kernel, with megi's patch for pinephone"
MEGI_PATCH_URI="https://xff.cz/kernels/${PV:0:4}/patches/all.patch"
SRC_URI="${KERNEL_URI} ${MEGI_PATCH_URI} -> all-${PV}.patch"
PATCHES=(
${DISTDIR}/all-${PV}.patch
2022-01-11 10:06:42 +01:00
${DISTDIR}/0001-base-property-Swap-order-of-search-for-connection-to.patch
${DISTDIR}/0002-sdhci-arasan-Add-runtime-PM-support.patch
${DISTDIR}/0003-clk-rk3399-Export-SCLK_CIF_OUT_SRC-to-device-tree.patch
${DISTDIR}/0004-media-rockchip-rga-Fix-probe-bugs.patch
${DISTDIR}/0005-drm-dw-mipi-dsi-rockchip-Ensure-that-lane-is-properl.patch
${DISTDIR}/0006-drm-rockchip-dw-mipi-dsi-Fix-missing-clk_disable_unp.patch
${DISTDIR}/0007-drm-bridge-dw-mipi-dsi-Fix-enable-disable-of-dsi-con.patch
${DISTDIR}/0008-drm-dw-mipi-dsi-rockchip-Never-allow-lane-bandwidth-.patch
${DISTDIR}/0009-drm-rockchip-cdn-dp-Disable-CDN-DP-on-disconnect.patch
${DISTDIR}/0010-video-fbdev-Add-events-for-early-fb-event-support.patch
${DISTDIR}/0011-power-rk818-Configure-rk808-clkout2-function.patch
${DISTDIR}/0012-power-rk818-battery-Add-battery-driver-for-RK818.patch
${DISTDIR}/0013-power-supply-rk818-battery-Use-a-more-propper-compat.patch
${DISTDIR}/0014-power-supply-core-Don-t-ignore-max_current-of-0-when.patch
${DISTDIR}/0015-power-supply-rk818-charger-Implement-charger-driver-.patch
${DISTDIR}/0016-usb-typec-fusb302-Set-the-current-before-enabling-pu.patch
${DISTDIR}/0017-usb-typec-fusb302-Extend-debugging-interface-with-dr.patch
${DISTDIR}/0018-usb-typec-fusb302-Retry-reading-of-CC-pins-status-if.patch
${DISTDIR}/0019-usb-typec-fusb302-More-useful-of-logging-status-on-i.patch
${DISTDIR}/0020-usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-int.patch
${DISTDIR}/0021-usb-typec-fusb302-Make-tcpm-fusb302-logs-less-pollut.patch
${DISTDIR}/0022-usb-typec-fusb302-Add-OF-extcon-support.patch
${DISTDIR}/0023-usb-typec-fusb302-Fix-register-definitions.patch
${DISTDIR}/0024-usb-typec-fusb302-Clear-interrupts-before-we-start-t.patch
${DISTDIR}/0025-usb-typec-typec-extcon-Add-typec-extcon-bridge-drive.patch
${DISTDIR}/0026-phy-rockchip-typec-Make-sure-the-plug-orientation-is.patch
${DISTDIR}/0027-media-i2c-imx258-Add-support-for-powerdown-gpio.patch
${DISTDIR}/0028-media-i2c-imx258-Don-t-be-too-strict-about-clock-rat.patch
${DISTDIR}/0029-media-i2c-imx258-Add-support-for-reset-gpio.patch
${DISTDIR}/0030-media-i2c-imx258-Add-support-for-power-supplies.patch
${DISTDIR}/0031-media-ov5640-Add-more-framerates-to-the-driver-some-.patch
${DISTDIR}/0032-media-ov5640-Experiment-Try-to-disable-denoising-sha.patch
${DISTDIR}/0033-media-ov5640-Sleep-after-poweroff-to-ensure-next-pow.patch
${DISTDIR}/0034-media-ov5640-Don-t-powerup-the-sensor-during-driver-.patch
${DISTDIR}/0035-media-ov5640-Implement-autofocus.patch
${DISTDIR}/0036-media-ov5640-set-default-ae-target-lower.patch
${DISTDIR}/0037-drm-panel-hx8394-Add-driver-for-HX8394-based-HannSta.patch
${DISTDIR}/0038-drm-panel-hx8394-Improve-the-panel-driver-make-it-wo.patch
${DISTDIR}/0039-drm-panel-hx8394-Fix-mode-clock-for-the-pinephone-pr.patch
${DISTDIR}/0040-input-goodix-Add-option-to-power-off-the-controller-.patch
${DISTDIR}/0041-input-goodix-Don-t-disable-regulators-during-suspend.patch
${DISTDIR}/0042-input-touchscreen-goodix-Respect-IRQ-flags-from-DT-w.patch
${DISTDIR}/0043-input-touchscreen-goodix-Add-support-for-GT1158.patch
${DISTDIR}/0044-arm64-dts-rk3399-pinephone-pro-Add-support-for-Pinep.patch
${DISTDIR}/0045-arm64-dts-rk3399-pinephone-pro-Fixup-DT-validation-i.patch
${DISTDIR}/0046-arm64-dts-rk3399-pinephone-pro-Make-charging-and-per.patch
${DISTDIR}/0047-arm64-dts-rk3399-pinephone-pro-Fix-goodix-toucscreen.patch
${DISTDIR}/0048-arm64-dts-rk3399-pinephone-pro-Correct-the-pmu1830-i.patch
${DISTDIR}/0049-arm64-dts-rk3399-pinephone-pro-Power-off-goodix-touc.patch
${DISTDIR}/0050-arm64-dts-rk3399-pinephone-pro-Add-support-for-both-.patch
${DISTDIR}/0051-arm64-dts-rk3399-pinephone-pro-Fix-SD-card-power-sup.patch
${DISTDIR}/0052-arm64-dts-rk3399-pinephone-pro-Correct-the-battery-s.patch
${DISTDIR}/0053-arm64-dts-rk3399-pinephone-pro-Cleanup-some-USB-node.patch
${DISTDIR}/0054-arm64-dts-rk3399-pinephone-pro-Fix-PDOs-to-be-more-r.patch
${DISTDIR}/0055-arm64-dts-rk3399-pinephone-pro-Add-chassis-type-hand.patch
${DISTDIR}/0056-arm64-dts-rk3399-pinephone-pro-Add-mmc-aliases-to-ge.patch
${DISTDIR}/0057-arm64-dts-rk3399-pinephone-pro-Use-a-new-rk818-batte.patch
${DISTDIR}/0058-arm64-dts-rk3399-pinephone-pro-Full-support-for-Type.patch
${DISTDIR}/0059-arm64-dts-rk3399-pinephone-pro-Use-DCLK_VOP-_FRAC-to.patch
${DISTDIR}/0060-arm64-dts-rk3399-pinephone-pro-Add-support-for-power.patch
${DISTDIR}/0061-arm64-dts-rk3399-pinephone-pro-Add-audio-support.patch
${DISTDIR}/0062-arm64-dts-rk3399-pinephone-pro-Add-flash-and-fix-led.patch
${DISTDIR}/0063-arm64-dts-rk3399-pinephone-pro-add-modem-RI-pin.patch
${DISTDIR}/0064-arm64-dts-rk3399-pinephone-pro-improve-sound-device.patch
# Pinephone Keyboard
${DISTDIR}/d1d849cae12db71aa81ceedaedc1b17a34790367.patch
${DISTDIR}/2423aac2d6f5db55da99e11fd799ee66fe6f54c6.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 use kernel config coming with this ebuild, don't forget to also copy dracut-pp.conf to /etc/dracut.conf.d/"
einfo "to make sure proper kernel modules are loaded into initramfs"
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
}