diff --git a/modem/msm-cros-efs-loader/APKBUILD b/modem/msm-cros-efs-loader/APKBUILD new file mode 100644 index 000000000..44392c81e --- /dev/null +++ b/modem/msm-cros-efs-loader/APKBUILD @@ -0,0 +1,37 @@ +# Maintainer: Jenneron +pkgname=msm-cros-efs-loader +pkgver=1.0.1 +pkgrel=0 +pkgdesc="EFS loader for Qualcomm-based Chrome OS devices" +url="https://gitlab.com/jenneron/msm-cros-efs-loader" +arch="aarch64" +license="GPL-3.0-or-later" +install="$pkgname.post-install" +_tag="v$pkgver" +source="$pkgname-$pkgver.tar.gz::$url/-/archive/$_tag/msm-cros-efs-loader-$_tag.tar.gz + $pkgname.initd + rmtfs.confd +" +options="!check !archcheck" +subpackages="$pkgname-rmtfs" +builddir="$srcdir/$pkgname-$_tag" + +package() { + install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" + install -Dm755 "$pkgname.sh" "$pkgdir/usr/sbin/$pkgname" +} + +rmtfs() { + pkgdesc="RMTFS config for Chrome OS devices" + install_if="$pkgname=$pkgver-r$pkgrel rmtfs-openrc" + replaces="rmtfs-openrc" + + install -Dm644 "$srcdir"/rmtfs.confd "$subpkgdir"/etc/conf.d/rmtfs +} + + +sha512sums=" +3600d15d8a94af725f4883ec5641a6d2520acdb19b935f49179ed07bde47caa6489ea7f1a42b762ee33f29038ca81197aca2dd0b43faa576583da333425a0a42 msm-cros-efs-loader-1.0.1.tar.gz +a3e902e4dec0bdc7241ea98ef016c0a761f594ac8ee4c67348a4cd5c64de256c0e201b57d4979cf1c175315255a2e35cd2db7ef05c382444511e328834bed56e msm-cros-efs-loader.initd +c79a441d1234b53070c356eec0493fba1af502c61e0127fd8d892b7c880571642077a29bcd712a704fd82392125c5542b373119d5f71adb3439ea1f32c17f1c8 rmtfs.confd +" diff --git a/modem/msm-cros-efs-loader/msm-cros-efs-loader.initd b/modem/msm-cros-efs-loader/msm-cros-efs-loader.initd new file mode 100644 index 000000000..b3ffde52c --- /dev/null +++ b/modem/msm-cros-efs-loader/msm-cros-efs-loader.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name="EFS loader" +description="Load EFS on Chrome OS devices" + +depend() { + before rmtfs +} + +start() { + ebegin "Starting msm-cros-efs-loader" + /usr/sbin/msm-cros-efs-loader + eend $? +} diff --git a/modem/msm-cros-efs-loader/msm-cros-efs-loader.post-install b/modem/msm-cros-efs-loader/msm-cros-efs-loader.post-install new file mode 100644 index 000000000..47fdaada7 --- /dev/null +++ b/modem/msm-cros-efs-loader/msm-cros-efs-loader.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update add msm-cros-efs-loader boot diff --git a/modem/msm-cros-efs-loader/rmtfs.confd b/modem/msm-cros-efs-loader/rmtfs.confd new file mode 100644 index 000000000..46112f3d2 --- /dev/null +++ b/modem/msm-cros-efs-loader/rmtfs.confd @@ -0,0 +1,5 @@ +# Path to read EFS files. If unset it will be read from partitions +rmtfs_files_path="/var/lib/rmtfs" + +# Avoid writing to storage +rmtfs_avoid_writing="true"