Jetson Nano/Development/Building the Kernel from Source: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 27: Line 27:
Download the pre-built toolchain binaries from: http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
Download the pre-built toolchain binaries from: http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz


<source lang="bash">
<syntaxhighlight lang="bash">
wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
</source>
</syntaxhighlight>


Execute the following commands to extract the toolchain:
Execute the following commands to extract the toolchain:
<source lang="bash">
<syntaxhighlight lang="bash">
mkdir $HOME/l4t-gcc
mkdir $HOME/l4t-gcc
cd $HOME/l4t-gcc
cd $HOME/l4t-gcc
tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
</source>
</syntaxhighlight>


===2. Download the kernel sources===
===2. Download the kernel sources===
Line 43: Line 43:
In a browser, navigate to: https://developer.nvidia.com/embedded/downloads. Locate and download the L4T Sources for your release. (L4T Sources 32.3.1 2019/12/17) or run the command below:
In a browser, navigate to: https://developer.nvidia.com/embedded/downloads. Locate and download the L4T Sources for your release. (L4T Sources 32.3.1 2019/12/17) or run the command below:


<source lang="bash">
<syntaxhighlight lang="bash">
wget https://developer.download.nvidia.com/embedded/L4T/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2
wget https://developer.download.nvidia.com/embedded/L4T/r32-3-1_Release_v1.0/Sources/T210/public_sources.tbz2
</source>
</syntaxhighlight>
Execute the following commands to extract the kernel:
Execute the following commands to extract the kernel:
<source lang="bash">
<syntaxhighlight lang="bash">
tar -xvf public_sources.tbz2
tar -xvf public_sources.tbz2
cd Linux_for_Tegra/source/public
cd Linux_for_Tegra/source/public
JETSON_NANO_KERNEL_SOURCE=$(pwd)
JETSON_NANO_KERNEL_SOURCE=$(pwd)
tar -xf kernel_src.tbz2
tar -xf kernel_src.tbz2
</source>
</syntaxhighlight>


===3. Compile kernel and dtb===
===3. Compile kernel and dtb===