Jump to content

Compiling Jetson TX2 source code: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 215: Line 215:
'''3.''' Go to Linux_for_Tegra_64_tx2 directory
'''3.''' Go to Linux_for_Tegra_64_tx2 directory
<pre>
<pre>
cd $JETPACKDIR/64_TX1/Linux_for_Tegra_64_tx2/
cd $JETPACKDIR/64_TX2/Linux_for_Tegra_64_tx2/
</pre>
</pre>


Line 277: Line 277:
</pre>
</pre>


'''10.''' Unmount the device and Put the SD into the tx1 board, and boot the board.
'''10.''' Unmount the device and Put the SD into the tx2 board, and boot the board.
<pre>
<pre>
umount /media/$USER/rootfs  
umount /media/$USER/rootfs  
Line 286: Line 286:
== DTB ==
== DTB ==


Looking into the file $JETPACKDIR/TX1/Linux_for_Tegra_tx1/jetson-tx2.conf the dtb used by jetson x1 is: '''tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb'''
Looking into the file $JETPACKDIR/64_TX2/Linux_for_Tegra_tx2/jetson-tx2.conf the dtb used by jetson x1 is: '''tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb'''


<pre>
<pre>
Line 358: Line 358:
== Build u-boot ==
== Build u-boot ==


1. Backup original uboot files. You see which platform you are using checking the file in $/TX1/Linux_for_Tegra_tx1/jetson-tx1.conf, it says:
1. Backup original uboot files. You see which platform you are using checking the file in $/64_TX2/Linux_for_Tegra_tx2/jetson-tx2.conf, it says:


<pre>
<pre>
Line 368: Line 368:
<pre>
<pre>
mkdir $JETPACK/images/packages-backup/bootloader/
mkdir $JETPACK/images/packages-backup/bootloader/
cp -rf $JETPACK/TX1/Linux_for_Tegra_tx1/bootloader/t210ref/p2371-2180-devkit $JETPACK/images/packages-backup/bootloader/
cp -rf $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180-devkit $JETPACK/images/packages-backup/bootloader/
cd $JETPACK/TX1/Linux_for_Tegra_tx1/bootloader/
cd $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/
cp nvtboot.bin nvtboot_cpu.bin u-boot-dtb.bin bpmp.bin warmboot.bin tos.img tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $JETPACK/images/packages-backup/bootloader/
cp nvtboot.bin nvtboot_cpu.bin u-boot-dtb.bin bpmp.bin warmboot.bin tos.img tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $JETPACK/images/packages-backup/bootloader/
cp $JETPACK/TX1/Linux_for_Tegra_tx1/bootloader/t210ref/p2371-2180 $JETPACK/images/packages-backup/bootloader/
cp $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180 $JETPACK/images/packages-backup/bootloader/
</pre>
</pre>


Line 379: Line 379:


<pre>
<pre>
cd $JETPACK/TX1/Linux_for_Tegra_tx1/sources/u-boot_source/
cd $JETPACK/64_TX2/Linux_for_Tegra_tx2/sources/u-boot_source/
PATH=$JETPACK/images:$PATH
PATH=$JETPACK/images:$PATH
export CROSS_COMPILE=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export CROSS_COMPILE=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
Line 396: Line 396:
<pre>
<pre>
mkdir $JETPACK/images/bootloader
mkdir $JETPACK/images/bootloader
cp $JETPACK/TX1/Linux_for_Tegra_tx1/sources/u-boot_source/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/images/bootloader
cp $JETPACK/64_TX2/Linux_for_Tegra_tx2/sources/u-boot_source/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/images/bootloader
</pre>
</pre>


Line 411: Line 411:


<pre>
<pre>
cp  $JETPACK/images/bootloader/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/TX1/Linux_for_Tegra_tx1/bootloader/t210ref/p2371-2180/
cp  $JETPACK/images/bootloader/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180/
</pre>
</pre>


Line 494: Line 494:
= Flashing the board =
= Flashing the board =


Nvidia provides several scripts to help to generate the images and to flash the resulting images. Including if you are going to install uboot or fastboot. First the board needs to be in recovery mode and then the main script to flash it is $JETPACK/64_TX2/Linux_for_Tegra_tx1/flash.sh. What this script will do is to install or flash the image in the desired destination. It is important that the script is controlled by variables defined in the DTB file.
Nvidia provides several scripts to help to generate the images and to flash the resulting images. Including if you are going to install uboot or fastboot. First the board needs to be in recovery mode and then the main script to flash it is $JETPACK/64_TX2/Linux_for_Tegra_tx2/flash.sh. What this script will do is to install or flash the image in the desired destination. It is important that the script is controlled by variables defined in the DTB file.


<pre>
<pre>
Line 561: Line 561:
To flash the filesystem in the emmc you need to run:
To flash the filesystem in the emmc you need to run:
<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx2 mmcblk0p1
sudo ./flash.sh jetson-tx2 mmcblk0p1
</pre>
</pre>
Line 583: Line 583:
mkdir $JETPACK/images/fs
mkdir $JETPACK/images/fs
sudo mount /dev/sdb1 $JETPACK/images/fs  
sudo mount /dev/sdb1 $JETPACK/images/fs  
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/rootfs/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/
sudo cp -a * $JETPACK/images/fs  && sync
sudo cp -a * $JETPACK/images/fs  && sync
</pre>
</pre>
Line 592: Line 592:
5) Finally connect the USB drive to the Jetson board put the Jetson on recovery mode, flash the board to look for the filesystem on the USB port:
5) Finally connect the USB drive to the Jetson board put the Jetson on recovery mode, flash the board to look for the filesystem on the USB port:
<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx1 sda1 #it can be other mount point
sudo ./flash.sh jetson-tx2 sda1 #it can be other mount point
</pre>
</pre>


Line 600: Line 600:
Similar to USB but you need to replace the extlinux.conf so before copying the filesystem into the SD card run:
Similar to USB but you need to replace the extlinux.conf so before copying the filesystem into the SD card run:
<pre>
<pre>
sudo cp $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/rootfs/boot/extlinux/extlinux.conf
sudo cp $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/boot/extlinux/extlinux.conf
</pre>
</pre>


Line 606: Line 606:


<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx1 mmcblk1p1  
sudo ./flash.sh jetson-tx2 mmcblk1p1  
</pre>
</pre>


Line 613: Line 613:
1) First you need to set up your NFS server using [https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM8168_EVM#Setting_up_an_NFS_server these instructions].
1) First you need to set up your NFS server using [https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM8168_EVM#Setting_up_an_NFS_server these instructions].


2) Open file in $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/rootfs/etc/network/interfaces and add
2) Open file in $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/etc/network/interfaces and add
<pre>
<pre>
auto eth0
auto eth0
Line 622: Line 622:


<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
MY_IPADDRESS=192.169.0.3
MY_IPADDRESS=192.169.0.3
sudo ./flash.sh -N $MY_IPADDRESS:$JETPACK/64_TX1/Linux_for_Tegra_64_tx1/rootfs jetson-tx1 eth0
sudo ./flash.sh -N $MY_IPADDRESS:$JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs jetson-tx2 eth0
</pre>
</pre>


Line 632: Line 632:


<pre>
<pre>
sudo cp $JETPACK/images/zImage $JETPACK/images/Image $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/rootfs/boot/
sudo cp $JETPACK/images/zImage $JETPACK/images/Image $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/boot/
</pre>
</pre>


Line 638: Line 638:


<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./apply_binaries.sh  
sudo ./apply_binaries.sh  
</pre>
</pre>
Line 649: Line 649:


<pre>
<pre>
cd $JETPACK/64_TX1/Linux_for_Tegra_64_tx1/
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh -k EBT jetson-tx1 mmcblk1p1
sudo ./flash.sh -k EBT jetson-tx2 mmcblk1p1
</pre>
</pre>


Line 660: Line 660:
J21 Pin 8 (UART 1 TXD) -> Cable RXD
J21 Pin 8 (UART 1 TXD) -> Cable RXD
J21 Pin 10 (UART 1 RXD) -> Cable TXD
J21 Pin 10 (UART 1 RXD) -> Cable TXD
TX1 J21 Pin 9 (GND) -> Cable GND
TX2 J21 Pin 9 (GND) -> Cable GND
</pre>
</pre>


214

edits

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