diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..82fae27 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,9 @@ +.debhelper/ +debhelper-build-stamp +files +rpi-eeprom/ +rpi-eeprom-images/ +*.debhelper.log +*.debhelper +*.substvars +*.1 diff --git a/debian/LICENCE.bootloader b/debian/LICENCE.bootloader new file mode 100644 index 0000000..2979d2c --- /dev/null +++ b/debian/LICENCE.bootloader @@ -0,0 +1,28 @@ +Copyright (c) 2019, Raspberry Pi (Trading) Ltd. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* This software may only be used for the purposes of developing for, + running or using a Raspberry Pi device. +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c29f4c7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,42 @@ +rpi-eeprom (0.3-1) buster; urgency=medium + + * rpi-eeprom-update: Fix CPU detection and improve documentation + - Use vcgencmd otp_dump to get the board-revision because the format + is predictable + - Change the -f completion message to indicate that the update is + scheduled rather than complete + - Add some notes to help about the update mechanism + * Add release notes + * rpi-eeprom-update: fix typos in usage + * firmware: Add pieeprom-2019-09-06.bin to beta releases + - Add the new EEPROM with SDRAM changes for power saving + * firmware: Add pieeprom-2019-09-10.bin to beta releases + - Minor update to always configure RGMII pins to a good state at power on. + Previously the pins would have been left in the default reset state + (input) + * rpi-eeprom-update: -h should not require vcgencmd + - More the checkDependencies call to after the options parsing so that + -h can be run for help2man + * Update packaging for new upstream format + + -- Serge Schneider Tue, 10 Sep 2019 13:21:33 +0100 + +rpi-eeprom (0.2-1) buster; urgency=medium + + * Select release type via defaults + + -- Serge Schneider Fri, 30 Aug 2019 14:53:18 +0100 + +rpi-eeprom (0.1-2) buster; urgency=medium + + * Update dependencies + - Move flashrom to 'Recommends' + - Add versioned raspberrypi-bootloader dependency + + -- Serge Schneider Wed, 28 Aug 2019 14:58:13 +0100 + +rpi-eeprom (0.1-1) buster; urgency=medium + + * Initial release + + -- Serge Schneider Mon, 22 Jul 2019 14:01:36 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d2f6498 --- /dev/null +++ b/debian/control @@ -0,0 +1,24 @@ +Source: rpi-eeprom +Section: misc +Priority: optional +Maintainer: Serge Schneider +Build-Depends: debhelper (>= 11), help2man +Standards-Version: 4.1.3 +Homepage: https://github.com/raspberrypi/rpi-eeprom/ +Vcs-Browser: https://github.com/raspberrypi/rpi-eeprom/ +Vcs-Git: https://github.com/raspberrypi/rpi-eeprom.git + +Package: rpi-eeprom +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, rpi-eeprom-images, libraspberrypi-bin, + python, raspberrypi-bootloader (>= 1.20190819) +Recommends: flashrom +Description: Raspberry Pi 4 boot EEPROM updater + Checks whether the Raspberry Pi bootloader EEPROM is up-to-date and updates + the EEPROM. + +Package: rpi-eeprom-images +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Raspberry Pi 4 boot EEPROM images + This package contains the bootloader EEPROM images for Raspberry Pi 4 diff --git a/debian/copyright b/debian/copyright new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/debian/copyright @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/debian/default/rpi-eeprom-update b/debian/default/rpi-eeprom-update new file mode 100644 index 0000000..df7efac --- /dev/null +++ b/debian/default/rpi-eeprom-update @@ -0,0 +1 @@ +FIRMWARE_RELEASE_STATUS="critical" diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..ace811c --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,3 @@ +[buildpackage] +upstream-tree = master +debian-branch = debian/buster diff --git a/debian/rpi-eeprom-images.docs b/debian/rpi-eeprom-images.docs new file mode 100644 index 0000000..4114cf4 --- /dev/null +++ b/debian/rpi-eeprom-images.docs @@ -0,0 +1,2 @@ +debian/LICENCE.bootloader +firmware/release-notes.md diff --git a/debian/rpi-eeprom-images.install b/debian/rpi-eeprom-images.install new file mode 100644 index 0000000..9a86b03 --- /dev/null +++ b/debian/rpi-eeprom-images.install @@ -0,0 +1 @@ +firmware/* lib/firmware/raspberrypi/bootloader/ diff --git a/debian/rpi-eeprom.install b/debian/rpi-eeprom.install new file mode 100644 index 0000000..7094e22 --- /dev/null +++ b/debian/rpi-eeprom.install @@ -0,0 +1,3 @@ +rpi-eeprom-config usr/bin/ +rpi-eeprom-update usr/bin/ +debian/default/ etc/ diff --git a/debian/rpi-eeprom.manpages b/debian/rpi-eeprom.manpages new file mode 100644 index 0000000..230fc5b --- /dev/null +++ b/debian/rpi-eeprom.manpages @@ -0,0 +1,2 @@ +debian/rpi-eeprom-update.1 +debian/rpi-eeprom-config.1 diff --git a/debian/rpi-eeprom.postinst b/debian/rpi-eeprom.postinst new file mode 100644 index 0000000..65f6c03 --- /dev/null +++ b/debian/rpi-eeprom.postinst @@ -0,0 +1,39 @@ +#!/bin/sh +# postinst script for rpi-eeprom +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rpi-eeprom.postrm b/debian/rpi-eeprom.postrm new file mode 100644 index 0000000..20ca809 --- /dev/null +++ b/debian/rpi-eeprom.postrm @@ -0,0 +1,40 @@ +#!/bin/sh +# postrm script for rpi-eeprom +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -rf /var/lib/raspberrypi/bootloader/backup/ + ;; + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rpi-eeprom.prerm b/debian/rpi-eeprom.prerm new file mode 100644 index 0000000..e30ef89 --- /dev/null +++ b/debian/rpi-eeprom.prerm @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for rpi-eeprom +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rpi-eeprom.rpi-eeprom-update.service b/debian/rpi-eeprom.rpi-eeprom-update.service new file mode 100644 index 0000000..de92a98 --- /dev/null +++ b/debian/rpi-eeprom.rpi-eeprom-update.service @@ -0,0 +1,10 @@ +[Unit] +Description=Check for Raspberry Pi EEPROM updates + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/usr/bin/rpi-eeprom-update -a + +[Install] +WantedBy=multi-user.target diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c07a577 --- /dev/null +++ b/debian/rules @@ -0,0 +1,28 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +include /usr/share/dpkg/pkg-info.mk + +%: + dh $@ + +override_dh_installsystemd: + dh_installsystemd --name=rpi-eeprom-update + +override_dh_auto_build: debian/rpi-eeprom-update.1 debian/rpi-eeprom-config.1 + +override_dh_install: + mkdir -p debian/rpi-eeprom/var/lib/raspberrypi/bootloader/backup/ + dh_install + +debian/rpi-eeprom-update.1: + help2man -N --version-string="${DEB_VERSION_UPSTREAM}" --help-option="-h" \ + --name="Checks whether the Raspberry Pi bootloader EEPROM is \ +up-to-date and updates the EEPROM" \ + --output=$@ ./rpi-eeprom-update + +debian/rpi-eeprom-config.1: + help2man -N --version-string="${DEB_VERSION_UPSTREAM}" --help-option="-h" \ + --name="Extracts and updates Raspberry Pi bootloader EEPROM \ +configuration" \ + --output=$@ ./rpi-eeprom-config diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..9a83bf7 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1 @@ +debian-copyright-is-symlink