patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.36k stars 161 forks source link

Error building on Ubuntu 19.04 #184

Closed meowsus closed 5 years ago

meowsus commented 5 years ago

Here's what I'm getting after a kernel upgrade

Compiling firmware

Found matching hash from OS X, El Capitan 10.11.3
==> Extracting firmware...
 --> Decompressing the firmware using gzip...
 --> Deleting temporary files...
 --> Extracted firmware version 1.43.0

done

Installing firmware
Copying firmware into '/lib/firmware/facetimehd'
done

Compiling driver
make -C /lib/modules/5.0.0-16-generic/build M=/home/meowsus/src/bcwc_pcie modules
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-16-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-16-generic'
done

Installing driver
make -C /lib/modules/5.0.0-16-generic/build M=/home/meowsus/src/bcwc_pcie modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.0.0-16-generic'
  INSTALL /home/meowsus/src/bcwc_pcie/facetimehd.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  5.0.0-16-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-16-generic'
done

Running depmod
done

Running modprobe -r bdc_pci
done

Loading driver
modprobe: ERROR: could not insert 'facetimehd': Exec format error
done
meowsus commented 5 years ago

I fixed it by removing the old compiled facetimehd files.

Here's the script that I use if anyone wants it. It assumes you've cloned this repo to ~/src/ already:

#!/usr/bin/env bash

printf "Upgrading library..."
cd ~/src/bcwc_pcie
git pull

printf "Compiling firmware\n";
cd ~/src/bcwc_pcie/firmware
make
printf "done\n\n";

printf "Installing firmware\n";
sudo make install
printf "done\n\n";

cd ..

printf "Compiling driver\n";
make
printf "done\n\n";

printf "Installing driver\n";
sudo make install
printf "done\n\n";

printf "Running depmod\n";
sudo depmod
printf "done\n\n";

printf "Running modprobe -r bdc_pci\n";
sudo modprobe -r bdc_pci
printf "done\n\n";

printf "Loading driver\n";
rm facetimehd.*
sudo modprobe facetimehd
printf "done\n\n";