Last active
July 16, 2021 01:39
-
-
Save lattice0/b98db2f439443209cff7b3753aaba9db 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
#https://forums.developer.nvidia.com/t/how-do-i-change-the-device-tree/154431/6 | |
#Install kernel deps | |
set -x | |
set -e | |
sudo apt update && sudo apt-get install -y build-essential bc git curl wget xxd kmod libssl-dev | |
#Gets the kernel | |
set -x | |
set -e | |
cd ~/ | |
wget https://developer.nvidia.com/embedded/l4t/r32_release_v5.1/r32_release_v5.1/sources/t210/public_sources.tbz2 | |
tar -jxvf public_sources.tbz2 | |
JETSON_NANO_KERNEL_SOURCE=~/Linux_for_Tegra/source/public/ | |
tar -jxvf kernel_src.tbz2 | |
# Applies the new configs to tegra_defconfig | |
cd ${JETSON_NANO_KERNEL_SOURCE}/kernel/kernel-4.9 | |
echo "CONFIG_KVM=y | |
CONFIG_VHOST_NET=m" >> arch/arm64/configs/tegra_defconfig | |
# Builds the kernel | |
JETSON_NANO_KERNEL_SOURCE=~/Linux_for_Tegra/source/public | |
TEGRA_KERNEL_OUT=$JETSON_NANO_KERNEL_SOURCE/build | |
KERNEL_MODULES_OUT=$JETSON_NANO_KERNEL_SOURCE/modules | |
cd $JETSON_NANO_KERNEL_SOURCE | |
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra tegra_defconfig | |
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra -j4 --output-sync=target zImage | |
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra -j4 --output-sync=target modules | |
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra -j4 --output-sync=target dtbs | |
make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra INSTALL_MOD_PATH=$KERNEL_MODULES_OUT modules_install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment