mdoem/libsamsung-ipc: upgrade to 6.0.0004 (MR 3456)
1. Upgrades the library to version 6.0.0004 2. Adds runtime overrides for detected device and board, to facilitate running on devices where autodetect fails.
This commit is contained in:
parent
45aaac6d30
commit
8d07a9897a
5 changed files with 68 additions and 15 deletions
|
@ -1,13 +1,13 @@
|
||||||
diff --git a/samsung-ipc/devices/galaxys2/galaxys2.h b/samsung-ipc/devices/galaxys2/galaxys2.h
|
diff --git a/samsung-ipc/devices/galaxys2/galaxys2.h b/samsung-ipc/devices/galaxys2/galaxys2.h
|
||||||
index 5d315c6..9b24f9d 100644
|
index c8142ec..0f95567 100644
|
||||||
--- a/samsung-ipc/devices/galaxys2/galaxys2.h
|
--- a/samsung-ipc/devices/galaxys2/galaxys2.h
|
||||||
+++ b/samsung-ipc/devices/galaxys2/galaxys2.h
|
+++ b/samsung-ipc/devices/galaxys2/galaxys2.h
|
||||||
@@ -32,7 +32,7 @@
|
@@ -32,7 +32,7 @@
|
||||||
#define GALAXYS2_NV_DATA_OFFSET 0xA00000
|
#define GALAXYS2_NV_DATA_OFFSET 0xA00000
|
||||||
#define GALAXYS2_NV_DATA_SIZE 0x200000
|
#define GALAXYS2_NV_DATA_SIZE 0x200000
|
||||||
|
|
||||||
-#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/block/mmcblk0p8"
|
-#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/block/mmcblk0p8"
|
||||||
+#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/mmcblk0p8"
|
+#define GALAXYS2_MODEM_IMAGE_DEVICE "/dev/mmcblk0p8"
|
||||||
|
|
||||||
struct galaxys2_transport_data {
|
struct galaxys2_transport_data {
|
||||||
int fd;
|
int fd;
|
||||||
|
|
38
modem/libsamsung-ipc/0002-runtime-device-overrides.patch
Normal file
38
modem/libsamsung-ipc/0002-runtime-device-overrides.patch
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
|
||||||
|
index c116fbb..4bc7fe3 100644
|
||||||
|
--- a/samsung-ipc/ipc.c
|
||||||
|
+++ b/samsung-ipc/ipc.c
|
||||||
|
@@ -46,7 +46,9 @@ int ipc_device_detect(void)
|
||||||
|
char buffer[4096] = { 0 };
|
||||||
|
struct utsname utsname;
|
||||||
|
char *name = NULL;
|
||||||
|
+ const char *name_override = NULL;
|
||||||
|
char *board_name = NULL;
|
||||||
|
+ const char *board_name_override = NULL;
|
||||||
|
char *kernel_version = NULL;
|
||||||
|
char *line, *p, *c;
|
||||||
|
int index = -1;
|
||||||
|
@@ -56,6 +58,11 @@ int ipc_device_detect(void)
|
||||||
|
|
||||||
|
#ifdef IPC_DEVICE_NAME
|
||||||
|
name = strdup(IPC_DEVICE_NAME);
|
||||||
|
+#else
|
||||||
|
+ name_override = getenv("IPC_DEVICE_NAME");
|
||||||
|
+ if (name_override) {
|
||||||
|
+ name = strdup(name_override);
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef IPC_DEVICE_BOARD_NAME
|
||||||
|
@@ -95,6 +102,11 @@ int ipc_device_detect(void)
|
||||||
|
|
||||||
|
line = strtok(NULL, "\n");
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ board_name_override = getenv("IPC_DEVICE_BOARD_NAME");
|
||||||
|
+ if (board_name_override) {
|
||||||
|
+ board_name = strdup(board_name_override);
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef IPC_DEVICE_KERNEL_VERSION
|
|
@ -1,6 +1,6 @@
|
||||||
pkgname=libsamsung-ipc
|
pkgname=libsamsung-ipc
|
||||||
pkgver=6.0.0003
|
pkgver=6.0.0004
|
||||||
pkgrel=2
|
pkgrel=0
|
||||||
pkgdesc="Implementation of Samsung modem protocol"
|
pkgdesc="Implementation of Samsung modem protocol"
|
||||||
url="https://redmine.replicant.us/projects/replicant/wiki/Libsamsung-ipc"
|
url="https://redmine.replicant.us/projects/replicant/wiki/Libsamsung-ipc"
|
||||||
arch="all"
|
arch="all"
|
||||||
|
@ -11,12 +11,14 @@ makedepends="autoconf automake libtool openssl-dev linux-headers"
|
||||||
_pkgver="$(echo "$pkgver" | sed 's/\([0-9]*\.[0-9]*\)\.*/\1-/')"
|
_pkgver="$(echo "$pkgver" | sed 's/\([0-9]*\.[0-9]*\)\.*/\1-/')"
|
||||||
source="$pkgname-$_pkgver.tar.gz::https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/snapshot/replicant-$_pkgver.tar.gz
|
source="$pkgname-$_pkgver.tar.gz::https://git.replicant.us/replicant/hardware_replicant_libsamsung-ipc/snapshot/replicant-$_pkgver.tar.gz
|
||||||
0001-i9100-modem-firmware-device-path.patch
|
0001-i9100-modem-firmware-device-path.patch
|
||||||
|
0002-runtime-device-overrides.patch
|
||||||
"
|
"
|
||||||
options="!check" # No tests
|
options="!check" # No tests
|
||||||
|
|
||||||
builddir="$srcdir"/replicant-$_pkgver
|
builddir="$srcdir"/replicant-$_pkgver
|
||||||
build() {
|
build() {
|
||||||
./autogen.sh CFLAGS=-Dloff_t=off_t --prefix=/usr --sysconfdir=/etc
|
./autogen.sh
|
||||||
|
./configure CFLAGS=-Dloff_t=off_t --prefix=/usr --sysconfdir=/etc
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,5 +26,8 @@ package() {
|
||||||
make DESTDIR="$pkgdir" install
|
make DESTDIR="$pkgdir" install
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="b38758e810623ecf3899e8a0778072014aa434e5e2ec6ea0bd8047ad53583a5a86e9a5f213e44665bb10cfe4dc90eed082d4e7f67ef6c9c18b3eda77959268d8 libsamsung-ipc-6.0-0003.tar.gz
|
sha512sums="
|
||||||
b4a092fca35825d3d20886cb96135d944a4a3fbdb596b925c02c1a294160b7abbe1e5fa9f832816fe35f4a5d6b87546504b67950e17173e145b505e8108d0ccc 0001-i9100-modem-firmware-device-path.patch"
|
37725ffac1e44396e29da12dcb47313bfacddd6df89cb514a34412def788e1716a961ddb8e9b0923d722f7e6c4455a534156099f0dd6d2d0c414a5d57415585c libsamsung-ipc-6.0-0004.tar.gz
|
||||||
|
8751a815c8749e1c098b0231e064fcc475703f0d22125acdd0156bbe9d8cf8859158c5a5ca79f305292ed312694070f62b5c54d70ca4a4a713b5405f173ee1cf 0001-i9100-modem-firmware-device-path.patch
|
||||||
|
4309b407d8ac5773a2e37573618a548116adeb5aa40233d52f2afc9f5f24f61684e72c72be6476f245f70e58d163211e4d31931bb95dc4f4cfcafa4dba693d8b 0002-runtime-device-overrides.patch
|
||||||
|
"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: sleirsgoevy <sleirsgoevy@gmail.com>
|
# Maintainer: sleirsgoevy <sleirsgoevy@gmail.com>
|
||||||
pkgname=samsungipcd
|
pkgname=samsungipcd
|
||||||
pkgver=0.1
|
pkgver=0.1
|
||||||
pkgrel=0
|
pkgrel=1
|
||||||
pkgdesc="AT modem emulation using libsamsung-ipc"
|
pkgdesc="AT modem emulation using libsamsung-ipc"
|
||||||
url="https://gitlab.com/sleirsgoevy/samsungipcd"
|
url="https://gitlab.com/sleirsgoevy/samsungipcd"
|
||||||
arch="all"
|
arch="all"
|
||||||
|
@ -35,6 +35,6 @@ openrc() {
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
7a10e382fcd8fd454a94f650d08f30b3e4a7356952cdc68b85ee08bd1bd7d2e2ed1ea0ac4e144d998702fcfc94a5b13add7b9894ba0d05870d441521ebbe1242 samsungipcd-v0.1.tgz
|
7a10e382fcd8fd454a94f650d08f30b3e4a7356952cdc68b85ee08bd1bd7d2e2ed1ea0ac4e144d998702fcfc94a5b13add7b9894ba0d05870d441521ebbe1242 samsungipcd-v0.1.tgz
|
||||||
20434087be921586b9e695bdbac92eb20d2eb2cdef7c2d0e946c59d7eb7b44e4c988e44ce8d7649e90ab682845ffc9b343367529243a02b18b3ed88a819669c1 samsungipcd.sh
|
7bdc6cbc4a9add0f4a5a5d4584fbf4fc64cf4a1f0d93a85e97229eba47bbe66a8e0bd8958b4606141a0189422e13af252d3c0301f61069dc75a64e0a3b59d959 samsungipcd.sh
|
||||||
580cb6ea86e81f85e73259d1738c2d2376f3c215e5cdb6691df39a17fb665931738b35ce4af0f7d983e795a9ea03d9ff05109302d04726f3482cb31f0e229661 90-ttywc.rules
|
580cb6ea86e81f85e73259d1738c2d2376f3c215e5cdb6691df39a17fb665931738b35ce4af0f7d983e795a9ea03d9ff05109302d04726f3482cb31f0e229661 90-ttywc.rules
|
||||||
"
|
"
|
||||||
|
|
|
@ -3,6 +3,16 @@
|
||||||
description="AT modem emulation using libsamsung-ipc"
|
description="AT modem emulation using libsamsung-ipc"
|
||||||
depends="ppp"
|
depends="ppp"
|
||||||
|
|
||||||
command="samsungipcd"
|
command="env"
|
||||||
command_args="/dev/ptywc /dev/ptywd"
|
command_args="samsungipcd /dev/ptywc /dev/ptywd"
|
||||||
supervisor="supervise-daemon"
|
supervisor="supervise-daemon"
|
||||||
|
|
||||||
|
if [[ -n "$IPC_DEVICE_NAME" ]]
|
||||||
|
then
|
||||||
|
command_args="IPC_DEVICE_NAME=$IPC_DEVICE_NAME $command_args"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$IPC_DEVICE_BOARD_NAME" ]]
|
||||||
|
then
|
||||||
|
command_args="IPC_DEVICE_BOARD_NAME=$IPC_DEVICE_BOARD_NAME $command_args"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue