Skip to content

Instantly share code, notes, and snippets.

@mikechau
Last active May 23, 2020 14:43
Show Gist options
  • Save mikechau/d04c866e142000b6ce5a9a64c8e80581 to your computer and use it in GitHub Desktop.
Save mikechau/d04c866e142000b6ce5a9a64c8e80581 to your computer and use it in GitHub Desktop.
fedora-x230-fhd.md

Generate SSH Keys

ssh-keygen -t rsa -b 4096 -C "$user@$domain"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

Install vim

sudo dnf makecache --refresh  # updates the dnf cache
sudo dnf install vim-enhanced --allowerasing  # installs vim allowing dnf to solve dependencies problems like this

https://www.reddit.com/r/Fedora/comments/5rim51/cant_install_vim_on_clean_install_of_fedora_25/

Kernel Patching

  1. Install Kernel dev dependencies
sudo dnf install fedpkg fedora-packager rpmdevtools ncurses-devel pesign
sudo /usr/libexec/pesign/pesign-authorize-users
  1. Build kernel from source tree
  fedpkg clone -a kernel
  cd kernel
  fedpkg switch-branch f25
  git checkout -b custom/f25
  1. Uncomment/set build id
# kernel.spec
%define buildid .local
  1. Add x230 FHD patch (based on patch from kitestramuort)
wget https://raw.githubusercontent.com/mikechau/linux-kernel-patches/master/0001-Apply-X230-FHD-patch-to-i915.patch -O x230_fhd_i915.patch

# kernel.spec
## find "# END OF PATCH DEFINITIONS" and enter the following before it:

# x230 FHD patch
# https://www.reddit.com/r/thinkpad/comments/3f2ht0/ive_got_the_51nb_fhd_x230/
Patch9001: x230_fhd_i915.patch

https://www.reddit.com/r/thinkpad/comments/3f2ht0/ive_got_the_51nb_fhd_x230/

  1. Install build dependencies
sudo dnf builddep kernel.spec
  1. Build kernel!
make release
fedpkg --release 25 local
  1. Install the new kernel
sudo dnf install --nogpgcheck ./x86_64/kernel-4.11.6-$version.local.fc25.x86_64.rpm ./x86_64/kernel-core-4.11.6-$version.local.fc25.x86_64.rpm ./x86_64/kernel-modules-4.11.6-$version.local.fc25.x86_64.rpm ./x86_64/kernel-modules-extras-4.11.6-$version.local.fc25.x86_64.rpm ./x86_64/kernel-headers-4.11.6-$version.local.fc25.x86_64.rpm

https://fedoraproject.org/wiki/Building_a_custom_kernel?rd=Docs/CustomKernel http://www.labbott.name/blog/2015/12/17/building-and-adding-patches-to-the-fedora-kernel/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment