diff --git a/main/hexagonfs-firmware-loader/APKBUILD b/main/hexagonfs-firmware-loader/APKBUILD new file mode 100644 index 000000000..66af90ae4 --- /dev/null +++ b/main/hexagonfs-firmware-loader/APKBUILD @@ -0,0 +1,53 @@ +pkgname=hexagonfs-firmware-loader +pkgver=1.0.0 +pkgrel=0 +pkgdesc="Prepare the HexagonFS directory from msm-firmware-loader mounts" +url="https://postmarketos.org/" +subpackages="$pkgname-openrc $pkgname-systemd" +arch="aarch64" +license="MIT" +options="!check" +depends="hexagonrpcd msm-firmware-loader" +source=" + hexagonrpcd.confd + https://gitlab.postmarketos.org/Adrian/hexagonfs-firmware-loader/-/archive/$pkgver/hexagonfs-firmware-loader-$pkgver.tar.gz +" + +package() { + # Create mountpoint for the HexagonFS files + mkdir -p "$pkgdir/usr/share/qcom" + + # Install configs for hexagonrpcd to point it to our mountpoint + install -Dm644 "$srcdir"/hexagonrpcd.confd \ + "$pkgdir"/usr/share/hexagonrpcd/hexagonrpcd-adsp-rootpd.conf + install -Dm644 "$srcdir"/hexagonrpcd.confd \ + "$pkgdir"/usr/share/hexagonrpcd/hexagonrpcd-adsp-sensorspd.conf + install -Dm644 "$srcdir"/hexagonrpcd.confd \ + "$pkgdir"/usr/share/hexagonrpcd/hexagonrpcd-sdsp.conf + + install -Dm755 hexagonfs-firmware-loader.sh \ + "$pkgdir/usr/sbin/hexagonfs-firmware-loader.sh" + + cp -r socinfo "$pkgdir/usr/share/hexagonfs-firmware-loader" + + install -Dm755 hexagonfs-firmware-loader.initd \ + "$pkgdir/etc/init.d/hexagonfs-firmware-loader" + + install -Dm644 hexagonfs-firmware-loader.service \ + "$pkgdir/usr/lib/systemd/system/hexagonfs-firmware-loader.service" +} + +openrc() { + install="$subpkgname.post-install" + default_openrc +} + +systemd() { + install="$subpkgname.post-install $subpkgname.pre-deinstall" + default_systemd +} + +sha512sums=" +64c50d1e92cc29b3e8c0e5ee0c14603c5d3b6c9f9671038928cb3093a1276e6004452e55c5f7e3793b72bbc0a7dc48063ed29ba779ece2edea5ac743fa1ec473 hexagonrpcd.confd +77c2d49b21afab2ae848d9f32bb88b7bc10c10215ed4f418e8c71ed4e5772ef5a67eded5f420244de66f90b1bb9f53c168395b9587c50a8c1903556acb6b2c7d hexagonfs-firmware-loader-1.0.0.tar.gz +" diff --git a/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-openrc.post-install b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-openrc.post-install new file mode 100644 index 000000000..39867c292 --- /dev/null +++ b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-openrc.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +rc-update add hexagonfs-firmware-loader sysinit diff --git a/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.post-install b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.post-install new file mode 100644 index 000000000..63ea5ecdf --- /dev/null +++ b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +. /usr/lib/systemd/systemd-apk-macros.sh +systemd_service_post_install system hexagonfs-firmware-loader diff --git a/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.pre-deinstall b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.pre-deinstall new file mode 100644 index 000000000..07463ef81 --- /dev/null +++ b/main/hexagonfs-firmware-loader/hexagonfs-firmware-loader-systemd.pre-deinstall @@ -0,0 +1,4 @@ +#!/bin/sh + +. /usr/lib/systemd/systemd-apk-macros.sh +systemd_service_pre_deinstall system hexagonfs-firmware-loader diff --git a/main/hexagonfs-firmware-loader/hexagonrpcd.confd b/main/hexagonfs-firmware-loader/hexagonrpcd.confd new file mode 100644 index 000000000..81ed8fb11 --- /dev/null +++ b/main/hexagonfs-firmware-loader/hexagonrpcd.confd @@ -0,0 +1 @@ +hexagonrpcd_fw_dir="/usr/share/qcom"