Changes

Jump to navigation Jump to search
Line 12: Line 12:  
Development Docs:https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-321/index.html
 
Development Docs:https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-321/index.html
   −
==== Setting Up the Environment ====
+
====Setting Up the Environment====
    
*Host PC which runs Ubuntu 18.04/16.04(64-bit).  
 
*Host PC which runs Ubuntu 18.04/16.04(64-bit).  
Line 28: Line 28:     
===Firmeware Upgrade===
 
===Firmeware Upgrade===
<br />
+
 
 +
==== Prepare ====
 +
 
 +
*Cross-compiling Toolchain
 +
 
 +
Please refer to [https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fxavier_toolchain.html%23wwpID0ESHA this link] to install toolchain on your Host PC.
 +
 
 +
*L4T source code and Rootfs
 +
 
 +
You could use SDK Manager or [https://developer.nvidia.com/embedded/downloads directly download] to get source code.
 +
 
 +
*Setting Up the Environment
 +
 
 +
Assume SDK install directory is <TOPDIR>,source code is in $L4T_DIR/sources directory.
 +
 
 +
<code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448/></code>
 +
 
 +
<code>export L4T_DIR=$TOP_DIR/Linux_for_Tegra</code>
 +
 
 +
<code>export LDK_ROOTFS_DIR=$TOP_DIR/Linux_for_Tegra/rootfs</code>
 +
 
 +
<code>export ARCH=arm64</code>
 +
 
 +
<code>export CROSS_COMPILE=aarch64-linux-gnu-</code>
 +
 
 +
<code>export CROSS32CC=arm-linux-gnueabihf-gcc</code>
 +
 
 +
<code>mkdir -p $L4T_DIR/sources/kernel/out_kernel</code>
 +
 
 +
<code>export TEGRA_KERNEL_OUT=$L4T_DIR/sources/kernel/out_kernel</code>
 +
 
 +
<code>export NVIDIA_PATH=$L4T_DIR/sources/kernel/nvidia</code>
 +
 
 +
<code>export NANO_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t210/porg/kernel-dts</code>
 +
 
 +
*Build default image, prepare L4T environment
 +
 
 +
<code>cd $L4T_DIR</code>
 +
 
 +
<code>sudo ./apply_binaries.sh</code>  
 +
 
 +
*Download VEYE code for Jetson Nano
 +
 
 +
<code>cd $L4T_DIR</code>
 +
 
 +
<code>git clone https://github.com/veyeimaging/jetson_nano<nowiki/>.git</code>
 +
 
 +
<code>export RELEASE_PACK_DIR=$L4T_DIR/jetson_nano</code>
 
====Using the Prebuilt Binaries====
 
====Using the Prebuilt Binaries====
 +
=====Installing the Kernel and DTS=====
 +
<code>cd $RELEASE_PACK_DIR/binaries</code>
 +
 +
<code>tar -xzvf Image.tar.gz</code>
 +
 +
<code>sudo cp Image $L4T_DIR/kernel/ -f</code>
 +
 +
<code>sudo cp $RELEASE_PACK_DIR/binaries/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/tegra210-p3448-0000-p3449-0000-a02.dtb -f</code>
 +
 +
<code>cd $L4T_DIR</code>
 
====Flashing the Jetson Nano Development Kit====
 
====Flashing the Jetson Nano Development Kit====
 +
The steps to flash the Jetson Nano™ development kit are as follows:
 +
 +
#Ensure a jumper is connected across J48 button header to enable DC power.
 +
#Connect the micro USB cable to the Jetson Nano™ and host PC.
 +
#Set the board to recovery mode, as mentioned in below steps:
 +
 +
           a. Power OFF the board.
 +
 +
           b. Connect the jumper pin to the pin 3 and pin 4 of the J40 button header.
 +
 +
           c. Power ON the Jetson Nano™ development kit.
 +
 +
If the board is successfully changed to recovery mode, the Jetson Nano™development kit will be enumerated as an USB device to the host PC.
 +
 +
Run the following command to verify whether the board is in recovery mode.
 +
 +
<code>lsusb</code>
 +
 +
The output message appears as shown below.
 +
 +
<code>Bus 001 Device 102: ID 0955:7f21 NVidia Corp.</code>
 +
 +
4. Run the following commands to flash the Jetson Nano™ development kit from
 +
 +
your host PC.
 +
 +
<code>cd $L4T_DIR</code>
 +
 +
<code>sudo ./flash.sh jetson-nano-qspi-sd mmcblk0p1</code>
 +
 +
Note: Now, the entire micro SD on the Jetson Nano™ development kit will be erased. It will take about 10-30 minutes to complete depending on the host PC configuration.
 +
 +
5. Reboot and connect the Jetson Nano™ board to a monitor and keyboard to complete the OS configuration, once flashing is completed.
 
====Building from Source====
 
====Building from Source====
 +
=====Build kernel=====
 +
 +
*patch code
 +
 +
<code>cp $RELEASE_PACK_DIR/sources/kernel/veye327/* $NVIDIA_PATH/drivers/media/i2c/</code>
 +
 +
<code>cp $RELEASE_PACK_DIR/sources/kernel/kernel_veye327_config $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veye327_defconfig</code>
 +
 +
*build
 +
 +
<code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code>
 +
 +
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_veye327_defconfig</code>
 +
 +
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT Image -j4</code>
 +
 +
Completed Image file is $TEGRA_KERNEL_OUT/arch/arm64/boot/Image,could be used for Flashing or Upgrading.
 +
 +
Install Image for Flashing:
 +
 +
<code>sudo cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image $L4T_DIR/kernel/ -f</code>
 +
=====Build DTS=====
 +
 +
*patch code
 +
 +
<code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/* $NANO_DTS_PATH/</code>
 +
 +
<code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/porg-platforms/* $NANO_DTS_PATH/porg-platforms/</code>
 +
 +
<code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/porg-plugin-manager/* $NANO_DTS_PATH/porg-plugin-manager/</code>
 +
 +
*build
 +
 +
<code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT dtbs</code>
 +
 +
<code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/</code>
 +
 +
Could be used for Flashing or Upgrading.
 
====Upgrading Kernel Image and Supplements====
 
====Upgrading Kernel Image and Supplements====
 +
First,you should copy '''Image''' file to Jetson nano somehow. Use a U disk for example.
    +
<code>sudo cp <path to your Image dir>/Image  /boot/Image -f</code>
 
====Upgrading DTB File by Flashing from Host PC====
 
====Upgrading DTB File by Flashing from Host PC====
 +
Burning process reference 4.3, burning commands is as below:
 +
 +
<code>cd $L4T_DIR</code>
 +
 +
<code>sudo ./flash.sh -r -k DTB jetson-nano-qspi-sd mmcblk0p1</code>
    +
Power off after flashing finished.
 
===Applications and Test===
 
===Applications and Test===
 
====Video Stream Toolkits Manual====
 
====Video Stream Toolkits Manual====
 
====Video Control Toolkits Manual====
 
====Video Control Toolkits Manual====

Navigation menu