Last active
September 9, 2020 23:50
-
-
Save andreanidouglas/5d45413007d47f4f3d560925a1b3b628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### This will compile a bzImage and the modules the latest version on the repository | |
### Required a file "config_default" to compile with | |
set -ex | |
unique=$(date +%s) | |
version=$(git ls-remote --refs --tags https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | cut -d" " -f2 | cut -d'/' -f3 | sort | tail -1) | |
curl -4 -L --url "https://git.kernel.org/torvalds/t/linux-$version.tar.gz" -o linux-"$version"_"$unique".tar.gz | |
tar xvf linux-"$version"_"$unique".tar.gz | |
cd linux_"$version"_"$unique" | |
make mrproper | |
cp ../config_default .config | |
make olddefconfig | |
make -j`nproc --all` bzImage 2>&1 | tee ../build_linux_"$version"_"$unique".log | |
make -j`nproc --all` modules 2>&1 | tee ../build_linux_modules_"$version"_"$unique".log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment