Last active
November 29, 2018 19:12
-
-
Save travisdowns/3f9e68746fe961c5976825c3952676d3 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/bash | |
LINUX=linux-4.19.5 | |
set -e | |
set -x | |
if [ -z "$THREADS" ]; then | |
echo "set THREADS to the number of compilation threads" | |
exit 1 | |
fi | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi | |
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | |
# kernel build deps | |
sudo apt-get install -y ccache flex bison bc fakeroot libncurses5-dev libssl-dev | |
TARFILE=${LINUX}.tar.xz | |
curl https://cdn.kernel.org/pub/linux/kernel/v4.x/${TARFILE} -o ${TARFILE} | |
time tar xf ${TARFILE} | |
cd ${LINUX} | |
# do the cross-compile | |
ARCH=arm make defconfig | |
time ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j${THREADS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment