Files
facetimehd/firmware/Makefile
Jan Hilberath 1aa456e00a Firmware extraction update for Mac OS X 10.11.3
This patch set updates the firmware download and extraction scripts
to work with the OS X El Capitan 10.11.3 Update:

https://support.apple.com/downloads/DL1858
https://support.apple.com/downloads/DL1858/en_US/osxupd10.11.3.dmg

Fixes: https://github.com/patjak/bcwc_pcie/issues/62
Signed-off-by: Jan Hilberath <jan@hilberath.de>
2016-03-10 22:59:21 +09:00

44 lines
1.1 KiB
Makefile

SHELL = /bin/bash
DMG:=osxupd10.11.3.dmg
OSX_DRV:=AppleCameraInterface
OSX_DRV_DIR:=System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS
RANGE:=187085540-191012220
URL:=https://support.apple.com/downloads/DL1858/en_US/$(DMG)
FILE:=$(OSX_DRV_DIR)/$(OSX_DRV)
ifneq ("$(wildcard /usr/lib/firmware)", "")
FW_DIR_BASE:="/usr/lib/firmware"
else
FW_DIR_BASE:="/lib/firmware"
endif
FW_DIR:="$(FW_DIR_BASE)/facetimehd"
all: $(OSX_DRV)
@./extract-firmware.sh -x "$(OSX_DRV)"
$(OSX_DRV):
@echo ""
@echo "Checking dependencies for driver download..."
@which curl xzcat cpio
@echo ""
@# Ty to wvengen, see: https://github.com/patjak/bcwc_pcie/issues/14#issuecomment-167446787
@echo "Downloading the driver, please wait..."
@(curl -s -L -r "$(RANGE)" "$(URL)" | xzcat -q | cpio --format odc -i -d "./$(FILE)") &> /dev/null || true
@mv "$(FILE)" .
@rmdir -p "$(OSX_DRV_DIR)"
install:
@echo "Copying firmware into '$(DESTDIR)/$(FW_DIR)'"
@install -dm755 "$(DESTDIR)/$(FW_DIR)"
@install -m644 "firmware.bin" "$(DESTDIR)/$(FW_DIR)/firmware.bin"
.PHONY: clean
clean:
rm -f AppleCamera{Interface,.sys}
rm -f firmware.bin