firmware/firmware-motorola-potter: new aport (MR 1796)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
a7daff97d1
commit
8e5edb3858
4 changed files with 132 additions and 0 deletions
31
device/testing/firmware-motorola-potter/APKBUILD
Normal file
31
device/testing/firmware-motorola-potter/APKBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Maintainer: Sireesh Kodali <scarface@disroot.org>
|
||||
pkgname=firmware-motorola-potter
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for Motorola Moto G5 Plus"
|
||||
url="https://github.com/scarface-one/firmware-motorola-potter"
|
||||
arch="aarch64"
|
||||
depends="linux-firmware-qcom soc-qcom-msm8916-ucm"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck"
|
||||
_commit="cce83e64585c036facd4cef39f47bc23d18ba2e9"
|
||||
builddir="$srcdir/$pkgname-$_commit"
|
||||
|
||||
source="$pkgname-$_commit.tar.gz::https://github.com/scarface-one/firmware-motorola-potter/archive/$_commit.tar.gz
|
||||
moto-modem-rfs-setup.openrc
|
||||
firmware.files
|
||||
firmware-motorola-potter.post-install"
|
||||
|
||||
package() {
|
||||
install -Dm755 $srcdir/moto-modem-rfs-setup.openrc "$pkgdir"/etc/init.d/moto-modem-rfs-setup
|
||||
|
||||
while IFS="" read -r _i || [ -n "$_i" ]; do
|
||||
[ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i)
|
||||
echo $_i
|
||||
install -Dm644 $_i "$pkgdir/$_i"
|
||||
done < "$srcdir/firmware.files"
|
||||
}
|
||||
sha512sums="5a35ff1b567b672585f761eddbc772163f52b312c1e94410eff4b1d333852857a2f87769a45f47f7bcff373bdd5b062c3d16110e0211d85f83a7b4c6c78f6d3c firmware-motorola-potter-cce83e64585c036facd4cef39f47bc23d18ba2e9.tar.gz
|
||||
d4fd0f3406c9f004e9cae7bc500c5713aab75f102f8e3ea1af820865f01eb03def01cd9ed3e8a184c7dfc22ab419628fad17957a3782885d96eb36e94461e842 moto-modem-rfs-setup.openrc
|
||||
dc7b179abb099ab61bc72e8941be38d3e94bd1a43b37617b34e1a63835bb8399ee79a87d556996dfbed032e40554ca48a2ff9e9817d80ed1415db3f369266b38 firmware.files
|
||||
784ac120a2231cfbee153fb8b2634af4ab5091eaa8fe207e66b47641d7531591ee3849e610bb66c7177822c86556f78d51c17ba8e4f3da2f946c4b8c5eaaf310 firmware-motorola-potter.post-install"
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
rc-update add moto-modem-rfs-setup boot
|
59
device/testing/firmware-motorola-potter/firmware.files
Normal file
59
device/testing/firmware-motorola-potter/firmware.files
Normal file
|
@ -0,0 +1,59 @@
|
|||
./lib/firmware/postmarketos/a506_zap.b00
|
||||
./lib/firmware/postmarketos/a506_zap.b01
|
||||
./lib/firmware/postmarketos/a506_zap.b02
|
||||
./lib/firmware/postmarketos/a506_zap.elf
|
||||
./lib/firmware/postmarketos/a506_zap.mdt
|
||||
./lib/firmware/postmarketos/a530_pfp.fw
|
||||
./lib/firmware/postmarketos/a530_pm4.fw
|
||||
./lib/firmware/postmarketos/adsp.b00
|
||||
./lib/firmware/postmarketos/adsp.b01
|
||||
./lib/firmware/postmarketos/adsp.b02
|
||||
./lib/firmware/postmarketos/adsp.b03
|
||||
./lib/firmware/postmarketos/adsp.b04
|
||||
./lib/firmware/postmarketos/adsp.b05
|
||||
./lib/firmware/postmarketos/adsp.b06
|
||||
./lib/firmware/postmarketos/adsp.b07
|
||||
./lib/firmware/postmarketos/adsp.b08
|
||||
./lib/firmware/postmarketos/adsp.b09
|
||||
./lib/firmware/postmarketos/adsp.b10
|
||||
./lib/firmware/postmarketos/adsp.b11
|
||||
./lib/firmware/postmarketos/adsp.b12
|
||||
./lib/firmware/postmarketos/adsp.b13
|
||||
./lib/firmware/postmarketos/adsp.mdt
|
||||
./lib/firmware/postmarketos/modem.b00
|
||||
./lib/firmware/postmarketos/modem.b01
|
||||
./lib/firmware/postmarketos/modem.b02
|
||||
./lib/firmware/postmarketos/modem.b04
|
||||
./lib/firmware/postmarketos/modem.b05
|
||||
./lib/firmware/postmarketos/modem.b06
|
||||
./lib/firmware/postmarketos/modem.b07
|
||||
./lib/firmware/postmarketos/modem.b08
|
||||
./lib/firmware/postmarketos/modem.b09
|
||||
./lib/firmware/postmarketos/modem.b10
|
||||
./lib/firmware/postmarketos/modem.b11
|
||||
./lib/firmware/postmarketos/modem.b12
|
||||
./lib/firmware/postmarketos/modem.b13
|
||||
./lib/firmware/postmarketos/modem.b16
|
||||
./lib/firmware/postmarketos/modem.b17
|
||||
./lib/firmware/postmarketos/modem.b18
|
||||
./lib/firmware/postmarketos/modem.b19
|
||||
./lib/firmware/postmarketos/modem.b20
|
||||
./lib/firmware/postmarketos/modem.mdt
|
||||
./lib/firmware/postmarketos/mba.mbn
|
||||
./lib/firmware/postmarketos/wcnss.b00
|
||||
./lib/firmware/postmarketos/wcnss.b01
|
||||
./lib/firmware/postmarketos/wcnss.b02
|
||||
./lib/firmware/postmarketos/wcnss.b04
|
||||
./lib/firmware/postmarketos/wcnss.b06
|
||||
./lib/firmware/postmarketos/wcnss.b09
|
||||
./lib/firmware/postmarketos/wcnss.b10
|
||||
./lib/firmware/postmarketos/wcnss.b11
|
||||
./lib/firmware/postmarketos/wcnss.b12
|
||||
./lib/firmware/postmarketos/wcnss.mdt
|
||||
./lib/firmware/postmarketos/wlan/prima/WCNSS_qcom_wlan_nv.bin
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b00
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b01
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b02
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b03
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.b04
|
||||
./lib/firmware/postmarketos/qcom/venus-4.2/venus.mdt
|
|
@ -0,0 +1,40 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
description="Setup modem firmware for tqftpserv"
|
||||
|
||||
depend() {
|
||||
before tqftpserv
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
MODEM_FIRMWARE_DIR="/lib/firmware/postmarketos/persist"
|
||||
# The firmware present here is unique to each device
|
||||
# Using the firmware of one device on another can will simply fail
|
||||
# This is needed because motorola devices derive IMEI and other unique
|
||||
# IDs from these files
|
||||
# See also: https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
|
||||
|
||||
|
||||
if [ ! -d $MODEM_FIRMWARE_DIR ]; then
|
||||
# Make a copy of the firmware if its not already made
|
||||
# Use the copy instead of the original, because if due to some error
|
||||
# somehow the firmware gets corrupted, the original firmware will
|
||||
# still be available on the 'persist' partition
|
||||
|
||||
PERSIST_PATH="/tmp/persist"
|
||||
PERSIST_DEV="/dev/disk/by-partlabel/persist"
|
||||
|
||||
mkdir -p $PERSIST_PATH
|
||||
mount $PERSIST_DEV -o ro,noatime $PERSIST_PATH
|
||||
|
||||
mkdir $MODEM_FIRMWARE_DIR
|
||||
|
||||
cp -R "$PERSIST_PATH"/rfs/msm/mpss/ "$MODEM_FIRMWARE_DIR"/readwrite
|
||||
|
||||
umount $PERSIST_DEV
|
||||
rmdir $PERSIST_PATH
|
||||
fi
|
||||
|
||||
ln -s "$MODEM_FIRMWARE_DIR"/readwrite/ /tmp/tqftpserv
|
||||
}
|
Loading…
Reference in a new issue