From 8cfc9f6e7de0a37ddaf22459da98588abcd689eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 13 Sep 2020 21:34:15 +0200 Subject: sys-kernel/linux: update to 5.8.9 and try enable USB more --- sys-kernel/linux/Manifest | 2 +- sys-kernel/linux/files/overlay.config | 4 ++ sys-kernel/linux/linux-5.8.7-r1.ebuild | 99 ---------------------------------- sys-kernel/linux/linux-5.8.9-r1.ebuild | 99 ++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 100 deletions(-) delete mode 100644 sys-kernel/linux/linux-5.8.7-r1.ebuild create mode 100644 sys-kernel/linux/linux-5.8.9-r1.ebuild diff --git a/sys-kernel/linux/Manifest b/sys-kernel/linux/Manifest index 7db1ee9..5a432cd 100644 --- a/sys-kernel/linux/Manifest +++ b/sys-kernel/linux/Manifest @@ -1 +1 @@ -DIST linux-5.8.7.tar.gz 180873144 BLAKE2B 4ae8b905954c04d77f5e1b1126a7486d38595304624cb7f6a1cfc77cd8f7fab3e2d9bd2c650a597617192e9d9b19c5f96bc991da1921c5ea198ac939c1c7e406 SHA512 3d0e907652aca841fdc5f5c4a31a683b668ffbec55396e0d04eba5b98337b77bf27a030c5adc0034fc8c150f2f11a0af3c51d7a466c9707ed12924850fa73d29 +DIST linux-5.8.9.tar.gz 180892355 BLAKE2B c6cf8f2a351e89f3f680f5322468472df8e2f400a9fdb863bdfcec7e64f95f19b8bbe5c94cc18c177be760d055fbb28f41f3cc49ebfcf190ba13ed80711b6741 SHA512 2a2e330791d081aa1dacc1a7969dc7f56b2e80eafcce382a1cc6603833aeb18ca3dc4b98828abbf1af94a4969e33974d6833e4be50e03c28634fa75a560d2e39 diff --git a/sys-kernel/linux/files/overlay.config b/sys-kernel/linux/files/overlay.config index 1cf6f15..aded1b6 100644 --- a/sys-kernel/linux/files/overlay.config +++ b/sys-kernel/linux/files/overlay.config @@ -33,7 +33,11 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=y # Built in USB CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PCI=y +CONFIG_USB_XHCI_PCI_RENESAS=y +CONFIG_USB_XHCI_PLATFORM=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y CONFIG_USB_STORAGE=y # Built in HID (keyboard and so on) CONFIG_HID_GENERIC=y diff --git a/sys-kernel/linux/linux-5.8.7-r1.ebuild b/sys-kernel/linux/linux-5.8.7-r1.ebuild deleted file mode 100644 index 55ebb88..0000000 --- a/sys-kernel/linux/linux-5.8.7-r1.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -VER="${PV%-r*}" -REV="r${PV##*-r}" - -DESCRIPTION="Linux kernel" -HOMEPAGE="http://kernel.org/" -SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-${VER}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/linux-${VER}" - -LICENSE="GPLv2" -SLOT="${PV}" -KEYWORDS="amd64 ~x86" -IUSE="amd intel initramfs ucode" - -RDEPEND="initramfs? ( sys-boot/myinitramfs )" -DEPEND=" - sys-devel/bc - dev-libs/elfutils - dev-util/dwarves -" - -src_configure() { - # Fix ARCH variable - [ "$ARCH" = "amd64" ] && ARCH="x86" - - "${FILESDIR}"/config_prepare.sh $(usev amd) $(usev intel) \ - || die "Configuration application failed" -} - -src_install() { - emake modules_install INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${D}/lib/firmware/${PV}" - - dodir /boot - insinto /boot - newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}" - - # Package source (kind of annoying because of some packages expecting it) - emake clean - dodir /usr/src - cp -a "${S}" "${D}/usr/src/linux-${PV}" -} - -# Link /usr/src/linux to newest kernel -src_link() { - ( - cd "${ROOT}/usr/src" - rm -f linux - ln -s $(ls | grep "linux-" | sort | tail -1) linux - ) -} - -sysfile() { - if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then - SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" - elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then - SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" - elif [ -f "${ROOT}/boot/extlinux.conf" ]; then - SYSLINUX="${ROOT}/boot/extlinux.conf" - else - eerror "Can't locate syslinux configuration!" - fi -} - -pkg_postinst() { - # Add label to syslinux config if there is non yet - sysfile - if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then - if $(use initramfs); then - if $(use ucode); then - INITRD="\tINITRD /ucode.cpio,/initramfs-gentoo\n" - else - INITRD="\tINITRD /initramfs-gentoo\n" - fi - fi - ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" - if [ -n "$ARGS" ]; then - sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" - sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" - else - eerror "Adding label to syslinux configuration failed as there are no arguments" - fi - fi - - src_link -} - -pkg_prerm() { - # Remove label from syslinux config - sysfile - sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!" -} - -pkg_postrm() { - src_link -} diff --git a/sys-kernel/linux/linux-5.8.9-r1.ebuild b/sys-kernel/linux/linux-5.8.9-r1.ebuild new file mode 100644 index 0000000..55ebb88 --- /dev/null +++ b/sys-kernel/linux/linux-5.8.9-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VER="${PV%-r*}" +REV="r${PV##*-r}" + +DESCRIPTION="Linux kernel" +HOMEPAGE="http://kernel.org/" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/snapshot/linux-${VER}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/linux-${VER}" + +LICENSE="GPLv2" +SLOT="${PV}" +KEYWORDS="amd64 ~x86" +IUSE="amd intel initramfs ucode" + +RDEPEND="initramfs? ( sys-boot/myinitramfs )" +DEPEND=" + sys-devel/bc + dev-libs/elfutils + dev-util/dwarves +" + +src_configure() { + # Fix ARCH variable + [ "$ARCH" = "amd64" ] && ARCH="x86" + + "${FILESDIR}"/config_prepare.sh $(usev amd) $(usev intel) \ + || die "Configuration application failed" +} + +src_install() { + emake modules_install INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${D}/lib/firmware/${PV}" + + dodir /boot + insinto /boot + newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}" + + # Package source (kind of annoying because of some packages expecting it) + emake clean + dodir /usr/src + cp -a "${S}" "${D}/usr/src/linux-${PV}" +} + +# Link /usr/src/linux to newest kernel +src_link() { + ( + cd "${ROOT}/usr/src" + rm -f linux + ln -s $(ls | grep "linux-" | sort | tail -1) linux + ) +} + +sysfile() { + if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then + SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" + elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then + SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" + elif [ -f "${ROOT}/boot/extlinux.conf" ]; then + SYSLINUX="${ROOT}/boot/extlinux.conf" + else + eerror "Can't locate syslinux configuration!" + fi +} + +pkg_postinst() { + # Add label to syslinux config if there is non yet + sysfile + if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then + if $(use initramfs); then + if $(use ucode); then + INITRD="\tINITRD /ucode.cpio,/initramfs-gentoo\n" + else + INITRD="\tINITRD /initramfs-gentoo\n" + fi + fi + ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" + if [ -n "$ARGS" ]; then + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS}\n$INITRD" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" + sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX /bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n$INITRD" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" + else + eerror "Adding label to syslinux configuration failed as there are no arguments" + fi + fi + + src_link +} + +pkg_prerm() { + # Remove label from syslinux config + sysfile + sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!" +} + +pkg_postrm() { + src_link +} -- cgit v1.2.3