From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-embedded/rpi-eeprom/files/, dev-embedded/rpi-eeprom/
Date: Thu, 26 Nov 2020 05:06:41 +0000 (UTC) [thread overview]
Message-ID: <1606367189.46fe1837f97b8d1580cc616c823c40b2e0d8accd.sam@gentoo> (raw)
commit: 46fe1837f97b8d1580cc616c823c40b2e0d8accd
Author: Peter Alfredsen <crabbedhaloablution <AT> icloud <DOT> com>
AuthorDate: Tue Nov 24 12:40:30 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 05:06:29 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46fe1837
dev-embedded/rpi-eeprom: new package
rpi-eeprom updates the Raspberry Pi 4 bootloader and the
VL805 USB controller
Closes: https://bugs.gentoo.org/753431
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Peter Alfredsen <crabbedhaloablution <AT> icloud.com>
Closes: https://github.com/gentoo/gentoo/pull/18386
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-embedded/rpi-eeprom/Manifest | 2 +
.../rpi-eeprom/files/init.d_rpi-eeprom-update-1 | 18 ++++
dev-embedded/rpi-eeprom/metadata.xml | 19 +++++
dev-embedded/rpi-eeprom/rpi-eeprom-10.2_p1.ebuild | 95 ++++++++++++++++++++++
4 files changed, 134 insertions(+)
diff --git a/dev-embedded/rpi-eeprom/Manifest b/dev-embedded/rpi-eeprom/Manifest
new file mode 100644
index 00000000000..e29caef5670
--- /dev/null
+++ b/dev-embedded/rpi-eeprom/Manifest
@@ -0,0 +1,2 @@
+DIST rpi-eeprom_10.2-1.debian.tar.xz 7360 BLAKE2B e7959c4de4f3675632f0897b6f8abc811c80daa102ad3fcca672a0e0f9ce4b4da80fd616de7aa8896f0f5fe889a10a52d32eba34627858a173186292175f3bf9 SHA512 cf401c5f761fc8c5b463630d192c8af9da2ae2e55e178857d9c09198437f162f96af23836d20adda6054243c6b613b7cc5c90a70975b96bad574dc3b328caa22
+DIST rpi-eeprom_10.2.orig.tar.gz 7415652 BLAKE2B b1f56263c0037b2ba3bac2aecd9b5736736cf599bc68a743c065c853a20f56f18984816fdfb402bb499c3aa911dbe72376cec4647d87406cce2f4328b04cc2b1 SHA512 ea76a157ed57984fb0667e9171e3fbf7dba180e014faa9352b0c1904531dca9528b0e3204645a4af2b550670a52354b6b1be6af27e190d4523d8044f3349aa73
diff --git a/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1 b/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1
new file mode 100644
index 00000000000..c7570c344f3
--- /dev/null
+++ b/dev-embedded/rpi-eeprom/files/init.d_rpi-eeprom-update-1
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Set configuration in /etc/conf.d/rpi-eeprom-update
+
+description="Raspberry Pi 4 bootloader and VL805 USB controller updater"
+command="/usr/sbin/rpi-eeprom-update"
+command_args="-a"
+
+depend() {
+ need localmount
+}
+
+stop() {
+ # Nothing to stop
+ return 0;
+}
diff --git a/dev-embedded/rpi-eeprom/metadata.xml b/dev-embedded/rpi-eeprom/metadata.xml
new file mode 100644
index 00000000000..a9b2bc66ba5
--- /dev/null
+++ b/dev-embedded/rpi-eeprom/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>crabbedhaloablution@icloud.com</email>
+ <name>Peter Alfredsen</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github"> raspberrypi/rpi-eeprom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-embedded/rpi-eeprom/rpi-eeprom-10.2_p1.ebuild b/dev-embedded/rpi-eeprom/rpi-eeprom-10.2_p1.ebuild
new file mode 100644
index 00000000000..c2417ac6a24
--- /dev/null
+++ b/dev-embedded/rpi-eeprom/rpi-eeprom-10.2_p1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} )
+
+inherit python-r1 systemd
+
+DESCRIPTION="Updater for Raspberry Pi 4 bootloader and the VL805 USB controller"
+HOMEPAGE="https://github.com/raspberrypi/rpi-eeprom/"
+MY_P="${PN}-$(ver_cut 1-2)"
+MY_BASE_URL="https://archive.raspberrypi.org/debian/pool/main/r/${PN}/${PN}_$(ver_cut 1-2)"
+SRC_URI="${MY_BASE_URL}-$(ver_cut 4).debian.tar.xz
+ ${MY_BASE_URL}.orig.tar.gz"
+SLOT="0"
+LICENSE="BSD rpi-eeprom"
+KEYWORDS="~arm ~arm64"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="sys-apps/help2man
+ ${PYTHON_DEPS}"
+RDEPEND="sys-apps/flashrom
+ ${PYTHON_DEPS}
+ || (
+ >=media-libs/raspberrypi-userland-0_pre20201022
+ >=media-libs/raspberrypi-userland-bin-1.20201022
+ )"
+
+S="${WORKDIR}"
+
+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_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
+ keepdir /var/lib/raspberrypi/bootloader/backup
+
+ for dir in critical stable beta; do
+ insinto /lib/firmware/raspberrypi/bootloader
+ doins -r firmware/${dir}
+ done
+
+ dodoc firmware/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
+
+ 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
+
+ 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.'
+}
reply other threads:[~2020-11-26 5:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1606367189.46fe1837f97b8d1580cc616c823c40b2e0d8accd.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox