| 1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| ... | ... | |
| 20 |
20 |
|
| 21 |
21 |
SRC_URI="https://github.com/raspberrypi/firmware/archive/${MY_PV}.tar.gz -> raspberrypi-firmware-${MY_PV}.tar.gz"
|
| 22 |
22 |
S="${WORKDIR}/firmware-${MY_PV}"
|
| 23 |
|
KEYWORDS="-* arm arm64"
|
|
23 |
KEYWORDS="-* ~arm ~arm64"
|
| 24 |
24 |
fi
|
| 25 |
25 |
|
| 26 |
26 |
LICENSE="GPL-2 raspberrypi-videocore-bin"
|
| 27 |
27 |
SLOT="0"
|
| 28 |
28 |
RESTRICT="binchecks strip"
|
| 29 |
29 |
|
| 30 |
|
# Temporary safety measure to prevent ending up with a pair of
|
| 31 |
|
# sys-kernel/raspberrypi-image and sys-boot/raspberrypi-firmware
|
| 32 |
|
# both of which installed device tree files.
|
| 33 |
|
# Restore to simply "sys-boot/raspberrypi-firmware" when the mentioned version
|
| 34 |
|
# and all older ones are deleted.
|
| 35 |
|
RDEPEND=">sys-boot/raspberrypi-firmware-1.20190709"
|
|
30 |
RDEPEND="sys-boot/raspberrypi-firmware"
|
| 36 |
31 |
|
| 37 |
32 |
src_prepare() {
|
| 38 |
33 |
default
|
| 39 |
34 |
|
| 40 |
|
local expected_kernel_version="$(ver_cut 1-3)+"
|
| 41 |
|
local found_kernel_version=( "${S}"/modules/$(ver_cut 1).*.*+ )
|
| 42 |
|
|
| 43 |
|
found_kernel_version=${found_kernel_version[0]}
|
| 44 |
|
found_kernel_version=${found_kernel_version##*/}
|
| 45 |
|
|
| 46 |
|
if [[ ${expected_kernel_version} != ${found_kernel_version} ]] ; then
|
| 47 |
|
eerror "Expected kernel version: ${expected_kernel_version}"
|
| 48 |
|
eerror "Found kernel version: ${found_kernel_version}"
|
| 49 |
|
die "Please fix ebuild version to contain ${found_kernel_version}!"
|
| 50 |
|
fi
|
| 51 |
|
|
| 52 |
|
if [[ ! -d "${S}"/modules/${expected_kernel_version} ]] ; then
|
| 53 |
|
eerror "Kernel module directory is missing!"
|
| 54 |
|
die "${S}/modules/${expected_kernel_version} not found!"
|
|
35 |
if [[ ${PV} != 9999 ]]; then
|
|
36 |
local expected_kernel_version="$(ver_cut 1-3)+"
|
|
37 |
local found_kernel_version=( "${S}"/modules/$(ver_cut 1).*.*+ )
|
|
38 |
|
|
39 |
found_kernel_version=${found_kernel_version[0]}
|
|
40 |
found_kernel_version=${found_kernel_version##*/}
|
|
41 |
|
|
42 |
if [[ ${expected_kernel_version} != ${found_kernel_version} ]] ; then
|
|
43 |
eerror "Expected kernel version: ${expected_kernel_version}"
|
|
44 |
eerror "Found kernel version: ${found_kernel_version}"
|
|
45 |
die "Please fix ebuild version to contain ${found_kernel_version}!"
|
|
46 |
fi
|
|
47 |
|
|
48 |
if [[ ! -d "${S}"/modules/${expected_kernel_version} ]] ; then
|
|
49 |
eerror "Kernel module directory is missing!"
|
|
50 |
die "${S}/modules/${expected_kernel_version} not found!"
|
|
51 |
fi
|
| 55 |
52 |
fi
|
| 56 |
53 |
}
|
| 57 |
54 |
|