sys-boot/raspberrypi-firmware: don't install device tree blobs
authorAndrey Utkin <andrey_utkin@gentoo.org>
Mon, 25 Nov 2019 18:54:39 +0000 (18:54 +0000)
committerAndrey Utkin <andrey_utkin@gentoo.org>
Tue, 3 Dec 2019 13:32:12 +0000 (13:32 +0000)
Upstream git repo provides binaries of two natures in a single
repository:

* boot firmware files;
* prebuilt kernel files.

boot/*.dtb, boot/overlays/ belong to kernel, not boot firmware.

But for historical reasons, these files were installed by
sys-boot/raspberrypi-firmware package rather than
sys-kernel/raspberrypi-image, which would be more correct.

The problem with this is that users of kernels different than
sys-kernel/raspberrypi-image need to install different files into these
locations. This means such people have to avoid using
sys-boot/raspberrypi-firmware package completely.

A blocker dependency on old sys-kernel/raspberrypi-image versions is
added to protect from a situation when just raspberrypi-firmware is
being upgraded, and the machine ends up not having device tree files.

Upgrading to a new version may cause a disruption if the user doesn't
use sys-kernel/raspberrypi-image but still relies on device tree files
installed by raspberrypi-firmware package. This will be dealt with by a
news item. A special USE flag for smooth transition of such users is
considered an overkill, on presumption that this package is not
massively popular.

Package-Manager: Portage-2.3.66, Repoman-2.3.16
Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>
sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild

index 4b06dfa49939bd8ab97439d3f5bf886f6cf9a9b2..e1ebbe9b7e43a2ff5a050983bbecb597ff8c93b3 100644 (file)
@@ -10,6 +10,12 @@ HOMEPAGE="https://github.com/raspberrypi/firmware"
 LICENSE="GPL-2 raspberrypi-videocore-bin"
 SLOT="0"
 
+# Temporary safety measure to prevent ending up with a pair of
+# sys-kernel/raspberrypi-image and sys-boot/raspberrypi-firmware
+# none of which installed device tree files.
+# Remove when the mentioned version and all older ones are deleted.
+RDEPEND="!<=sys-kernel/raspberrypi-image-4.19.57_p20190709"
+
 if [[ "${PV}" == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/raspberrypi/firmware"
@@ -45,8 +51,6 @@ src_install() {
        insinto /boot
        cd boot || die
        doins bootcode.bin fixup*.dat start*elf
-       doins *.dtb
-       doins -r overlays
        newins "${FILESDIR}"/${PN}-0_p20130711-config.txt config.txt
        newins "${FILESDIR}"/${PN}-0_p20130711-cmdline.txt cmdline.txt
        newenvd "${FILESDIR}"/${PN}-0_p20130711-envd 90${PN}