diff options
author | Sam James <sam@gentoo.org> | 2022-07-29 22:57:04 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-30 03:22:17 +0100 |
commit | 9c35ee04c85c74773e4549d1cbf860cce6f3fda5 (patch) | |
tree | 7d3487f168e35c1f7ccf577570e1494c3e47039e /sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild | |
parent | virtual/dist-kernel: Bump to 5.4.208 (diff) | |
download | gentoo-9c35ee04c85c74773e4549d1cbf860cce6f3fda5.tar.gz gentoo-9c35ee04c85c74773e4549d1cbf860cce6f3fda5.tar.bz2 gentoo-9c35ee04c85c74773e4549d1cbf860cce6f3fda5.zip |
sys-kernel/raspberrypi-image: add 5.15.32_p20220331
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild')
-rw-r--r-- | sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild b/sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild index dd284762191f..c63fac44773a 100644 --- a/sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild +++ b/sys-kernel/raspberrypi-image/raspberrypi-image-9999.ebuild @@ -1,12 +1,28 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit mount-boot +# Go to e.g. https://github.com/raspberrypi/firmware/tree/1.20211029/modules +# for the latest tag to see which kernel version it corresponds to. + DESCRIPTION="Raspberry Pi (all versions) kernel and modules" HOMEPAGE="https://github.com/raspberrypi/firmware" +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/raspberrypi/firmware" + EGIT_CLONE_TYPE="shallow" + inherit git-r3 +else + [[ $(ver_cut 4) == p ]] || die "Unsupported version format, tweak the ebuild." + MY_PV="1.$(ver_cut 5)" + + SRC_URI="https://github.com/raspberrypi/firmware/archive/${MY_PV}.tar.gz -> raspberrypi-firmware-${MY_PV}.tar.gz" + S="${WORKDIR}/firmware-${MY_PV}" + KEYWORDS="-* ~arm ~arm64" +fi + LICENSE="GPL-2 raspberrypi-videocore-bin" SLOT="0" RESTRICT="binchecks strip" @@ -18,17 +34,26 @@ RESTRICT="binchecks strip" # and all older ones are deleted. RDEPEND=">sys-boot/raspberrypi-firmware-1.20190709" -if [[ "${PV}" == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/raspberrypi/firmware" - EGIT_CLONE_TYPE="shallow" -else - [[ "$(ver_cut 4)" == 'p' ]] || die "Unsupported version format, tweak the ebuild." - MY_PV="1.$(ver_cut 5)" - SRC_URI="https://github.com/raspberrypi/firmware/archive/${MY_PV}.tar.gz -> raspberrypi-firmware-${MY_PV}.tar.gz" - S="${WORKDIR}/firmware-${MY_PV}" - KEYWORDS="-* ~arm ~arm64" -fi +src_prepare() { + default + + local expected_kernel_version="$(ver_cut 1-3)+" + local found_kernel_version=( "${S}"/modules/$(ver_cut 1).*.*+ ) + + found_kernel_version=${found_kernel_version[0]} + found_kernel_version=${found_kernel_version##*/} + + if [[ ${expected_kernel_version} != ${found_kernel_version} ]] ; then + eerror "Expected kernel version: ${expected_kernel_version}" + eerror "Found kernel version: ${found_kernel_version}" + die "Please fix ebuild version to contain ${found_kernel_version}!" + fi + + if [[ ! -d "${S}"/modules/${expected_kernel_version} ]] ; then + eerror "Kernel module directory is missing!" + die "${S}/modules/${expected_kernel_version} not found!" + fi +} src_install() { insinto /lib/modules |