Closed SicVolo closed 8 years ago
Hi, the new MacBook webcams aren't iSights anymore (afaik). You'll find the new driver in Extensions/AppleWebcam... or something similar.
I am actually looking at the osx driver already since it's the only way to get this thing running. It would be nteresting to find where the Firmware is stored. It might be in the same folder, I just haven't looked yet or osx is storing firmwares at some other place. I don't think it's in the binary. It could also be stored on-chip.
Admittedly, I know little about hw/firmware/driver/kernel relationship, but wouldn't EFI now have a responsibility for handling firware and basic IO with the SoC? I.e. do you need to init it, or can it be delegated to UEFI?
Sorry for the late reply. I doubt we'll get any help from the system firmware. But I took a quick look and the image signal processor seems to be what is loading a firmware. Hopefully the actual binary is available on a flash chip somewhere near the SoC and can be easily loaded onto the ISP.
The Yosemite driver is at Extensions/AppleCameraInterface.kext, and the firmware is stored in the S2ISPFIRMWARE segment in the binary. I have opened a pull request that contains the decompressed binary firmware and a script for extracting it.
Very cool! I took a quick look at my firmware and the ISP seems to be either from Apple entirely or perhaps from both Broadcom and Apple. I guess that is the reason why Broadcom haven't given us a Linux driver yet. There seems to be tons of cool stuff on the ISP like automatic exposure, face recognition, dynamic scene metering. I guess the ISP is going to take a while to figure out.
Yup, I took a quick look at the firmware strings and the copyright is entirely Apple, no mention of Broadcom. There are driver references to an AD5816 focus controller (there's a public GPL Linux driver courtesy of Nvidia), TPS65709 power management IC (probably custom version of TPS65708 or similar), OV5650 image sensor, and IMX135 image sensor.
@patjak I believe this issue is ready to be closed now that #7 has been merged.
The decompress app didn't work for me on the latest image, but once you rip the firmware out of the segment, you can use regular g(un)zip to inflate it.
The contents of mine: Jan 21 2015 16:54:51 -- S2ISP-01.39.00; H4ISPAPPLE H4ISPC ffw iPhone OS 7.0.3
The way the data is offset, it looks like an ARM64 binary image; Mentions of tasks and semaphores lead me to believe it's some apple in-house RTOS. Both the OV5650 and IMX125 have been used in iPhones, so it's not surprising to think this isn't just something Apple had Broadcom cook up and wrap a PCI-E core around.
There's also a string about "CDualStreamControllerBase.cpp" and I can confirm the mention of two image sensors that @ddcc noticed. As well as LUX vs LED Flash gain.. (I don't remember a flash on my macbook..)
@samlauzon There are also various references in the driver to S2 which could be the following chip: http://www.ambarella.com.tw/uploads/docs/S2-ipcam-product-brief.pdf
Will see soon enough since I'm close to powering it up and loading the firmware :)
Or may-be just use it as a point of reference in a black-box separation study if licensing is a problem? it's in System/Library/Extensions/Apple_iSight.kext/Contents/MacOS/Apple_iSight There's a bunch of people who need iSight to work, yet non able to write a linux driver.