updating markup for readme

This commit is contained in:
Jake Day 2018-03-24 15:40:27 -04:00
parent 07df5e3a33
commit 8df6c615fd

View file

@ -56,26 +56,43 @@ For the i915_firmware files, please select the version for your device.
* skl for series 4 devices (Surface Book, Surface Pro 4, Surface Laptop)
* bxt for series 3 devices (Surface Pro 3)
1. Copy the files under root to where they belong:
* $ sudo cp -R root/* /
```
sudo cp -R root/* /
```
2. Make /lib/systemd/system-sleep/hibernate.sh as executable:
* $ sudo chmod a+x /lib/systemd/system-sleep/hibernate.sh
```
sudo chmod a+x /lib/systemd/system-sleep/hibernate.sh
```
3. Extract ipts_firmware_[VERSION].zip to /lib/firmware/intel/ipts/
* $ sudo mkdir -p /lib/firmware/intel/ipts
* $ sudo unzip firmware/ipts_firmware_[VERSION].zip -d /lib/firmware/intel/ipts/
```
sudo mkdir -p /lib/firmware/intel/ipts
sudo unzip firmware/ipts_firmware_[VERSION].zip -d /lib/firmware/intel/ipts/
```
4. Extract i915_firmware_[VERSION].zip to /lib/firmware/i915/
* $ sudo mkdir -p /lib/firmware/i915
* $ sudo unzip firmware/i915_firmware_[VERSION].zip -d /lib/firmware/i915/
```
sudo mkdir -p /lib/firmware/i915
sudo unzip firmware/i915_firmware_[VERSION].zip -d /lib/firmware/i915/
```
5. (Ubuntu 17.10) Fix issue with Suspend to Disk:
* $ sudo ln -s /lib/systemd/system/hibernate.target /etc/systemd/system/suspend.target && sudo ln -s /lib/systemd/system/systemd-hibernate.service /etc/systemd/system/systemd-suspend.service
```
sudo ln -s /lib/systemd/system/hibernate.target /etc/systemd/system/suspend.target && sudo ln -s /lib/systemd/system/systemd-hibernate.service /etc/systemd/system/systemd-suspend.service
```
6. (all other distros) Fix issue with Suspend to Disk:
* $ sudo ln -s /usr/lib/systemd/system/hibernate.target /etc/systemd/system/suspend.target && sudo ln -s /usr/lib/systemd/system/systemd-hibernate.service /etc/systemd/system/systemd-suspend.service
```
sudo ln -s /usr/lib/systemd/system/hibernate.target /etc/systemd/system/suspend.target && sudo ln -s /usr/lib/systemd/system/systemd-hibernate.service /etc/systemd/system/systemd-suspend.service
```
7. Install the latest marvell firmware (if their repo is down, use my copy at https://github.com/jakeday/mwifiex-firmware):
* git clone git://git.marvell.com/mwifiex-firmware.git
* sudo mkdir -p /lib/firmware/mrvl/
* sudo cp mwifiex-firmware/mrvl/* /lib/firmware/mrvl/
```
git clone git://git.marvell.com/mwifiex-firmware.git
sudo mkdir -p /lib/firmware/mrvl/
sudo cp mwifiex-firmware/mrvl/* /lib/firmware/mrvl/
```
8. Install the custom kernel and headers (or follow the steps for compiling the kernel from source below):
* $ sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb
```
sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb
```
9. Reboot on installed kernel.
### NOTES
@ -89,23 +106,41 @@ If you don't want to use the pre-built kernel and headers, you can compile the k
0. (Prep) Install the required packages for compiling the kernel:
* $ sudo apt-get install build-essential binutils-dev libncurses5-dev libssl-dev ccache bison flex
```
sudo apt-get install build-essential binutils-dev libncurses5-dev libssl-dev ccache bison flex
```
1. Assuming you cloned the linux-surface repo (this one) into ~/linux-surface, go to the parent directory:
* $ cd ~
```
cd ~
```
2. Clone the mainline stable kernel repo:
* $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
```
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
```
3. Go into the linux-stable directory:
* $ cd linux-stable
```
cd linux-stable
```
4. Checkout the version of the kernel you wish to target (replacing with your target version):
* $ git checkout v4.y.z
```
git checkout v4.y.z
```
5. Apply the kernel patches from the linux-surface repo (this one):
* $ for i in ~/linux-surface/patches/[VERSION]/*.patch; do patch -p1 < $i; done
```
for i in ~/linux-surface/patches/[VERSION]/*.patch; do patch -p1 < $i; done
```
6. Copy over the config file from the linux-surface repo (this one):
* $ cp ~/linux-surface/config .config
```
cp ~/linux-surface/config .config
```
7. Compile the kernel and headers (for ubuntu, refer to the build guild for your distro):
* $ make -j \`getconf _NPROCESSORS_ONLN\` deb-pkg LOCALVERSION=-linux-surface
```
make -j \`getconf _NPROCESSORS_ONLN\` deb-pkg LOCALVERSION=-linux-surface
```
8. Install the kernel and headers:
* $ sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb
```
sudo dpkg -i linux-headers-[VERSION].deb linux-image-[VERSION].deb
```
### Donations Appreciated!