Toolbox¶
A few tools and facts save a lot of reading: a query tool for the resource archive, a record of which parts of the image are someone else's library, and the debug switches Apple left in the shipped firmware.
Querying the archive¶
Much of what the resource archive holds can be asked for instead of read off a dump.
chikuma/build/archwalk is the whole query surface. It is built from the same readers the device
runs, so what it prints is what the firmware would read.
./build/archwalk sections # the 27 fourcc sections
./build/archwalk screen 0x0DAD0CE6 # a screen's slots, geometry and records
./build/archwalk item 0x48 | str <id> | name <text> | lists | find <id>
./build/archwalk colours | ids <FOURCC> | refs <id> | bmap <id> | sorc <n>
ARCHIVE_BLOB=../firmware/extracted/osos-dec.dfu ./build/archwalk ... # the whole image
Third-party components¶
The tree records which parts of the image are somebody else's published work, and at what version. That decides what gets recovered and what gets vendored. The version Chikuma vendors is its own choice and need not match the image's.
The OpenGL ES implementation shows how it works. Its strings identify it as Vincent, and the
advertised extension list is the stock fixed-point set, with one addition: GL_APPLE_binary_shader,
with glRegisterBinaryShaderAPPLE and glUnregisterBinaryShaderAPPLE.
| Part | Treatment | Why |
|---|---|---|
| Vincent | vendored from upstream | published work, nothing to re-type |
GL_APPLE_binary_shader |
recovered | Apple wrote it, and it could have been different |
Vendoring a library does not bring along the parts Apple grew onto it. A file that takes one says which half it is.
Debug switches on a real device¶
The firmware carries about 37 debug options. Two empty files in iPod_Control/Device/ gate them, a
master gate and a per-feature flag.
With logging on, the firmware writes an event log and a usage report to the device. Other options show memory, FPS and voltage on screen. This is Apple's own instrumentation, present in the shipped firmware, and it switches on with no modification.