From bdddea0a28be6ca2229ede6b7dc11b8a6473c57d Mon Sep 17 00:00:00 2001 From: amak Date: Tue, 10 Nov 2020 17:39:38 +1100 Subject: [PATCH 1/2] rpi-firmware: add option for enabling audio --- srcpkgs/rpi-firmware/files/config.txt | 3 +++ srcpkgs/rpi-firmware/template | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/srcpkgs/rpi-firmware/files/config.txt b/srcpkgs/rpi-firmware/files/config.txt index a5b8eb245bb..ea6233326d6 100755 --- a/srcpkgs/rpi-firmware/files/config.txt +++ b/srcpkgs/rpi-firmware/files/config.txt @@ -81,3 +81,6 @@ ## with fake kms #dtoverlay=vc4-fkms-v3d + +## Enable the BCM2835 audio driver +#dtparam=audio=on diff --git a/srcpkgs/rpi-firmware/template b/srcpkgs/rpi-firmware/template index 30cb0f7f2f8..661dd6b848a 100644 --- a/srcpkgs/rpi-firmware/template +++ b/srcpkgs/rpi-firmware/template @@ -4,7 +4,7 @@ _gitshort="${_githash:0:7}" pkgname=rpi-firmware version=20200819 -revision=2 +revision=3 archs="armv6l* armv7l* aarch64*" wrksrc="firmware-${_githash}" short_desc="Firmware files for the Raspberry Pi (git ${_gitshort})" From d560b53cd7e03157b0718d80d2bd7a3cb56cafb5 Mon Sep 17 00:00:00 2001 From: amak Date: Tue, 10 Nov 2020 17:41:30 +1100 Subject: [PATCH 2/2] rpi-base: don't install snd_bcm2835.conf module file, move udev rules to separate file --- srcpkgs/rpi-base/files/71-raspberrypi.rules | 4 +++ srcpkgs/rpi-base/template | 29 +++++---------------- 2 files changed, 11 insertions(+), 22 deletions(-) create mode 100644 srcpkgs/rpi-base/files/71-raspberrypi.rules diff --git a/srcpkgs/rpi-base/files/71-raspberrypi.rules b/srcpkgs/rpi-base/files/71-raspberrypi.rules new file mode 100644 index 00000000000..5d3c596547c --- /dev/null +++ b/srcpkgs/rpi-base/files/71-raspberrypi.rules @@ -0,0 +1,4 @@ +# Fix permissions for the vchiq, vcio, vcsm devices. +SUBSYSTEM=="vchiq", GROUP="video", MODE="0660" +SUBSYSTEM=="bcm2708_vcio", GROUP="video", MODE="0660" +SUBSYSTEM=="vc-sm", GROUP="video", MODE="0660" diff --git a/srcpkgs/rpi-base/template b/srcpkgs/rpi-base/template index a1e15b06280..8fcf3581efd 100644 --- a/srcpkgs/rpi-base/template +++ b/srcpkgs/rpi-base/template @@ -1,29 +1,14 @@ # Template file for 'rpi-base' pkgname=rpi-base -version=2.5 -revision=4 -homepage="http://www.voidlinux.org" -short_desc="Void Linux RaspberryPi base files" -maintainer="Orphaned " -license="Public Domain" - +version=2.6 +revision=1 archs="armv6l* armv7l* aarch64*" depends="virtual?ntp-daemon rpi-firmware rpi-kernel" +short_desc="Void Linux Raspberry Pi base files" +maintainer="Orphaned " +license="Public Domain" +homepage="https://www.voidlinux.org" do_install() { - case "$XBPS_TARGET_MACHINE" in - armv6l*) - # Load the audio module by default on RPi. - vmkdir usr/lib/modules-load.d - echo snd-bcm2835 > ${DESTDIR}/usr/lib/modules-load.d/snd_bcm2835.conf - ;; - esac - # Fix permissions for the vchiq, vcio, vcsm devices. - vmkdir usr/lib/udev/rules.d - echo 'SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"' > \ - ${DESTDIR}/usr/lib/udev/rules.d/71-raspberrypi.rules - echo 'SUBSYSTEM=="bcm2708_vcio", GROUP="video", MODE="0660"' >> \ - ${DESTDIR}/usr/lib/udev/rules.d/71-raspberrypi.rules - echo 'SUBSYSTEM=="vc-sm", GROUP="video", MODE="0660"' >> \ - ${DESTDIR}/usr/lib/udev/rules.d/71-raspberrypi.rules + vinstall "${FILESDIR}/71-raspberrypi.rules" 644 usr/lib/udev/rules.d }