Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Limd
@ 2021-01-29  4:29 CRKatri
  2021-01-30  0:22 ` New package: idevicerestore libirecovery kawaiiamber
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: CRKatri @ 2021-01-29  4:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]

There is a new pull request by CRKatri against master on the void-packages repository

https://github.com/CRKatri/void-packages limd
https://github.com/void-linux/void-packages/pull/28297

Limd
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/28297.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-limd-28297.patch --]
[-- Type: text/x-diff, Size: 10364 bytes --]

From b0f84c3b09c1232a414cd3c3f3ce6a21c5669974 Mon Sep 17 00:00:00 2001
From: Cameron Katri <me@cameronkatri.com>
Date: Thu, 28 Jan 2021 23:20:50 -0500
Subject: [PATCH 1/2] New package: idevicerestore-1.0.0

---
 ...0001-configure.ac-check-for-pthreads.patch | 25 +++++++++
 ...a21ef68d170a3fee6a58eeb4ff71399fff97.patch | 23 ++++++++
 ...5c63f585e42b32f450e4a1ab926eb9b964d2.patch | 22 ++++++++
 .../patches/WirelessChargingFix.patch         | 53 +++++++++++++++++++
 srcpkgs/idevicerestore/template               | 19 +++++++
 5 files changed, 142 insertions(+)
 create mode 100644 srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch
 create mode 100644 srcpkgs/idevicerestore/patches/1d29a21ef68d170a3fee6a58eeb4ff71399fff97.patch
 create mode 100644 srcpkgs/idevicerestore/patches/33285c63f585e42b32f450e4a1ab926eb9b964d2.patch
 create mode 100644 srcpkgs/idevicerestore/patches/WirelessChargingFix.patch
 create mode 100644 srcpkgs/idevicerestore/template

diff --git a/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch b/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch
new file mode 100644
index 00000000000..49dd8152563
--- /dev/null
+++ b/srcpkgs/idevicerestore/patches/0001-configure.ac-check-for-pthreads.patch
@@ -0,0 +1,25 @@
+From 66dc1fa84fbe65f1008255d2b1d9bced9cf9dce6 Mon Sep 17 00:00:00 2001
+From: Ivan Shapovalov <intelfx100@gmail.com>
+Date: Fri, 25 Sep 2015 23:37:27 +0300
+Subject: [PATCH] configure.ac: check for pthreads
+
+Fixes building at least on Arch.
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 1db709a..c722910 100644
+--- configure.ac
++++ configure.ac
+@@ -35,6 +35,7 @@ AM_PROG_CC_C_O
+ AC_PROG_LIBTOOL
+ 
+ # Checks for libraries.
++AC_SEARCH_LIBS([pthread_create], [pthread])
+ PKG_CHECK_MODULES(libirecovery, libirecovery-1.0 >= $LIBIRECOVERY_VERSION)
+ PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= $LIBIMOBILEDEVICE_VERSION)
+ PKG_CHECK_MODULES(libplist, libplist-2.0 >= $LIBPLIST_VERSION)
+-- 
+2.27.0
+
diff --git a/srcpkgs/idevicerestore/patches/1d29a21ef68d170a3fee6a58eeb4ff71399fff97.patch b/srcpkgs/idevicerestore/patches/1d29a21ef68d170a3fee6a58eeb4ff71399fff97.patch
new file mode 100644
index 00000000000..500a0455f50
--- /dev/null
+++ b/srcpkgs/idevicerestore/patches/1d29a21ef68d170a3fee6a58eeb4ff71399fff97.patch
@@ -0,0 +1,23 @@
+From 1d29a21ef68d170a3fee6a58eeb4ff71399fff97 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias@gmx.li>
+Date: Tue, 27 Oct 2020 18:02:52 +0100
+Subject: [PATCH] restore: Add new baseband firmware file mapping for Mav20
+ basebands (iPhone 12)
+
+---
+ src/restore.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/restore.c b/src/restore.c
+index e35047a..4f167ea 100644
+--- src/restore.c
++++ src/restore.c
+@@ -1282,6 +1282,8 @@ static const char* restore_get_bbfw_fn_for_element(const char* elem)
+ 		// ICE19 firmware files
+ 		{ "RestorePSI2", "restorepsi2.bin" },
+ 		{ "PSI2", "psi_ram2.bin" },
++		// Mav20 Firmware file
++		{ "Misc", "multi_image.mbn" },
+ 		{ NULL, NULL }
+ 	};
+ 
diff --git a/srcpkgs/idevicerestore/patches/33285c63f585e42b32f450e4a1ab926eb9b964d2.patch b/srcpkgs/idevicerestore/patches/33285c63f585e42b32f450e4a1ab926eb9b964d2.patch
new file mode 100644
index 00000000000..806b778667b
--- /dev/null
+++ b/srcpkgs/idevicerestore/patches/33285c63f585e42b32f450e4a1ab926eb9b964d2.patch
@@ -0,0 +1,22 @@
+From 33285c63f585e42b32f450e4a1ab926eb9b964d2 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias@gmx.li>
+Date: Tue, 27 Oct 2020 23:28:30 +0100
+Subject: [PATCH] restore: Add SE,ChipID 0xD2 for iPhone 12 SE firmware
+
+---
+ src/restore.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/restore.c b/src/restore.c
+index 841990d..adea97a 100644
+--- src/restore.c
++++ src/restore.c
+@@ -1985,7 +1985,7 @@ static plist_t restore_get_se_firmware_data(restored_client_t restore, struct id
+ 	}
+ 	if (chip_id == 0x20211) {
+ 		comp_name = "SE,Firmware";
+-	} else if (chip_id == 0x73 || chip_id == 0x64 || chip_id == 0xC8) {
++	} else if (chip_id == 0x73 || chip_id == 0x64 || chip_id == 0xC8 || chip_id == 0xD2) {
+ 		comp_name = "SE,UpdatePayload";
+ 	} else {
+ 		info("WARNING: Unknown SE,ChipID 0x%" PRIx64 " detected. Restore might fail.\n", (uint64_t)chip_id);
diff --git a/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch b/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch
new file mode 100644
index 00000000000..3c8a98eb865
--- /dev/null
+++ b/srcpkgs/idevicerestore/patches/WirelessChargingFix.patch
@@ -0,0 +1,53 @@
+From 18ba27c74305100146dd9599336dbdcd5e794ad1 Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias@gmx.li>
+Date: Mon, 12 Oct 2020 17:56:20 +0200
+Subject: [PATCH] restore: Fix NORData request by sending new components (fixes
+ wireless charging on newer devices)
+
+The NorImageData response didn't include the WCHFirmwareUpdater for newer
+devices, resulting in wireless charging capability to be broken on iPhone XS,
+iPhone XR, and newer. Upon further inspection it turned out that the selection
+for the images to send was only based on `IsFirmwarePayload` property.
+However, there are additional components with other properties, as the
+WCHFirmwareUpdater one, that don't have the `IsFirmwarePayload` property but
+instead `IsSecondaryFirmwarePayload` and `IsLoadedByiBoot` which seem to be
+the rule for including these images.
+---
+ src/restore.c | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/restore.c b/src/restore.c
+index 3e84689..e35047a 100644
+--- src/restore.c
++++ src/restore.c
+@@ -1059,11 +1059,26 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t*
+ 				plist_dict_next_item(build_id_manifest, iter, &component, &manifest_entry);
+ 				if (component && manifest_entry && plist_get_node_type(manifest_entry) == PLIST_DICT) {
+ 					uint8_t is_fw = 0;
+-					plist_t is_fw_node = plist_access_path(manifest_entry, 2, "Info", "IsFirmwarePayload");
+-					if (is_fw_node && plist_get_node_type(is_fw_node) == PLIST_BOOLEAN) {
+-						plist_get_bool_val(is_fw_node, &is_fw);
++					uint8_t is_secondary_fw = 0;
++					uint8_t loaded_by_iboot = 0;
++					plist_t fw_node;
++
++					fw_node = plist_access_path(manifest_entry, 2, "Info", "IsFirmwarePayload");
++					if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) {
++						plist_get_bool_val(fw_node, &is_fw);
++					}
++
++					fw_node = plist_access_path(manifest_entry, 2, "Info", "IsLoadedByiBoot");
++					if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) {
++						plist_get_bool_val(fw_node, &loaded_by_iboot);
+ 					}
+-					if (is_fw) {
++
++					fw_node = plist_access_path(manifest_entry, 2, "Info", "IsSecondaryFirmwarePayload");
++					if (fw_node && plist_get_node_type(fw_node) == PLIST_BOOLEAN) {
++						plist_get_bool_val(fw_node, &is_secondary_fw);
++					}
++
++					if (is_fw || (is_secondary_fw && loaded_by_iboot)) {
+ 						plist_t comp_path = plist_access_path(manifest_entry, 2, "Info", "Path");
+ 						if (comp_path) {
+ 							plist_dict_set_item(firmware_files, component, plist_copy(comp_path));
diff --git a/srcpkgs/idevicerestore/template b/srcpkgs/idevicerestore/template
new file mode 100644
index 00000000000..a087829f10a
--- /dev/null
+++ b/srcpkgs/idevicerestore/template
@@ -0,0 +1,19 @@
+# Template file for 'idevicerestore'
+pkgname=idevicerestore
+version=1.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool pkg-config"
+makedepends="libimobiledevice-devel libplist-devel libressl-devel
+ libzip-devel readline-devel libcurl-devel libirecovery-devel"
+depends="usbmuxd"
+short_desc="A command-line application to restore firmware files to iOS devices."
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/libimobiledevice/idevicerestore"
+distfiles="https://github.com/libimobiledevice/${pkgname}/archive/${version}.tar.gz"
+checksum=2c83c60b8b7027b3730d63c3ebbdede5b0b43bd5ab1e54caaa52b3b1268881e5
+
+pre_configure() {
+	autoreconf -fi
+}

From cbb14e6e2e2879af558fe0787d0519bc745d3c7d Mon Sep 17 00:00:00 2001
From: Cameron Katri <me@cameronkatri.com>
Date: Thu, 28 Jan 2021 23:23:22 -0500
Subject: [PATCH 2/2] New package: libirecovery-1.0.0

---
 common/shlibs                 |  1 +
 srcpkgs/libirecovery-devel    |  1 +
 srcpkgs/libirecovery/template | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 120000 srcpkgs/libirecovery-devel
 create mode 100644 srcpkgs/libirecovery/template

diff --git a/common/shlibs b/common/shlibs
index 91a9d7a282e..c526df47c21 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4037,3 +4037,4 @@ libwinbind-client-samba4.so samba-libs-4.13.2_1
 libsixel.so.1 libsixel-1.8.6_1
 libpamtest.so.0 pam_wrapper-1.1.3_1
 libopenaptx.so.0 libopenaptx-0.2.0_1
+libirecovery-1.0.so.3 libirecovery-1.0.0_1
diff --git a/srcpkgs/libirecovery-devel b/srcpkgs/libirecovery-devel
new file mode 120000
index 00000000000..d093190e4fa
--- /dev/null
+++ b/srcpkgs/libirecovery-devel
@@ -0,0 +1 @@
+libirecovery
\ No newline at end of file
diff --git a/srcpkgs/libirecovery/template b/srcpkgs/libirecovery/template
new file mode 100644
index 00000000000..8f0bb884ad4
--- /dev/null
+++ b/srcpkgs/libirecovery/template
@@ -0,0 +1,28 @@
+# Template file for 'libirecovery'
+pkgname=libirecovery
+version=1.0.0
+revision=1
+build_style=gnu-configure
+hostmakedepends="automake libtool pkgconf"
+makedepends="libusb-devel readline-devel ncurses-devel eudev-libudev-devel"
+short_desc="The libirecovery library allows communication with iBoot/iBSS of iOS devices via USB."
+maintainer="Orphaned <orphan@voidlinux.org>"
+license="LGPL-2.1-only"
+homepage="https://github.com/libimobiledevice/libirecovery"
+distfiles="https://github.com/libimobiledevice/libirecovery/archive/${version}.tar.gz"
+checksum=b0228372ae17fc78492f67932caea1c7f04d6a5da3468f240a6dac9173b29864
+
+pre_configure() {
+	autoreconf -fi
+}
+
+libirecovery-devel_package() {
+	short_desc+=" - development files"
+	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/include
+		vmove usr/lib/*.a
+		vmove usr/lib/*.so
+		vmove usr/lib/pkgconfig
+	}
+}

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-17  2:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29  4:29 [PR PATCH] Limd CRKatri
2021-01-30  0:22 ` New package: idevicerestore libirecovery kawaiiamber
2021-01-30  0:24 ` [PR REVIEW] " kawaiiamber
2021-01-30  0:25 ` kawaiiamber
2021-01-30  0:26 ` kawaiiamber
2021-01-30  0:26 ` kawaiiamber
2021-01-30  0:26 ` kawaiiamber
2021-01-30  0:27 ` kawaiiamber
2021-01-30  0:27 ` kawaiiamber
2021-02-13 15:28 ` [PR PATCH] [Updated] " CRKatri
2022-01-12 20:16 ` Jackojc
2022-01-12 20:21 ` ahesford
2022-05-03  2:13 ` github-actions
2022-05-17  2:14 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).