rpi-base: split into rpi, rpi2, rpi3

Until now, rpi-base served rpi0/rpi1 + rpi2 + rpi3 all at once.  The
variants were solely distiguished by the target architecture; it was
nice while it lasted, but now that rpi4 is on its way, we need to split
things up a little.

With the split,
* rpi-base depends on rpi-kernel, armv6l* only,
* rpi2-base depends on rpi2-kernel, armv7l* only
* rpi3-base depends on rpi3-kernel, aarch64* only,

To help migrate existing devices to the new base packages, rpi-base
will be an empty mega package for !armv6l* and depend on rpi2-base or
rpi3-base for the foreseeable future, thus resolving like this:
* rpi-base -> rpi2-base (armv7l*)
* rpi-base -> rpi3-base (aarch64*)

For now it's sufficient to have one package provide all subpackages, to
ease maintainance. The template can easiliy be split (as we did with
rpi-kernel) should the need arise some day.

rpi3-base actually existed back in 2017 (it depended on mainline kernel
instead of rpi-kernel) and became obsolete in 2018;
who would have known back then we may have to deal with rpi>3 some day...

Relates to: #29139

Acked-by: Duncaen <duncaen@voidlinux.org>
This commit is contained in:
Piraty 2021-02-22 21:35:09 +01:00
parent 4a02207f57
commit 7ae9df8d33
No known key found for this signature in database
GPG key ID: 82F2CC796BD07077
3 changed files with 51 additions and 2 deletions

View file

@ -1,9 +1,10 @@
# Template file for 'rpi-base'
pkgname=rpi-base
version=2.6
version=3.0
revision=1
archs="armv6l* armv7l* aarch64*"
depends="virtual?ntp-daemon rpi-firmware rpi-kernel"
_base_depends="virtual?ntp-daemon rpi-firmware"
depends="${_base_depends} rpi-kernel"
short_desc="Void Linux Raspberry Pi base files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Public Domain"
@ -12,3 +13,49 @@ homepage="https://www.voidlinux.org"
do_install() {
vinstall "${FILESDIR}/71-raspberrypi.rules" 644 usr/lib/udev/rules.d
}
case "$XBPS_TARGET_MACHINE" in
armv6*)
subpackages=" "
;;
armv7*)
subpackages="rpi2-base"
;;
aarch64*)
subpackages="rpi3-base"
;;
esac
# support legacy systems (before rpi-kernel was split to rpi{,2,3})
# archs != armv6* are emtpy meta packages to pull the new rpi${n}-base package
case "$XBPS_TARGET_MACHINE" in
armv6*) : ;;
*)
build_style=meta
short_desc+=" (transitional dummy package)"
do_install() { : ; }
case "$XBPS_TARGET_MACHINE" in
armv7*) depends="rpi2-base" ;;
aarch64*) depends="rpi3-base" ;;
esac
;;
esac
rpi2-base_package() {
depends="${_base_depends} rpi2-kernel"
short_desc="Void Linux Raspberry Pi 2 base files"
pkg_install() {
vinstall "${FILESDIR}/71-raspberrypi.rules" 644 usr/lib/udev/rules.d
}
}
rpi3-base_package() {
depends="${_base_depends} rpi3-kernel"
short_desc="Void Linux Raspberry Pi 3 base files"
pkg_install() {
vinstall "${FILESDIR}/71-raspberrypi.rules" 644 usr/lib/udev/rules.d
}
}

1
srcpkgs/rpi2-base Symbolic link
View file

@ -0,0 +1 @@
rpi-base

1
srcpkgs/rpi3-base Symbolic link
View file

@ -0,0 +1 @@
rpi-base