From 97ad29c4391423bfdbd6da33e785f38bb2628616 Mon Sep 17 00:00:00 2001 From: Tomas Safarik Date: Thu, 14 Sep 2017 20:18:12 +0200 Subject: [PATCH] Add libsamsung-ipc to device-samsung-i9100 (#564) * add libsamsung-ipc (from upstream replicant repository) * add libsamsung-ipc as dependecy for device-samsung-i9100 * change device path for loading modem firmware on i9100 * add mounting of EFS to fstab --- device/device-samsung-i9100/APKBUILD | 15 ++++++++++----- .../device-samsung-i9100.post-install | 7 +++++++ .../0001-i9100-modem-firmware-device-path.patch | 13 +++++++++++++ main/libsamsung-ipc/APKBUILD | 12 ++++++++---- 4 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 device/device-samsung-i9100/device-samsung-i9100.post-install create mode 100644 main/libsamsung-ipc/0001-i9100-modem-firmware-device-path.patch diff --git a/device/device-samsung-i9100/APKBUILD b/device/device-samsung-i9100/APKBUILD index e58253a0a..7e53fed82 100644 --- a/device/device-samsung-i9100/APKBUILD +++ b/device/device-samsung-i9100/APKBUILD @@ -1,15 +1,19 @@ pkgname=device-samsung-i9100 pkgver=1 -pkgrel=9 +pkgrel=10 pkgdesc="Samsung Galaxy SII" url="https://github.com/postmarketOS" arch="noarch" license="MIT" -depends="linux-samsung-i9100 firmware-samsung-i9100" +depends="linux-samsung-i9100 firmware-samsung-i9100 libsamsung-ipc" makedepends="" -install="" +install="$pkgname.post-install" subpackages="" -source="deviceinfo 90-android-touch-dev.rules" +source=" + deviceinfo + 90-android-touch-dev.rules + $install +" options="!check" build() { @@ -24,4 +28,5 @@ package() { } sha512sums="64f8526a8db3d428e83f826c22f41a589bed29381f3b3160446a401c44196d044dd6f2f895c080b0c45a6ad8c173439bb6127195329c3df677fd8408d4c69f85 deviceinfo -8aead706ddb118a44de7d049f07d10a27e727d17724058d132e4ec4fa73fed29c9ccfe03f02aca459c922ec0fbba24e171fe3c76e33f7c5462631e3dd5506e36 90-android-touch-dev.rules" +8aead706ddb118a44de7d049f07d10a27e727d17724058d132e4ec4fa73fed29c9ccfe03f02aca459c922ec0fbba24e171fe3c76e33f7c5462631e3dd5506e36 90-android-touch-dev.rules +03da52725e676bc7db371cbf4b60bff8689eca469dae96a02ca7d6c194ed9f8c4ec9d19d1ac9212eeba0b73384fd213e86f2b93da94f37e5abe4cc3339281205 device-samsung-i9100.post-install" diff --git a/device/device-samsung-i9100/device-samsung-i9100.post-install b/device/device-samsung-i9100/device-samsung-i9100.post-install new file mode 100644 index 000000000..ddeb08240 --- /dev/null +++ b/device/device-samsung-i9100/device-samsung-i9100.post-install @@ -0,0 +1,7 @@ +#!/bin/sh + +# Create mount point and /efs mount point in fstab +if [ -z "$(grep /efs /etc/fstab)" ]; then + mkdir -p /efs + echo "/dev/mmcblk0p1 /efs auto ro 0 0" >> /etc/fstab +fi diff --git a/main/libsamsung-ipc/0001-i9100-modem-firmware-device-path.patch b/main/libsamsung-ipc/0001-i9100-modem-firmware-device-path.patch new file mode 100644 index 000000000..5f7eededf --- /dev/null +++ b/main/libsamsung-ipc/0001-i9100-modem-firmware-device-path.patch @@ -0,0 +1,13 @@ +diff --git a/samsung-ipc/devices/galaxys2/galaxys2.h b/samsung-ipc/devices/galaxys2/galaxys2.h +index 5d315c6..9b24f9d 100644 +--- a/samsung-ipc/devices/galaxys2/galaxys2.h ++++ b/samsung-ipc/devices/galaxys2/galaxys2.h +@@ -32,7 +32,7 @@ + #define GALAXYS2_NV_DATA_OFFSET 0xA00000 + #define GALAXYS2_NV_DATA_SIZE 0x200000 + +-#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/block/mmcblk0p8" ++#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/mmcblk0p8" + + struct galaxys2_transport_data { + int fd; diff --git a/main/libsamsung-ipc/APKBUILD b/main/libsamsung-ipc/APKBUILD index 40329260e..365e1e462 100644 --- a/main/libsamsung-ipc/APKBUILD +++ b/main/libsamsung-ipc/APKBUILD @@ -1,14 +1,17 @@ pkgname=libsamsung-ipc pkgver=6.0-0002 -pkgrel=0 +pkgrel=1 pkgdesc="Implementation of Samsung modem protocol" url="https://redmine.replicant.us/projects/replicant/wiki/Libsamsung-ipc" arch="all" license="GPLv2" depends="" -makedepends="autoconf automake libtool openssl-dev linux-headers" +makedepends="autoconf automake libtool libressl-dev linux-headers" subpackages="" -source="$pkgname-$pkgver.tar.gz::https://git.replicant.us/replicant/external_libsamsung-ipc/snapshot/external_libsamsung-ipc-replicant-${pkgver}.tar.gz" +source=" + $pkgname-$pkgver.tar.gz::https://git.replicant.us/replicant/external_libsamsung-ipc/snapshot/external_libsamsung-ipc-replicant-${pkgver}.tar.gz + 0001-i9100-modem-firmware-device-path.patch +" options="!check" builddir="$srcdir"/external_libsamsung-ipc-replicant-$pkgver @@ -23,4 +26,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="59974fda58914829a221ecf8ce5bec5ec1e76ef1dba95d86942b224b41d3e41e542c3214be43ba31dd93304ed4aa8135892ea364dd1aa4aa42217cf20507db14 libsamsung-ipc-6.0-0002.tar.gz" +sha512sums="59974fda58914829a221ecf8ce5bec5ec1e76ef1dba95d86942b224b41d3e41e542c3214be43ba31dd93304ed4aa8135892ea364dd1aa4aa42217cf20507db14 libsamsung-ipc-6.0-0002.tar.gz +b4a092fca35825d3d20886cb96135d944a4a3fbdb596b925c02c1a294160b7abbe1e5fa9f832816fe35f4a5d6b87546504b67950e17173e145b505e8108d0ccc 0001-i9100-modem-firmware-device-path.patch"