From 27bf0d203d324c7b04ec599f3ea5c59027c84d4f Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 25 May 2016 22:22:15 -0500 Subject: [PATCH 1/3] facetimehd-firmware: 1.43 -> 1.43_4 --- .../firmware/facetimehd-firmware/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix index 05a293083b7f..2f16dd5c5a4c 100644 --- a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix @@ -2,14 +2,28 @@ let - version = "1.43"; + version = "1.43_4"; - dmgRange = "420107885-421933300"; # the whole download is 1.3GB, this cuts it down to 2MB + # Updated according to https://github.com/patjak/bcwc_pcie/pull/81/files + # and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/Makefile#L3-L9 + # and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/extract-firmware.sh + + # From the Makefile: + dmgUrl = "https://support.apple.com/downloads/DL1877/en_US/osxupd10.11.5.dmg"; + dmgRange = "205261917-208085450"; # the whole download is 1.3GB, this cuts it down to 2MB + # Notes: + # 1. Be sure to update the sha256 below in the fetch_url + # 2. Be sure to update the homepage in the meta + + # Also from the Makefile (OS_DRV, OS_DRV_DIR), but seems to not change: firmwareIn = "./System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface"; firmwareOut = "firmware.bin"; - firmwareOffset = "81920"; - firmwareSize = "603715"; + + # The following are from the extract-firmware.sh + firmwareOffset = "81920"; # Variable: firmw_offsets + firmwareSize = "603715"; # Variable: firmw_sizes + # separated this here as the script will fail without the 'exit 0' unpack = pkgs.writeScriptBin "unpack" '' @@ -22,10 +36,9 @@ in stdenv.mkDerivation { name = "facetimehd-firmware-${version}"; - src = fetchurl { - url = "https://support.apple.com/downloads/DL1849/en_US/osxupd10.11.2.dmg"; - sha256 = "1jw6sy9vj27amfak83cs2c7q856y4mk1wix3rl4q10yvd9bl4k9x"; + url = dmgUrl; + sha256 = "0xqkl4yds0n9fdjvnk0v5mj382q02crry6wm2q7j3ncdqwsv02sv"; curlOpts = "-r ${dmgRange}"; }; @@ -42,7 +55,7 @@ stdenv.mkDerivation { meta = with stdenv.lib; { description = "facetimehd firmware"; - homepage = https://support.apple.com/downloads/DL1849; + homepage = https://support.apple.com/downloads/DL1877; license = licenses.unfree; maintainers = [ maintainers.womfoo ]; platforms = platforms.linux; From 24a87685e20b510d8240e615f24667f6dc586648 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 25 May 2016 22:28:27 -0500 Subject: [PATCH 2/3] facetimehd: Document updating the facetimehd-firmware --- pkgs/os-specific/linux/facetimehd/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix index 3dc1e14e73db..c6493c907c48 100644 --- a/pkgs/os-specific/linux/facetimehd/default.nix +++ b/pkgs/os-specific/linux/facetimehd/default.nix @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "patjak"; repo = "bcwc_pcie"; + # Note: When updating this revision: + # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/ + # 2. Test the module and firmware change via: + # a. Give some applications a try (Skype, Hangouts, Cheese, etc.) + # b. Run: journalctl -f + # c. Then close the lid + # d. Then open the lid (and maybe press a key to wake it up) + # e. see if the module loads back (apps using the camera won't + # recover and will have to be restarted) and the camera + # still works. rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c"; sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp"; }; From f993e6543a88680b9177e31823ff9c83265b966e Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 26 May 2016 13:43:00 -0500 Subject: [PATCH 3/3] facetimehd, facetimehd-firmware: Add grahamc as a maintainer --- lib/maintainers.nix | 1 + pkgs/os-specific/linux/facetimehd/default.nix | 2 +- pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 544caabf8e44..faa377b79872 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -151,6 +151,7 @@ goibhniu = "Cillian de RĂ³iste "; Gonzih = "Max Gonzih "; gpyh = "Yacine Hmito "; + grahamc = "Graham Christensen "; gridaphobe = "Eric Seidel "; guibert = "David Guibert "; havvy = "Ryan Scheel "; diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix index c6493c907c48..cbacb6ae074d 100644 --- a/pkgs/os-specific/linux/facetimehd/default.nix +++ b/pkgs/os-specific/linux/facetimehd/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { homepage = https://github.com/patjak/bcwc_pcie; description = "Linux driver for the Facetime HD (Broadcom 1570) PCIe webcam"; license = licenses.gpl2; - maintainers = [ maintainers.womfoo ]; + maintainers = with maintainers; [ womfoo grahamc ]; platforms = platforms.linux; }; diff --git a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix index 2f16dd5c5a4c..69abaf26197d 100644 --- a/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/facetimehd-firmware/default.nix @@ -57,7 +57,7 @@ stdenv.mkDerivation { description = "facetimehd firmware"; homepage = https://support.apple.com/downloads/DL1877; license = licenses.unfree; - maintainers = [ maintainers.womfoo ]; + maintainers = with maintainers; [ womfoo grahamc ]; platforms = platforms.linux; };