Add install script for Ubuntu

Gabi Nagy
2018-06-15 10:58:14 +03:00
parent 6f0f9670c8
commit bc09e1c80f

@@ -100,6 +100,49 @@ See [Additional Notes](#additional-notes) below in case you come across any issu
All the steps are the same as Debian. (The only difference is that the firmware.bin is copied into `/lib/firmware/facetimehd/` instead of `/usr/lib/firmware/facetimehd/`, but the script does that for you.)
## Ubuntu installation script
To be placed outside the `bcwc_pcie` folder. Run with `bash script.sh`
#!/bin/bash
cd bcwc_pcie/firmware
printf "Compiling firmware\n";
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";
sudo modprobe facetimehd
printf "done\n\n";
If `sudo modprobe facetimehd` fails, run `dmesg`. If you get `facetimehd: version magic '4.13.0-37-generic SMP mod_unload ' should be '4.13.0-38-generic SMP mod_unload '`, or similar, you may manually edit the file via `sudo vim /lib/modules/4.13.0-38-generic/extra/facetimehd.ko` and replace `vermagic=4.13.0-37-generic SMP mod_unload` with `vermagic=4.13.0-38-generic SMP mod_unload`. Then you may be able to `sudo modprobe facetimehd` without any issues.
## Suspend on 16.04 and later (systemd)
As long as suspend is not working you can use the following approach to make the module unload on suspend: