diff --git a/main/postmarketos-update-depthcharge-kernel/APKBUILD b/main/postmarketos-update-depthcharge-kernel/APKBUILD new file mode 100644 index 000000000..59377528a --- /dev/null +++ b/main/postmarketos-update-depthcharge-kernel/APKBUILD @@ -0,0 +1,19 @@ +# Maintainer: Jenneron +pkgname=postmarketos-update-depthcharge-kernel +pkgver=1 +pkgrel=0 +pkgdesc="depthcharge kernel updater script for postmarketOS" +url="https://postmarketos.org" +depends="util-linux-misc" +source="update-depthcharge-kernel.sh" +arch="noarch" +license="GPL-3.0-or-later" + +package() { + install -Dm755 "$srcdir/update-depthcharge-kernel.sh" \ + "$pkgdir/sbin/pmos-update-depthcharge-kernel" +} + +sha512sums=" +e0348c99d9b13e41718ec2804866cca1b4585ead259450dc09f595092a0497903cb78fa23b8a33a8ac0ba0d1425e4c8b22af7b3bfc1a7292ac3a8a8dbf2a8717 update-depthcharge-kernel.sh +" diff --git a/main/postmarketos-update-depthcharge-kernel/update-depthcharge-kernel.sh b/main/postmarketos-update-depthcharge-kernel/update-depthcharge-kernel.sh new file mode 100644 index 000000000..91733e39f --- /dev/null +++ b/main/postmarketos-update-depthcharge-kernel/update-depthcharge-kernel.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# GPL-3.0-or-later + +set -e + +# Declare used deviceinfo variables to pass shellcheck +deviceinfo_cgpt_kpart="" + +# shellcheck disable=SC1091 +. /etc/deviceinfo + +partition=$(findfs PARTLABEL=pmOS_kernel) + +echo "Flashing $deviceinfo_cgpt_kpart to $partition" +dd if="$deviceinfo_cgpt_kpart" of="$partition" + +echo "Done."