From 8df6c615fde1616f4462bf9f349337aa9904aa55 Mon Sep 17 00:00:00 2001 From: Jake Day Date: Sat, 24 Mar 2018 15:40:27 -0400 Subject: [PATCH] updating markup for readme --- README.md | 77 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 49284883f..7d414a5b1 100644 --- a/README.md +++ b/README.md @@ -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!