diff options
Diffstat (limited to 'dev-embedded/rpi-eeprom')
-rw-r--r-- | dev-embedded/rpi-eeprom/Manifest | 5 | ||||
-rw-r--r-- | dev-embedded/rpi-eeprom/metadata.xml | 4 | ||||
-rw-r--r-- | dev-embedded/rpi-eeprom/rpi-eeprom-21.0_p1.ebuild | 100 |
3 files changed, 108 insertions, 1 deletions
diff --git a/dev-embedded/rpi-eeprom/Manifest b/dev-embedded/rpi-eeprom/Manifest index 107c0f4c8cdf..d9b63add11ca 100644 --- a/dev-embedded/rpi-eeprom/Manifest +++ b/dev-embedded/rpi-eeprom/Manifest @@ -1,5 +1,8 @@ AUX init.d_rpi-eeprom-update-1 394 BLAKE2B 4a42ba2bca9f1cc646f2b39f33f1752a34b62ee01234a595d7d11c32507b92d2cb6909d739f4deda9381222596278d5e7e4faab60933f43d01a4be0df2f0f3a7 SHA512 1a88b1e73b2a40f644e1b37cc89a1a32d8ef25d0e09ee8b7dc005f0a834ec20a66e029a0a6a7d7d4e8a3066593bb277800a464783c2bf2e5923a71d4416b5eea DIST rpi-eeprom_15.0-1.debian.tar.xz 10720 BLAKE2B c8915ebf859ebb1ea3a48af8077539a2513151f94b6965641970b717ad5a6693f4aa3867f241ce9cad5f47d371e7bfaaaa1e1fc34bad3e8059c7840bc5d567aa SHA512 92652b52eaf0d56c95ed23fcc5b4afe599e92d9331259d7450766cb53e06598bf3381a8716cf996c48fc2a20187523fc47e63aa365b2221c16284220042be3b8 DIST rpi-eeprom_15.0.orig.tar.gz 29800286 BLAKE2B ceda9bdc412a32443d0cb3fa444d1091f0f53215a5be6c546384a11f7fa28592d43bdf23f04a33925601b5e76e510b054b214d262904f03aafa2b959fcb5fc1e SHA512 eddea0c8057e13991e3a6493146c8785607162342321d48048ba5760ecc7f1c6687a03edffcd0be4a5549c333cdbb20e88d407c4212334e18178fb86cc6cd0a4 +DIST rpi-eeprom_21.0-1.debian.tar.xz 11876 BLAKE2B 5615237244e259a269f62951402ecf54bf947ff22efee157f664ddc49d4c053081544e05960dd934246fdccdf079d62d1932428718e8ad5ade09d0675af58ff5 SHA512 af347630ea8e3fffb5e86539067ca1005e71aea48b43e009bd6b50c602696e08e27ca931efbbc66f26c9bf30c98abd3853a221e067888597cad01078a1335b26 +DIST rpi-eeprom_21.0.orig.tar.gz 41026148 BLAKE2B 5398cf2087b0f5e0d3a2d9f113dbc788f82ff281b36ecbbd1689408db9368083ce77ff88e62a7eaa12dc524debe2f0724f6f00cc23bfb61160ae557bacfae57a SHA512 fc237efa8932a04e44bd47ad6837e5aed7547e3a9e0e03e196df801c83e95618290c04de7ee3458e6465bb273171084c664d6daaa49515e1dcbcd05cb3022f2d EBUILD rpi-eeprom-15.0_p1.ebuild 3026 BLAKE2B 0a13aead8a68667d57fb7e1c8c6f56e295bb8af5e9f5192d5c48357ce04eedac1e1436c7152ed97dcebbf63e9aa52ee3c3de25711bdbcdd2788d2280457198aa SHA512 ea55d6f16ba4c41fc911f075236e59bac65080485d4cb39556843fb9f6f928444697b02ce4be5e75b125f69bcf802c1d33ed0e1f49118f1c611fa491ac089c93 -MISC metadata.xml 596 BLAKE2B 075812117456e8457ad55e184a322ff86f8bc18a8470fcd52d63ec20e88c81db064ff5f6b023e7400d51d603886cb154a0a1485613cb326b8897f99c5c06c330 SHA512 9ebe09182734a60c3ed3a9e30b2cf9b9433f546e1f4cfc9d75b48813e61dc875b71593300e6bc628650cfbae49fc722713cfc88c8e0a387efe0dd6cca991fa2f +EBUILD rpi-eeprom-21.0_p1.ebuild 3107 BLAKE2B 70980fa0a0216d3c74f027de7257f68358fb106e1d5b10483a09be6b4e97bd913b09b4d2d4b40d01f9ae951a150a55c2d3e74ce5375fad3686f8209c2dad7e03 SHA512 ec90be1cdec1b8e62f155c9e6c68c63dbc1d0d4d1a31bd2ed8c8a205c1ebc2806f8981cd6519f3dd282084670c8e9fa47b30ac01a816bf76ab92afec9e83da2b +MISC metadata.xml 755 BLAKE2B 0bcea14f6e8681c1fa8088fe5097ee68465c77f82c4eb0c0f79483bfe0812a4cd64c52f662bee50a417f43f6504a99cbe9a6c3fc36cc6d2d57616f2357e44a4e SHA512 631b517ffb7db2051544bf725703a3c3274e5e80e10c8a19939934b22ce7ead3a477aa85ac10a9e84dcfbb87242fd1b853be6ae25e2698285c3c687828fb4d80 diff --git a/dev-embedded/rpi-eeprom/metadata.xml b/dev-embedded/rpi-eeprom/metadata.xml index fe9bc40f6b9f..074fc1d440e5 100644 --- a/dev-embedded/rpi-eeprom/metadata.xml +++ b/dev-embedded/rpi-eeprom/metadata.xml @@ -16,4 +16,8 @@ <upstream> <remote-id type="github">raspberrypi/rpi-eeprom</remote-id> </upstream> + <use> + <flag name="pi4">Install firmware files for the Raspberry Pi 4</flag> + <flag name="pi5">Install firmware files for the Raspberry Pi 5</flag> + </use> </pkgmetadata> diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-21.0_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-21.0_p1.ebuild new file mode 100644 index 000000000000..f6fc4077083e --- /dev/null +++ b/dev-embedded/rpi-eeprom/rpi-eeprom-21.0_p1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..12} ) + +inherit python-r1 systemd + +MY_P="${PN}-$(ver_cut 1-2)" +MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)" +DESCRIPTION="Updater for Raspberry Pi 4/5 bootloader and the VL805 USB controller" +HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/" +SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz + ${MY_BASE_URL}.orig.tar.gz" +S="${WORKDIR}" + +LICENSE="BSD rpi-eeprom" +SLOT="0" +KEYWORDS="~arm ~arm64" +IUSE="pi4 pi5" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + ^^ ( pi4 pi5 ) +" + +BDEPEND="sys-apps/help2man" +DEPEND="${PYTHON_DEPS}" +RDEPEND="${PYTHON_DEPS} + dev-embedded/raspberrypi-utils + sys-apps/flashrom + sys-apps/pciutils" + +src_prepare() { + default + sed -i \ + -e 's:/etc/default/rpi-eeprom-update:/etc/conf.d/rpi-eeprom-update:' \ + "${MY_P}/rpi-eeprom-update" || die "Failed sed on rpi-eeprom-update" + sed -i \ + -e 's:/usr/bin/rpi-eeprom-update:/usr/sbin/rpi-eeprom-update:' \ + "debian/rpi-eeprom.rpi-eeprom-update.service" || die "Failed sed on rpi-eeprom.rpi-eeprom-update.service" +} + +src_configure() { + use pi4 && export BROADCOM=2711 + use pi5 && export BROADCOM=2712 +} + +src_install() { + pushd "${MY_P}" 1>/dev/null || die "Cannot change into directory ${MY_P}" + + python_scriptinto /usr/sbin + python_foreach_impl python_newscript rpi-eeprom-config rpi-eeprom-config + + dosbin rpi-eeprom-update rpi-eeprom-digest + keepdir /var/lib/raspberrypi/bootloader/backup + + for dir in default latest critical stable beta; do + insinto /lib/firmware/raspberrypi/bootloader + doins -r firmware-$BROADCOM/${dir} + done + + dodoc firmware-$BROADCOM/release-notes.md + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Bootloader EEPROM configuration tool for the Raspberry Pi 4B" \ + --output=rpi-eeprom-config.1 ./rpi-eeprom-config || die "Failed to create manpage for rpi-eeprom-config" + + help2man -N \ + --version-string="${PV}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ + up-to-date and updates the EEPROM" \ + --output=rpi-eeprom-update.1 ./rpi-eeprom-update || die "Failed to create manpage for rpi-eeprom-update" + + doman rpi-eeprom-update.1 rpi-eeprom-config.1 + + newconfd rpi-eeprom-update-default rpi-eeprom-update + + popd 1>/dev/null || die + + pushd debian 1>/dev/null || die "Cannot change into directory debian" + + systemd_newunit rpi-eeprom.rpi-eeprom-update.service rpi-eeprom-update.service + newdoc changelog changelog.Debian + + popd 1>/dev/null || die + + newinitd "${FILESDIR}/init.d_rpi-eeprom-update-1" "rpi-eeprom-update" +} + +pkg_postinst() { + elog 'To have rpi-eeprom-update run at each startup, enable and start either' + elog '/etc/init.d/rpi-eeprom-update (for openrc users)' + elog 'or' + elog 'rpi-eeprom-update.service (for systemd users)' + elog '/etc/conf.d/rpi-eeprom-update contains the configuration.' + elog 'FIRMWARE_RELEASE_STATUS="critical|stable|beta" determines' + elog 'which release track you get. "critical" is recommended and the default.' +} |