Skip to content

Instantly share code, notes, and snippets.

@lattice0
Created December 22, 2020 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lattice0/0f3cd209b2963f50c89f1268e1c7d056 to your computer and use it in GitHub Desktop.
Save lattice0/0f3cd209b2963f50c89f1268e1c7d056 to your computer and use it in GitHub Desktop.
Script to compare 2 kernels in VSCode using either GitLens or GitGraph extensions
#This script will create a folder kernel_compare and download the first kernel in `kernel`, commit it, then download the second kernel on `kernel` also, and commit
mkdir kernel_compare
cd kernel_compare
mkdir kernel
wget -O android-mainline.tar.gz https://android.googlesource.com/kernel/common/+archive/refs/heads/android-4.14-stable.tar.gz
tar xvzf android-mainline.tar.gz -C kernel
rm android-mainline.tar.gz
git init
git add .
git commit -m "android mainline kernel 4.14"
rm -rf kernel
mkdir kernel
wget -O kernel.zip https://github.com/MiCode/Xiaomi_Kernel_OpenSource/archive/surya-q-oss.zip -d kernel
#-o for overwrite all, -j for not creating a folder with the original name of the .zip, and -d for specifying where to put the files
unzip -o kernel.zip -d kernel
mv kernel/* foo; rmdir kernel; mv foo kernel
rm kernel.zip
git add .
git commit -m "xiaomi poco m3 kernel 4.14"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment