Jump to content

Mira130 Linux Driver: Difference between revisions

Line 322: Line 322:
</source>
</source>


3.  Download the L4T Nano sources from: <br>
3.  Get the L4T Nano sources from: <br>
[https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/sources/t210/public_sources.tbz2 L4T Nano sources]
<source lang="bash">
cd $HOME/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/
./source_sync.sh -t tegra-l4t-r32.6.1
</source>


4.  Decompress the public sources following the instructions from: <br>
4.  Apply the contents provided in '''4.6_evm_mira130_v0.1.tar''' in the '''sources''' directory:<br>
[https://developer.ridgerun.com/wiki/index.php?title=Jetson_Nano/Development/Building_the_Kernel_from_Source#2._Download_the_kernel_sources Decompress kernel sources]
 
5.  Apply the patch present in the attached 4.6_evm_mira130_v0.1.tar file in sources directory:<br>
- First untar the provided tarball:
- First untar the provided tarball:
<pre>
<pre>
Line 334: Line 334:
</pre>
</pre>


- Move the decompress patches folder into your $JETSON_NANO_KERNEL_SOURCE directory, along with hardware and kernel directories.
You can then apply the patch:
- Apply the patches from the $JETSON_NANO_KERNEL_SOURCE directory as follow:
 
<pre>
<pre>
quilt push -a
quilt push -a
</pre>
</pre>


6. Make sure to enable MIRA130 driver support:
6. To compile the code follow the steps: <br>
 
<source lang="bash">
export DEVDIR=$HOME/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra
export PATCHESPATH=$HOME/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/sources/patches/
cd $DEVDIR
</source>
 
<syntaxhighlight lang=bash>
# Create the directory to store the compiled image and dtb
mkdir -p $DEVDIR/images/dtb
</syntaxhighlight>
 
<syntaxhighlight lang=bash>
export TEGRA_KERNEL_OUT=$DEVDIR/images
export ARCH=arm64
export KERNEL_DIR=$DEVDIR/sources/kernel/kernel-4.9
export CROSS_COMPILE=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
</syntaxhighlight>
 
<syntaxhighlight lang=bash>
cd $KERNEL_DIR
</syntaxhighlight>
 
<syntaxhighlight lang=bash>
make mrproper
</syntaxhighlight>
 
* Make sure to enable MIRA130 driver support:


<pre>
<pre>
make menuconfig
make O=$TEGRA_KERNEL_OUT tegra_defconfig
make O=$TEGRA_KERNEL_OUT menuconfig
</pre>
</pre>


Line 360: Line 390:
Go back by hitting the double ''Esc'' key until you get the message: ''Do you want to save your new configuration?'', select ''Yes'' and press ''Enter'
Go back by hitting the double ''Esc'' key until you get the message: ''Do you want to save your new configuration?'', select ''Yes'' and press ''Enter'


7.  To compile the code follow the steps in this link: <br>
* Compile the kernel:  
[https://developer.ridgerun.com/wiki/index.php?title=Jetson_Nano/Development/Building_the_Kernel_from_Source#3._Compile_kernel_and_dtb Compile kernel and dtb]
 
<syntaxhighlight lang=bash>
make O=$TEGRA_KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j4 zImage
</syntaxhighlight>
 
* Compile the device tree:
make O=$TEGRA_KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j4 dtbs


8. Flash the Jetson Nano:
8. Flash the Jetson Nano:


<source lang="bash">
Make sure the Jetson Nano is in recovery mode.
export DEVDIR=$HOME/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra
cd $DEVDIR
</source>


* Copy the compiled image to the kernel directory.
* Copy the compiled image to the kernel directory.
Line 381: Line 414:


* Flash the memory following the next guide:
* Flash the memory following the next guide:
[https://developer.ridgerun.com/wiki/index.php?title=Jetson_Nano/Development/Building_the_Kernel_from_Source#Flash_memory Flash Jetson Nano memory]
<syntaxhighlight lang=bash>
cd $DEVDIR
sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1
</syntaxhighlight>
 
* Reboot the board after the flashing is completed.


==Using the Driver==
==Using the Driver==
208

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.