Last active
August 19, 2019 18:59
-
-
Save mklooss/4e4ca72e4045a33c4a2ff354d9c6359d 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
thanks to :) | |
https://github.com/sakaki-/gentoo-on-rpi-64bit | |
https://blog.cloudkernels.net/posts/rpi4-64bit-image/ | |
install first: | |
used system debian buster amd64 (4 cores) | |
~# apt-get install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu bison flex |
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 | |
# go in to kernel dir first | |
# https://github.com/raspberrypi/linux | |
rm -rf kernel-build | |
mkdir kernel-build | |
git pull | |
#make O=./kernel-build/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig | |
# Download from gentoo :) thanks fot sakaki :) | |
wget https://raw.githubusercontent.com/sakaki-/gentoo-on-rpi-64bit/master/configs/bcm2711_defconfig-bis -O kernel-build/.config | |
yes "" | make O=./kernel-build/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- oldconfig | |
make O=./kernel-build/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig | |
make -j4 O=./kernel-build/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- | |
export KERNEL_VERSION=`cat ./kernel-build/include/generated/utsrelease.h | sed -e 's/.*"\(.*\)".*/\1/'` | |
make -j4 O=./kernel-build/ DEPMOD=echo MODLIB=./kernel-install/lib/modules/${KERNEL_VERSION} INSTALL_FW_PATH=./kernel-install/lib/firmware modules_install | |
make -j4 O=./kernel-build/ INSTALL_HDR_PATH=./kernel-install/usr/src/linux-headers-${KERNEL_VERSION}/ DEPMOD=echo MODLIB=./kernel-install/lib/modules/${KERNEL_VERSION} INSTALL_FW_PATH=./kernel-install/lib/firmware headers_install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment