Repository navigation
Input: apple_z2: touch firmware by the unit's personality on iPhone 8 and 8 Plus - #113
Merged
Merged
Conversation
Allow the bootloader-supplied personality and document variant firmware- name prefixes. Restrict the supported personality values only for D20 and D201. Assisted-by: LLM Signed-off-by: MasadaIV <6883111+MasadaIV@users.noreply.github.com>
Choose the distinct public firmware variant from the boot personality. Honor explicitly declared 0x103 full-word calibration framing while preserving legacy containers and other boards. Assisted-by: LLM Signed-off-by: MasadaIV <6883111+MasadaIV@users.noreply.github.com>
Let the driver append the variant selected from the boot personality. Remove the D20 override so it inherits the shared iPhone 8 prefix. The iPhone 8 Plus keeps its separate firmware filename. Assisted-by: LLM Signed-off-by: MasadaIV <6883111+MasadaIV@users.noreply.github.com>
A board whose controllers come with more than one firmware personality names the start of its firmware files; the unit's personality, which the bootloader passes as apple,hid-merge-personality, completes the name. firmware-name stays a complete file name, the one used when the bootloader passes no personality. This replaces the D20/D201-only prefix meaning of firmware-name and the list of personalities, so a new personality needs no binding change. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
Build the firmware name from apple,firmware-prefix and the personality the bootloader passes on every board and in both the shared and the D21 backends, not only on the D20 and D201, and accept any personality instead of a fixed list: a personality is one more file in the firmware recipe, with no kernel change. When the bootloader passes no personality, load firmware-name as before rather than leaving the touchscreen off. When it passes one without a file, the load fails and the log names the missing file; the unit never gets another personality's firmware. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
… 8 Plus Both iPhone 8 sizes come with two touch firmware personalities in their IPSW: D20.mtprops has C1F5D,3 and C1F5D,4, D21.mtprops C1F5E,3 and C1F5E,4. Name the files' prefix so the driver loads the one the unit's ADT asks for. firmware-name is the file without a personality from the bootloader, as before: C1F5D,3 on the iPhone 8, C1F5E,4 (the tested one) on the iPhone 8 Plus. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What users notice: an iPhone 8 or 8 Plus whose touch controller needs the other firmware personality gets a working touchscreen instead of a dead one. Each unit's ADT names its personality (
multi-touchhid-merge-personality: C1F5D,3 or C1F5D,4 on the iPhone 8, C1F5E,3 or C1F5E,4 on the 8 Plus). m1n1 already passes it on asapple,hid-merge-personality, so no m1n1 change is needed. apple_z2 now loads<apple,firmware-prefix>-<personality>.bin.This carries MasadaIV's #101 unchanged (three commits, MasadaIV as author: the D20/D201 personality selection and the HBPP 0x103 framing that C1F5D,4 containers declare) and adds three commits on top:
firmware-namestays a complete file name; the newapple,firmware-prefixnames the start of the per-personality files. There is no fixed list of personalities.[A-Za-z0-9,-]is accepted, so a new one only needs a recipe output. Without a personality from the bootloader, it loadsfirmware-nameas before. With a personality that has no file, the load fails and the log names the file. It never loads another personality's firmware (orchard docs/firmware-recipes.md, "Firmware variants").firmware-namekeeps today's files: C1F5D,3 on the iPhone 8, C1F5E,4 (the tested one) on the 8 Plus.Checked offline: checkpatch is clean on all three new commits. dtc builds t8015-d20/d201/d21/d211, and their touchscreen nodes name the prefix and the fallback. orchard's
test_source_*pass against this tree (49 tests), as does the new orchard testtest_source_z2_personality, which compilesapple_z2_fw_nameon the host and runs it with C1F5D,4 / C1F5E,3 / no prefix / no personality /..// empty inputs.Needs a device: C1F5D,4 through the public recipe with calibration from the ADT (a D201 ,4 unit, e.g. MasadaIV's), and C1F5E,3 on an 8 Plus. No unit with C1F5E,3 is known; the tested D21 runs C1F5E,4. Units whose files exist today are unaffected: D201/D20 C1F5D,3 and D21 C1F5E,4 load the same file names as before.
Merge order: 1. OrchardLinux/tools#130 (z2fw-from-mtprops@4), then a tools release. 2. this PR, which supersedes #101 and can merge in parallel with 1. 3. the orchard PR, last, with the kernel lock moved (
tools/kernel-tree/take) to this PR's merge commit. Firmware without this kernel and this kernel without the new firmware both keep today's behaviour.