23,776
edits
mNo edit summary |
mNo edit summary |
||
Line 16: | Line 16: | ||
'''Platform''' | '''Platform''' | ||
< | <syntaxhighlight lang="bash"> | ||
Baseboard: P2371 | Baseboard: P2371 | ||
Jetson module: P2180 | Jetson module: P2180 | ||
Soc: tegra21x and tegra18x | Soc: tegra21x and tegra18x | ||
</ | </syntaxhighlight> | ||
It is assumed that the reader already read [[Tegra_X1#Tegra_X1 | the brief Jetson TX1 introduction]] | It is assumed that the reader already read [[Tegra_X1#Tegra_X1 | the brief Jetson TX1 introduction]] | ||
Line 37: | Line 37: | ||
2. Install the toolchain | 2. Install the toolchain | ||
< | <syntaxhighlight lang="bash"> | ||
sudo mkdir /opt/l4t-gcc-toolchain-64-bit-28-2.1 | sudo mkdir /opt/l4t-gcc-toolchain-64-bit-28-2.1 | ||
sudo chown $USER:$USER /opt/l4t-gcc-toolchain-64-bit-28-2.1 | sudo chown $USER:$USER /opt/l4t-gcc-toolchain-64-bit-28-2.1 | ||
cd /opt/l4t-gcc-toolchain-64-bit-28-2.1 | cd /opt/l4t-gcc-toolchain-64-bit-28-2.1 | ||
</ | </syntaxhighlight> | ||
If you already downloaded the toolchain in step 1: | If you already downloaded the toolchain in step 1: | ||
< | <syntaxhighlight lang="bash"> | ||
mv ~/Downloads/gcc-4.8.5-aarch64.tgz ./ | mv ~/Downloads/gcc-4.8.5-aarch64.tgz ./ | ||
</ | </syntaxhighlight> | ||
If not: | If not: | ||
< | <syntaxhighlight lang="bash"> | ||
wget https://developer.nvidia.com/embedded/dlc/l4t-gcc-toolchain-64-bit-28-2-ga | wget https://developer.nvidia.com/embedded/dlc/l4t-gcc-toolchain-64-bit-28-2-ga | ||
mv l4t-gcc-toolchain-64-bit-28-2-ga gcc-4.8.5-aarch64.tgz | mv l4t-gcc-toolchain-64-bit-28-2-ga gcc-4.8.5-aarch64.tgz | ||
</ | </syntaxhighlight> | ||
Finally decompress the toolchain | Finally decompress the toolchain | ||
< | <syntaxhighlight lang="bash"> | ||
tar -xvf gcc-4.8.5-aarch64.tgz | tar -xvf gcc-4.8.5-aarch64.tgz | ||
</ | </syntaxhighlight> | ||
== Getting JetPack == | == Getting JetPack == | ||
Line 69: | Line 69: | ||
'''2.''' Move binary into installation directory, we recommend '''/home/$USER/JetPack-L4T-3.2.1''' | '''2.''' Move binary into installation directory, we recommend '''/home/$USER/JetPack-L4T-3.2.1''' | ||
< | <syntaxhighlight lang="bash"> | ||
export INSTALLDIR=/home/$USER/JetPack-L4T-3.2.1 | export INSTALLDIR=/home/$USER/JetPack-L4T-3.2.1 | ||
mkdir -p $INSTALLDIR | mkdir -p $INSTALLDIR | ||
mv JetPack-L4T-3.2.1-linux-x64_b23.run $INSTALLDIR | mv JetPack-L4T-3.2.1-linux-x64_b23.run $INSTALLDIR | ||
</ | </syntaxhighlight> | ||
'''3.''' Set the Jetpack binary as executable and set correct permissions. | '''3.''' Set the Jetpack binary as executable and set correct permissions. | ||
< | <syntaxhighlight lang="bash"> | ||
cd $INSTALLDIR | cd $INSTALLDIR | ||
chmod +x JetPack-L4T-3.2.1-linux-x64_b23.run | chmod +x JetPack-L4T-3.2.1-linux-x64_b23.run | ||
</ | </syntaxhighlight> | ||
'''4.''' Install Jetpack. | '''4.''' Install Jetpack. | ||
< | <syntaxhighlight lang="bash"> | ||
./JetPack-L4T-3.2.1-linux-x64_b23.run | ./JetPack-L4T-3.2.1-linux-x64_b23.run | ||
</ | </syntaxhighlight> | ||
'''5.''' Follow the instructions. You'll be prompted for a devkit to build for (TX1, TX2, TX2i) just select the one you want. | '''5.''' Follow the instructions. You'll be prompted for a devkit to build for (TX1, TX2, TX2i) just select the one you want. | ||
Line 96: | Line 96: | ||
* '''For TX1''' | * '''For TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
export DEVDIR=$INSTALLDIR/64_TX1/Linux_for_Tegra | export DEVDIR=$INSTALLDIR/64_TX1/Linux_for_Tegra | ||
</ | </syntaxhighlight> | ||
* '''For TX2''' | * '''For TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
export DEVDIR=$INSTALLDIR/64_TX2/Linux_for_Tegra | export DEVDIR=$INSTALLDIR/64_TX2/Linux_for_Tegra | ||
</ | </syntaxhighlight> | ||
Then Open the documentation: | Then Open the documentation: | ||
< | <syntaxhighlight lang="bash"> | ||
firefox $DEVDIR/../../Start_L4T_Docs.html & | firefox $DEVDIR/../../Start_L4T_Docs.html & | ||
</ | </syntaxhighlight> | ||
====Download the kernel source code==== | ====Download the kernel source code==== | ||
Line 120: | Line 120: | ||
Untar the sources and copy kernel_src.tbz2 to $HOME/JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources | Untar the sources and copy kernel_src.tbz2 to $HOME/JetPack-L4T-3.2.1/64_TX2/Linux_for_Tegra/sources | ||
< | <syntaxhighlight lang="bash"> | ||
tar -xf public_sources.tbz2 | tar -xf public_sources.tbz2 | ||
cd public_release/ | cd public_release/ | ||
Line 126: | Line 126: | ||
cd $DEVDIR/sources | cd $DEVDIR/sources | ||
tar -xf kernel_src.tbz2 | tar -xf kernel_src.tbz2 | ||
</ | </syntaxhighlight> | ||
'''1.2 Option 2 ''' | '''1.2 Option 2 ''' | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
./source_sync.sh | ./source_sync.sh | ||
</ | </syntaxhighlight> | ||
This will download the bootloader and kernel. | This will download the bootloader and kernel. | ||
Line 151: | Line 151: | ||
2) Configure environment: | 2) Configure environment: | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir -p $DEVDIR/images/modules | mkdir -p $DEVDIR/images/modules | ||
mkdir -p $DEVDIR/images/packages | mkdir -p $DEVDIR/images/packages | ||
Line 159: | Line 159: | ||
export TEGRA_KERNEL_OUT=$DEVDIR/images | export TEGRA_KERNEL_OUT=$DEVDIR/images | ||
export ARCH=arm64 | export ARCH=arm64 | ||
</ | </syntaxhighlight> | ||
3) Clean your kernel and configuration | 3) Clean your kernel and configuration | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/sources/kernel/kernel-4.4 | cd $DEVDIR/sources/kernel/kernel-4.4 | ||
make mrproper | make mrproper | ||
</ | </syntaxhighlight> | ||
4) Configure your kernel: | 4) Configure your kernel: | ||
Line 172: | Line 172: | ||
* '''For TX1''' | * '''For TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
make O=$TEGRA_KERNEL_OUT tegra21_defconfig | make O=$TEGRA_KERNEL_OUT tegra21_defconfig | ||
make O=$TEGRA_KERNEL_OUT menuconfig | make O=$TEGRA_KERNEL_OUT menuconfig | ||
</ | </syntaxhighlight> | ||
* '''For TX2''' | * '''For TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
make O=$TEGRA_KERNEL_OUT tegra18_defconfig | make O=$TEGRA_KERNEL_OUT tegra18_defconfig | ||
make O=$TEGRA_KERNEL_OUT menuconfig | make O=$TEGRA_KERNEL_OUT menuconfig | ||
</ | </syntaxhighlight> | ||
'''NOTE:''' You'll need ncurses for this command to work. If you have any issue just install the following packages. | '''NOTE:''' You'll need ncurses for this command to work. If you have any issue just install the following packages. | ||
< | <syntaxhighlight lang="bash"> | ||
sudo apt-get install libncurses5 libncurses5-dev | sudo apt-get install libncurses5 libncurses5-dev | ||
</ | </syntaxhighlight> | ||
5) Compile kernel, device tree and modules | 5) Compile kernel, device tree and modules | ||
< | <syntaxhighlight lang="bash"> | ||
make O=$TEGRA_KERNEL_OUT zImage | make O=$TEGRA_KERNEL_OUT zImage | ||
make O=$TEGRA_KERNEL_OUT dtbs | make O=$TEGRA_KERNEL_OUT dtbs | ||
make O=$TEGRA_KERNEL_OUT modules | make O=$TEGRA_KERNEL_OUT modules | ||
make O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$KERNEL_MODULES_OUT | make O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$KERNEL_MODULES_OUT | ||
</ | </syntaxhighlight> | ||
After this the kernel image will be under: | After this the kernel image will be under: | ||
< | <syntaxhighlight lang="bash"> | ||
$DEVDIR/images/arch/arm64/boot/Image | $DEVDIR/images/arch/arm64/boot/Image | ||
</ | </syntaxhighlight> | ||
And the devicetree under: | And the devicetree under: | ||
< | <syntaxhighlight lang="bash"> | ||
$DEVDIR/images/arch/arm64/boot/dts/*.dtb | $DEVDIR/images/arch/arm64/boot/dts/*.dtb | ||
</ | </syntaxhighlight> | ||
6) Create kernel_supplements.tbz2 with kernel modules, this package is needed by Jetpack | 6) Create kernel_supplements.tbz2 with kernel modules, this package is needed by Jetpack | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/images/modules/lib/modules/ | cd $DEVDIR/images/modules/lib/modules/ | ||
ls . | ls . | ||
</ | </syntaxhighlight> | ||
define a variable with the name of the modules directory | define a variable with the name of the modules directory | ||
< | <syntaxhighlight lang="bash"> | ||
export KERNEL_MODULES_NAME=4.4.38+ | export KERNEL_MODULES_NAME=4.4.38+ | ||
</ | </syntaxhighlight> | ||
fix the symbolic links on the kernel modules directory | fix the symbolic links on the kernel modules directory | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/images/modules/lib/modules/$KERNEL_MODULES_NAME | cd $DEVDIR/images/modules/lib/modules/$KERNEL_MODULES_NAME | ||
rm build source | rm build source | ||
</ | </syntaxhighlight> | ||
create tarball | create tarball | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/images/modules/ | cd $DEVDIR/images/modules/ | ||
tar -cjf kernel_supplements.tbz2 * | tar -cjf kernel_supplements.tbz2 * | ||
mv kernel_supplements.tbz2 $DEVDIR/images/packages | mv kernel_supplements.tbz2 $DEVDIR/images/packages | ||
</ | </syntaxhighlight> | ||
7) Besides creating the modules and the kernel image you need to create again your kernel_headers.tbz2 file (needed by Jetpack). By default when you patch the kernel code and you don't check your changes in the kernel will add a -dirty suffix to the release version (check ls $DEVDIR/images/modules/lib/modules/ for example). For this specific reason you need to generate your headers tarball again changing it the release version. | 7) Besides creating the modules and the kernel image you need to create again your kernel_headers.tbz2 file (needed by Jetpack). By default when you patch the kernel code and you don't check your changes in the kernel will add a -dirty suffix to the release version (check ls $DEVDIR/images/modules/lib/modules/ for example). For this specific reason you need to generate your headers tarball again changing it the release version. | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/kernel | cd $DEVDIR/kernel | ||
tar -xf kernel_headers.tbz2 | tar -xf kernel_headers.tbz2 | ||
</ | </syntaxhighlight> | ||
Find the name of the headers file folder (in my case '''linux-headers-4.4.38-tegra'''): | Find the name of the headers file folder (in my case '''linux-headers-4.4.38-tegra'''): | ||
< | <syntaxhighlight lang="bash"> | ||
ls | grep linux-headers | ls | grep linux-headers | ||
linux-headers-4.4.38-tegra | linux-headers-4.4.38-tegra | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
export KERNEL_HEADERS_NAME=linux-headers-4.4.38-tegra | export KERNEL_HEADERS_NAME=linux-headers-4.4.38-tegra | ||
</ | </syntaxhighlight> | ||
And rename the folder: | And rename the folder: | ||
< | <syntaxhighlight lang="bash"> | ||
mv $KERNEL_HEADERS_NAME linux-headers-$KERNEL_MODULES_NAME | mv $KERNEL_HEADERS_NAME linux-headers-$KERNEL_MODULES_NAME | ||
tar -cjf kernel_headers_custom.tbz2 linux-headers-$KERNEL_MODULES_NAME | tar -cjf kernel_headers_custom.tbz2 linux-headers-$KERNEL_MODULES_NAME | ||
mv kernel_headers_custom.tbz2 $DEVDIR/images/packages | mv kernel_headers_custom.tbz2 $DEVDIR/images/packages | ||
rm -rf linux-headers-$KERNEL_MODULES_NAME | rm -rf linux-headers-$KERNEL_MODULES_NAME | ||
</ | </syntaxhighlight> | ||
8) Create a backup of the images and packages included in Jetpack | 8) Create a backup of the images and packages included in Jetpack | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir -p $DEVDIR/images/packages-backup | mkdir -p $DEVDIR/images/packages-backup | ||
cp -rf $DEVDIR/kernel/* $DEVDIR/images/packages-backup | cp -rf $DEVDIR/kernel/* $DEVDIR/images/packages-backup | ||
</ | </syntaxhighlight> | ||
Line 275: | Line 275: | ||
*'''TX1''' | *'''TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
cp $DEVDIR/images/arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $DEVDIR/kernel/dtb | cp $DEVDIR/images/arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $DEVDIR/kernel/dtb | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
cp $DEVDIR/images/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb $DEVDIR/kernel/dtb | cp $DEVDIR/images/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb $DEVDIR/kernel/dtb | ||
</ | </syntaxhighlight> | ||
10) Finally overwrite the default images with your own images to install and boot them using jetpack | 10) Finally overwrite the default images with your own images to install and boot them using jetpack | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/images | cd $DEVDIR/images | ||
cp -rf arch/arm64/boot/Image arch/arm64/boot/zImage packages/kernel_supplements.tbz2 $DEVDIR/kernel/ | cp -rf arch/arm64/boot/Image arch/arm64/boot/zImage packages/kernel_supplements.tbz2 $DEVDIR/kernel/ | ||
cp -rf packages/kernel_headers_custom.tbz2 $DEVDIR/kernel/kernel_headers.tbz2 | cp -rf packages/kernel_headers_custom.tbz2 $DEVDIR/kernel/kernel_headers.tbz2 | ||
</ | </syntaxhighlight> | ||
11) Run the applybinaries script to generate the image to flash | 11) Run the applybinaries script to generate the image to flash | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./apply_binaries.sh | sudo ./apply_binaries.sh | ||
</ | </syntaxhighlight> | ||
As an important note, kernel will be located not in a partition but in /boot on the filesystem this make easier a kernel update. | As an important note, kernel will be located not in a partition but in /boot on the filesystem this make easier a kernel update. | ||
Line 312: | Line 312: | ||
* Hold the ''recovery'' button and then press the ''reset'' button. | * Hold the ''recovery'' button and then press the ''reset'' button. | ||
* The Jetson board should be connected to the host computer via USB, so you can check if it is on ''reset/recovery'' mode by typing: | * The Jetson board should be connected to the host computer via USB, so you can check if it is on ''reset/recovery'' mode by typing: | ||
< | <syntaxhighlight lang="bash"> | ||
lsusb | lsusb | ||
</ | </syntaxhighlight> | ||
You should see "NVidia Corp." as part of the returned message. | You should see "NVidia Corp." as part of the returned message. | ||
Line 329: | Line 329: | ||
If you are using microSD and eMMC: | If you are using microSD and eMMC: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk1p1 | sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
And if you are using a only the eMMC: | And if you are using a only the eMMC: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1 | sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
=== Installing DTB === | === Installing DTB === | ||
Line 350: | Line 350: | ||
Replace the dtb in '''$DEVDIR/kernel/dtb''' with yours (you might want to make a backup of the original DTB, just in case): | Replace the dtb in '''$DEVDIR/kernel/dtb''' with yours (you might want to make a backup of the original DTB, just in case): | ||
< | <syntaxhighlight lang="bash"> | ||
cp $DEVDIR/images/arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $DEVDIR/kernel/dtb | cp $DEVDIR/images/arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $DEVDIR/kernel/dtb | ||
</ | </syntaxhighlight> | ||
Put the board into recovery mode and flash the DTB: | Put the board into recovery mode and flash the DTB: | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR | cd $DEVDIR | ||
sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk1p1 | sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
Line 365: | Line 365: | ||
Replace the dtb in '''$DEVDIR/kernel/dtb''' with yours (you might want to make a backup of the original DTB, just in case): | Replace the dtb in '''$DEVDIR/kernel/dtb''' with yours (you might want to make a backup of the original DTB, just in case): | ||
< | <syntaxhighlight lang="bash"> | ||
cp $DEVDIR/images/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb $DEVDIR/kernel/dtb | cp $DEVDIR/images/arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb $DEVDIR/kernel/dtb | ||
</ | </syntaxhighlight> | ||
Put the board into recovery mode and flash the DTB: | Put the board into recovery mode and flash the DTB: | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR | cd $DEVDIR | ||
sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk1p1 | sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
'''NOTE:''' Use mmcblk1p1 for SDcard and mmcblk0p1 for emmc. | '''NOTE:''' Use mmcblk1p1 for SDcard and mmcblk0p1 for emmc. | ||
Line 383: | Line 383: | ||
1. To generate the signed/encrypted dtb file follow these steps (tested JP 4.2 TX2): | 1. To generate the signed/encrypted dtb file follow these steps (tested JP 4.2 TX2): | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR | cd $DEVDIR | ||
sudo ./flash.sh --no-flash -r -k kernel-dtb jetson-tx2 mmcblk0p1 | sudo ./flash.sh --no-flash -r -k kernel-dtb jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
The above command will generate the following encrypted dtb file: | The above command will generate the following encrypted dtb file: | ||
< | <syntaxhighlight lang="bash"> | ||
$DEVDIR/bootloader/tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt | $DEVDIR/bootloader/tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt | ||
</ | </syntaxhighlight> | ||
2. Check the partition labels of your Jetson device: | 2. Check the partition labels of your Jetson device: | ||
< | <syntaxhighlight lang="bash"> | ||
nvidia@nvidia-desktop:~$ ls -al /dev/disk/by-partlabel | nvidia@nvidia-desktop:~$ ls -al /dev/disk/by-partlabel | ||
total 0 | total 0 | ||
Line 430: | Line 430: | ||
lrwxrwxrwx 1 root root 16 jun 26 11:42 SOS_b -> ../../mmcblk0p25 | lrwxrwxrwx 1 root root 16 jun 26 11:42 SOS_b -> ../../mmcblk0p25 | ||
lrwxrwxrwx 1 root root 16 jun 26 11:42 UDA -> ../../mmcblk0p31 | lrwxrwxrwx 1 root root 16 jun 26 11:42 UDA -> ../../mmcblk0p31 | ||
</ | </syntaxhighlight> | ||
The partition of interest is the following: | The partition of interest is the following: | ||
< | <syntaxhighlight lang="bash"> | ||
kernel-dtb -> ../../mmcblk0p28 | kernel-dtb -> ../../mmcblk0p28 | ||
</ | </syntaxhighlight> | ||
3. Flash the encrypted dtb file into the kernel-dtb Jetson device partition: | 3. Flash the encrypted dtb file into the kernel-dtb Jetson device partition: | ||
Transfer the encrypted dtb file to your jetson device. | Transfer the encrypted dtb file to your jetson device. | ||
< | <syntaxhighlight lang="bash"> | ||
scp $DEVDIR/bootloader/tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt nvidia@10.251.101.96: | scp $DEVDIR/bootloader/tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt nvidia@10.251.101.96: | ||
</ | </syntaxhighlight> | ||
Overwrite dtb partition, and perform warm-reboot to take effect: | Overwrite dtb partition, and perform warm-reboot to take effect: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo dd if=tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt of=/dev/mmcblk0p28 bs=1M | sudo dd if=tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt of=/dev/mmcblk0p28 bs=1M | ||
sudo reboot | sudo reboot | ||
</ | </syntaxhighlight> | ||
== Bootloader == | == Bootloader == | ||
Line 465: | Line 465: | ||
U-boot requires the Device Tree Compiler (dtc) which is used to compile device tree files contained in the U-Boot source tree. One version is included inside of the kernel. However, that binary is too old according to u-boot when trying to use that one | U-boot requires the Device Tree Compiler (dtc) which is used to compile device tree files contained in the U-Boot source tree. One version is included inside of the kernel. However, that binary is too old according to u-boot when trying to use that one | ||
< | <syntaxhighlight lang="bash"> | ||
*** Your dtc is too old, please upgrade to dtc 1.4 or newer | *** Your dtc is too old, please upgrade to dtc 1.4 or newer | ||
$DEVDIR/images/dtc -v | $DEVDIR/images/dtc -v | ||
Version: DTC 1.2.0-g37c0b6a0 | Version: DTC 1.2.0-g37c0b6a0 | ||
</ | </syntaxhighlight> | ||
In order to build it please run: | In order to build it please run: | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/sources | cd $DEVDIR/sources | ||
git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git | git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git | ||
Line 479: | Line 479: | ||
make | make | ||
cp dtc $DEVDIR/images/ | cp dtc $DEVDIR/images/ | ||
</ | </syntaxhighlight> | ||
=== Build u-boot === | === Build u-boot === | ||
Line 485: | Line 485: | ||
1. Backup original uboot files. You see which platform you are using checking the file in $DEVDIR/jetson-tx1.conf, it says: | 1. Backup original uboot files. You see which platform you are using checking the file in $DEVDIR/jetson-tx1.conf, it says: | ||
< | <syntaxhighlight lang="bash"> | ||
SYSBOOTFILE=p2371-2180-devkit/extlinux.conf; | SYSBOOTFILE=p2371-2180-devkit/extlinux.conf; | ||
</ | </syntaxhighlight> | ||
copy the files to the packages-backup directory | copy the files to the packages-backup directory | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir $DEVDIR/images/packages-backup/bootloader/ | mkdir $DEVDIR/images/packages-backup/bootloader/ | ||
cp -rf $DEVDIR/bootloader/t210ref/p2371-2180-devkit $DEVDIR/images/packages-backup/bootloader/ | cp -rf $DEVDIR/bootloader/t210ref/p2371-2180-devkit $DEVDIR/images/packages-backup/bootloader/ | ||
Line 497: | Line 497: | ||
cp nvtboot.bin nvtboot_cpu.bin u-boot-dtb.bin bpmp.bin warmboot.bin tos.img tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $DEVDIR/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 $DEVDIR/images/packages-backup/bootloader/ | ||
cp $DEVDIR/bootloader/t210ref/p2371-2180 $DEVDIR/images/packages-backup/bootloader/ | cp $DEVDIR/bootloader/t210ref/p2371-2180 $DEVDIR/images/packages-backup/bootloader/ | ||
</ | </syntaxhighlight> | ||
Check that all these components are flashed in one partition according to [[Jetpack_output_when_flashing_Tegra_X1 | Jetpack output when flashing Tegra X1]]. The description of each of these components in on the [http://http.download.nvidia.com/tegra-public-appnotes/t210-nvtboot-flow.html t210-nvtboot-flow] and [http://http.download.nvidia.com/tegra-public-appnotes/tegra-boot-flow.html tegra-boot-flow] pages. | Check that all these components are flashed in one partition according to [[Jetpack_output_when_flashing_Tegra_X1 | Jetpack output when flashing Tegra X1]]. The description of each of these components in on the [http://http.download.nvidia.com/tegra-public-appnotes/t210-nvtboot-flow.html t210-nvtboot-flow] and [http://http.download.nvidia.com/tegra-public-appnotes/tegra-boot-flow.html tegra-boot-flow] pages. | ||
Line 503: | Line 503: | ||
2. Go to uboot and set environment variables. You need to export the images directory path in order to allow u-boot find the DTC | 2. Go to uboot and set environment variables. You need to export the images directory path in order to allow u-boot find the DTC | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/sources/u-boot/ | cd $DEVDIR/sources/u-boot/ | ||
PATH=$DEVDIR/images:$PATH | PATH=$DEVDIR/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- | ||
export ARCH=arm64 | export ARCH=arm64 | ||
</ | </syntaxhighlight> | ||
3. Clean and compile | 3. Clean and compile | ||
< | <syntaxhighlight lang="bash"> | ||
make distclean | make distclean | ||
make p2371-2180_defconfig | make p2371-2180_defconfig | ||
make | make | ||
</ | </syntaxhighlight> | ||
4. Save your new binaries | 4. Save your new binaries | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir $DEVDIR/images/bootloader | mkdir $DEVDIR/images/bootloader | ||
cp $DEVDIR/sources/u-boot/u-boot{,.bin,.dtb,-dtb.bin} $DEVDIR/images/bootloader | cp $DEVDIR/sources/u-boot/u-boot{,.bin,.dtb,-dtb.bin} $DEVDIR/images/bootloader | ||
</ | </syntaxhighlight> | ||
Note: L4T U-Boot does not use the kernel partition. The kernel is installed into the filesystem alongside the boot configuration file in /boot. Aside from this difference, U-Boot has the same internal eMMC partition layout as that used by cboot. | Note: L4T U-Boot does not use the kernel partition. The kernel is installed into the filesystem alongside the boot configuration file in /boot. Aside from this difference, U-Boot has the same internal eMMC partition layout as that used by cboot. | ||
Line 528: | Line 528: | ||
5. Now, copy your u-boot binaries to the directory used by Jetpack to look for them. As you can see in the [[Compiling_Tegra_X1_source_code#DTB | DTB]] it will look for them in | 5. Now, copy your u-boot binaries to the directory used by Jetpack to look for them. As you can see in the [[Compiling_Tegra_X1_source_code#DTB | DTB]] it will look for them in | ||
< | <syntaxhighlight lang="bash"> | ||
target_board="t210ref"; | target_board="t210ref"; | ||
BOOTLOADER="bootloader/${target_board}/p2371-2180/u-boot-dtb.bin"; | BOOTLOADER="bootloader/${target_board}/p2371-2180/u-boot-dtb.bin"; | ||
</ | </syntaxhighlight> | ||
To copy the files run | To copy the files run | ||
< | <syntaxhighlight lang="bash"> | ||
cp $DEVDIR/images/bootloader/u-boot{,.bin,.dtb,-dtb.bin} $DEVDIR/bootloader/t210ref/p2371-2180/ | cp $DEVDIR/images/bootloader/u-boot{,.bin,.dtb,-dtb.bin} $DEVDIR/bootloader/t210ref/p2371-2180/ | ||
</ | </syntaxhighlight> | ||
6. Now run jetpack or follow the steps below to use flash.sh and let it install the new binaries as we did with the kernel. You can check the serial console output to see that u-boot has a newer date | 6. Now run jetpack or follow the steps below to use flash.sh and let it install the new binaries as we did with the kernel. You can check the serial console output to see that u-boot has a newer date | ||
< | <syntaxhighlight lang="bash"> | ||
U-Boot 2015.07-rc2 (Apr 28 2016 - 19:24:09 -0600) | U-Boot 2015.07-rc2 (Apr 28 2016 - 19:24:09 -0600) | ||
</ | </syntaxhighlight> | ||
If you are attached to the serial port while flashing you should see the [[Jetson_TX1_serial_port_output | serial port output log while flashing]] | If you are attached to the serial port while flashing you should see the [[Jetson_TX1_serial_port_output | serial port output log while flashing]] | ||
Line 556: | Line 556: | ||
It looks for an extlinux.conf configuration file in the following directory of the bootable device: | It looks for an extlinux.conf configuration file in the following directory of the bootable device: | ||
< | <syntaxhighlight lang="bash"> | ||
<rootfs>/boot/extlinux | <rootfs>/boot/extlinux | ||
</ | </syntaxhighlight> | ||
Upon finding the extlinux.conf file, U-Boot does the following. | Upon finding the extlinux.conf file, U-Boot does the following. | ||
Line 578: | Line 578: | ||
Extract the sample file system to the rootfs directory with this command: | Extract the sample file system to the rootfs directory with this command: | ||
<syntaxhighlight lang="bash"> | |||
$ sudo tar jxpf ../../Tegra-Linux-Sample-Root-Filesystem_<release_type>.tbz2 | |||
</syntaxhighlight> | |||
Run the apply_binaries.sh script to copy the NVIDIA user space libraries into the target file system: | Run the apply_binaries.sh script to copy the NVIDIA user space libraries into the target file system: | ||
<syntaxhighlight lang="bash"> | |||
$ cd .. | |||
$ sudo ./apply_binaries.sh | |||
</syntaxhighlight> | |||
If you are using a different rootfs, or if you have already configured your rootfs, apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system. | If you are using a different rootfs, or if you have already configured your rootfs, apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system. | ||
Line 596: | Line 599: | ||
1. Locate and edit the following file: | 1. Locate and edit the following file: | ||
<syntaxhighlight lang="bash"> | |||
/etc/apt/sources.list | |||
</syntaxhighlight> | |||
2. Add the following line: | 2. Add the following line: | ||
<syntaxhighlight lang="bash"> | |||
deb http://ports.ubuntu.com/ubuntu-ports <distribution>-updates main universe | |||
</syntaxhighlight> | |||
Where <distribution> is the name of the Ubuntu distribution your rootfs is based on. For example, for a rootfs based on the Trusty Tahr distribution of Ubuntu, add the line: | Where <distribution> is the name of the Ubuntu distribution your rootfs is based on. For example, for a rootfs based on the Trusty Tahr distribution of Ubuntu, add the line: | ||
<syntaxhighlight lang="bash"> | |||
deb http://ports.ubuntu.com/ubuntu-ports trusty-updates main universe | |||
</syntaxhighlight> | |||
Prerequisite | Prerequisite | ||
Line 612: | Line 622: | ||
*Verify your Ethernet connection. | *Verify your Ethernet connection. | ||
*Update the package list by executing: | *Update the package list by executing: | ||
<syntaxhighlight lang="bash"> | |||
$ sudo apt-get update | |||
</syntaxhighlight> | |||
Note: Ensure that you run sudo apt-get update and not apt-get upgrade, which upgrades already installed packages. Do not confuse the two commands. | Note: Ensure that you run sudo apt-get update and not apt-get upgrade, which upgrades already installed packages. Do not confuse the two commands. | ||
*Install packages using apt-get. For example, to install wget execute this command: | *Install packages using apt-get. For example, to install wget execute this command: | ||
<syntaxhighlight lang="bash"> | |||
$ sudo apt-get install wget | |||
</syntaxhighlight> | |||
== Flashing the board == | == Flashing the board == | ||
Line 621: | Line 638: | ||
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 $DEVDIR/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 $DEVDIR/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. | ||
< | <syntaxhighlight lang="bash"> | ||
# Examples: | # Examples: | ||
# ./flash.sh <target_board> mmcblk0p1 - boot <target_board> from eMMC | # ./flash.sh <target_board> mmcblk0p1 - boot <target_board> from eMMC | ||
Line 662: | Line 679: | ||
# UIMAGE_NAME ------------ uImage file name. | # UIMAGE_NAME ------------ uImage file name. | ||
# WB0BOOT ---------------- Warmboot code such as nvtbootwb0.bin | # WB0BOOT ---------------- Warmboot code such as nvtbootwb0.bin | ||
</ | </syntaxhighlight> | ||
=== Recovery mode === | === Recovery mode === | ||
To put the board into force USB Recovery Mode: | To put the board into force USB Recovery Mode: | ||
< | <syntaxhighlight lang="bash"> | ||
1. Power down the device. If connected, remove the AC adapter from the device. The device must be | 1. Power down the device. If connected, remove the AC adapter from the device. The device must be | ||
powered OFF, and not in a suspend or sleep state. | powered OFF, and not in a suspend or sleep state. | ||
Line 677: | Line 694: | ||
6. While pressing the RECOVERY FORCE button, press and release the RESET button. | 6. While pressing the RECOVERY FORCE button, press and release the RESET button. | ||
7. Wait 2 seconds and release the RECOVERY FORCE button | 7. Wait 2 seconds and release the RECOVERY FORCE button | ||
</ | </syntaxhighlight> | ||
All remaining examples assume that the board is in recovery mode | All remaining examples assume that the board is in recovery mode | ||
Line 687: | Line 704: | ||
*'''TX1''' | *'''TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./flash.sh jetson-tx1 mmcblk0p1 | sudo ./flash.sh jetson-tx1 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./flash.sh jetson-tx2 mmcblk0p1 | sudo ./flash.sh jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
In the TX2 board, to flash the kernel and the DTB in the EMMC, you also have to flash the File System. In order to pass specific binaries you can use -d and -K options. Also, if you want to use an existent system.img and avoid creating a new one you can use -r option. For example: | In the TX2 board, to flash the kernel and the DTB in the EMMC, you also have to flash the File System. In order to pass specific binaries you can use -d and -K options. Also, if you want to use an existent system.img and avoid creating a new one you can use -r option. For example: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1 | sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb -K kernel/Image jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
==== USB drive ==== | ==== USB drive ==== | ||
Line 711: | Line 728: | ||
1) Insert your USB flash/drive in your PC and check where it was mounted | 1) Insert your USB flash/drive in your PC and check where it was mounted | ||
< | <syntaxhighlight lang="bash"> | ||
mount | mount | ||
/dev/sdb1 on /media/dsoto/EF02-5626 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2) | /dev/sdb1 on /media/dsoto/EF02-5626 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2) | ||
</ | </syntaxhighlight> | ||
2) Format the USB drive in your PCB | 2) Format the USB drive in your PCB | ||
< | <syntaxhighlight lang="bash"> | ||
umount /dev/sdb1 | umount /dev/sdb1 | ||
sudo mkfs.ext4 /dev/sdb1 | sudo mkfs.ext4 /dev/sdb1 | ||
</ | </syntaxhighlight> | ||
3) Copy the filesystem to the USB drive. It takes a while, its size is normally 2.4GB | 3) Copy the filesystem to the USB drive. It takes a while, its size is normally 2.4GB | ||
< | <syntaxhighlight lang="bash"> | ||
mkdir $DEVDIR/images/fs | mkdir $DEVDIR/images/fs | ||
sudo mount /dev/sdb1 $DEVDIR/images/fs | sudo mount /dev/sdb1 $DEVDIR/images/fs | ||
cd $DEVDIR/rootfs/ | cd $DEVDIR/rootfs/ | ||
sudo cp -a * $DEVDIR/images/fs && sync | sudo cp -a * $DEVDIR/images/fs && sync | ||
</ | </syntaxhighlight> | ||
4) Unmount the USB drive and remove it | 4) Unmount the USB drive and remove it | ||
< | <syntaxhighlight lang="bash"> | ||
sudo umount $DEVDIR/images/fs | sudo umount $DEVDIR/images/fs | ||
</ | </syntaxhighlight> | ||
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: | ||
*'''TX1''' | *'''TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./flash.sh jetson-tx1 sda1 #it can be other mount point | sudo ./flash.sh jetson-tx1 sda1 #it can be other mount point | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./flash.sh jetson-tx2 sda1 #it can be other mount point | sudo ./flash.sh jetson-tx2 sda1 #it can be other mount point | ||
</ | </syntaxhighlight> | ||
==== SD card ==== | ==== SD card ==== | ||
Line 751: | Line 768: | ||
*'''TX1''' | *'''TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
sudo cp $DEVDIR/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $DEVDIR/rootfs/boot/extlinux/extlinux.conf | sudo cp $DEVDIR/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $DEVDIR/rootfs/boot/extlinux/extlinux.conf | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
sudo cp $DEVDIR/bootloader/t186ref/p2771-0000/extlinux.conf.sdcard $DEVDIR/rootfs/boot/extlinux/extlinux.conf | sudo cp $DEVDIR/bootloader/t186ref/p2771-0000/extlinux.conf.sdcard $DEVDIR/rootfs/boot/extlinux/extlinux.conf | ||
</ | </syntaxhighlight> | ||
then flash it | then flash it | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
</ | </syntaxhighlight> | ||
*'''TX1''' | *'''TX1''' | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh jetson-tx1 mmcblk1p1 | sudo ./flash.sh jetson-tx1 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
*'''TX2''' | *'''TX2''' | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh jetson-tx2 mmcblk1p1 | sudo ./flash.sh jetson-tx2 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
==== NFS ==== | ==== NFS ==== | ||
Line 782: | Line 799: | ||
2) Open file in $DEVDIR/rootfs/etc/network/interfaces and add | 2) Open file in $DEVDIR/rootfs/etc/network/interfaces and add | ||
< | <syntaxhighlight lang="bash"> | ||
auto eth0 | auto eth0 | ||
iface eth0 inet manual | iface eth0 inet manual | ||
</ | </syntaxhighlight> | ||
3) Then flash the board to generate and install the initrd image to use nfs, you need to do this everytime that you recompile the kernel | 3) Then flash the board to generate and install the initrd image to use nfs, you need to do this everytime that you recompile the kernel | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
MY_IPADDRESS=192.169.0.3 | MY_IPADDRESS=192.169.0.3 | ||
sudo ./flash.sh -N $MY_IPADDRESS:$DEVDIR/rootfs jetson-tx1 eth0 #use jetson-tx2 for TX2 | sudo ./flash.sh -N $MY_IPADDRESS:$DEVDIR/rootfs jetson-tx1 eth0 #use jetson-tx2 for TX2 | ||
</ | </syntaxhighlight> | ||
=== Flash kernel === | === Flash kernel === | ||
Line 799: | Line 816: | ||
To flash your kernel you just need to copy it to /boot in your filesystem. The old method to flash it in the LNX partition (./flash.sh -k LNX <target_board> mmcblk1p1) is NOT longer used | To flash your kernel you just need to copy it to /boot in your filesystem. The old method to flash it in the LNX partition (./flash.sh -k LNX <target_board> mmcblk1p1) is NOT longer used | ||
< | <syntaxhighlight lang="bash"> | ||
sudo cp $DEVDIR/images/zImage $DEVDIR/images/Image $DEVDIR/rootfs/boot/ | sudo cp $DEVDIR/images/zImage $DEVDIR/images/Image $DEVDIR/rootfs/boot/ | ||
</ | </syntaxhighlight> | ||
if you are not booting from NFS then you need to reflash your filesysm in order to update the kernel. However, likely you did some changes in the kernel modules so it is recommended to run the apply_binaries.sh script instead of only copying the kernel images. | if you are not booting from NFS then you need to reflash your filesysm in order to update the kernel. However, likely you did some changes in the kernel modules so it is recommended to run the apply_binaries.sh script instead of only copying the kernel images. | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/ | cd $DEVDIR/ | ||
sudo ./apply_binaries.sh | sudo ./apply_binaries.sh | ||
</ | </syntaxhighlight> | ||
then flash your filesystem again. | then flash your filesystem again. | ||
Line 819: | Line 836: | ||
From your board run: | From your board run: | ||
< | <syntaxhighlight lang="bash"> | ||
ifconfig | ifconfig | ||
</ | </syntaxhighlight> | ||
you'll see something like: | you'll see something like: | ||
< | <syntaxhighlight lang="bash"> | ||
eth0 Link encap:Ethernet HWaddr 0c:54:a5:1d:18:fe | eth0 Link encap:Ethernet HWaddr 0c:54:a5:1d:18:fe | ||
inet addr:10.251.101.40 Bcast:10.251.101.255 Mask:255.255.255.0 | inet addr:10.251.101.40 Bcast:10.251.101.255 Mask:255.255.255.0 | ||
</ | </syntaxhighlight> | ||
So in this case the IP address is '''10.251.101.40''' | So in this case the IP address is '''10.251.101.40''' | ||
Line 834: | Line 851: | ||
2) From your host computer copy the Image to your board. | 2) From your host computer copy the Image to your board. | ||
< | <syntaxhighlight lang="bash"> | ||
BOARD_IP_ADDRESS=10.251.101.40 | BOARD_IP_ADDRESS=10.251.101.40 | ||
scp $DEVDIR/images/arch/arm64/boot/Image nvidia@BOARD_IP_ADDRESS:/tmp | scp $DEVDIR/images/arch/arm64/boot/Image nvidia@BOARD_IP_ADDRESS:/tmp | ||
</ | </syntaxhighlight> | ||
You'll be asked for a password, use '''nvidia''' | You'll be asked for a password, use '''nvidia''' | ||
Line 843: | Line 860: | ||
3) From your board, copy the kernel Image to the /boot folder: | 3) From your board, copy the kernel Image to the /boot folder: | ||
< | <syntaxhighlight lang="bash"> | ||
sudo cp /tmp/Image /boot | sudo cp /tmp/Image /boot | ||
</ | </syntaxhighlight> | ||
You'll be asked for a password again, use '''ubuntu''' if your user is ubuntu or '''nvidia''' if your user is nvidia. | You'll be asked for a password again, use '''ubuntu''' if your user is ubuntu or '''nvidia''' if your user is nvidia. | ||
Line 851: | Line 868: | ||
4) Reboot the board. | 4) Reboot the board. | ||
< | <syntaxhighlight lang="bash"> | ||
sudo reboot | sudo reboot | ||
</ | </syntaxhighlight> | ||
At this point you should be using the new kernel Image, you can verify with the uname command: | At this point you should be using the new kernel Image, you can verify with the uname command: | ||
< | <syntaxhighlight lang="bash"> | ||
uname -a | uname -a | ||
</ | </syntaxhighlight> | ||
Just make sure the date is correct: Linux tegra-ubuntu 4.4.38+ #35 SMP PREEMPT '''Tue Nov 28 12:29:01 CST 2017''' aarch64 aarch64 aarch64 GNU/Linux | Just make sure the date is correct: Linux tegra-ubuntu 4.4.38+ #35 SMP PREEMPT '''Tue Nov 28 12:29:01 CST 2017''' aarch64 aarch64 aarch64 GNU/Linux | ||
Line 866: | Line 883: | ||
* Kernel | * Kernel | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh -r -k kernel -K kernel/Image jetson-tx2 mmcblk0p1 | sudo ./flash.sh -r -k kernel -K kernel/Image jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
* DTB | * DTB | ||
< | <syntaxhighlight lang="bash"> | ||
sudo ./flash.sh -r -k kernel-dtb -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb jetson-tx2 mmcblk0p1 | sudo ./flash.sh -r -k kernel-dtb -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb jetson-tx2 mmcblk0p1 | ||
</ | </syntaxhighlight> | ||
=== Flash bootloader === | === Flash bootloader === | ||
Line 879: | Line 896: | ||
Update the content of the EBT partition where uboot is located | Update the content of the EBT partition where uboot is located | ||
< | <syntaxhighlight lang="bash"> | ||
cd $DEVDIR/64_TX1/Linux_for_Tegra_64_tx1/ | cd $DEVDIR/64_TX1/Linux_for_Tegra_64_tx1/ | ||
sudo ./flash.sh -k EBT jetson-tx1 mmcblk1p1 | sudo ./flash.sh -k EBT jetson-tx1 mmcblk1p1 | ||
</ | </syntaxhighlight> | ||
== Serial Console == | == Serial Console == | ||
Line 888: | Line 905: | ||
J21 contains the Serial Console signals as can be seen in the [http://jetsonhacks.com/nvidia-jetson-tx1-j21-header-pinout/ pin out header]. Basically: | J21 contains the Serial Console signals as can be seen in the [http://jetsonhacks.com/nvidia-jetson-tx1-j21-header-pinout/ pin out header]. Basically: | ||
< | <syntaxhighlight lang="bash"> | ||
J21 Pin 8 (UART 1 TXD) -> Cable RXD (Yellow) | J21 Pin 8 (UART 1 TXD) -> Cable RXD (Yellow) | ||
J21 Pin 10 (UART 1 RXD) -> Cable TXD (Orange) | J21 Pin 10 (UART 1 RXD) -> Cable TXD (Orange) | ||
TX1 J21 Pin 9 (GND) -> Cable GND (Black) | TX1 J21 Pin 9 (GND) -> Cable GND (Black) | ||
</ | </syntaxhighlight> | ||
The listed colors match the wire color if you are using an [https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/TTL-232R-3V3/768-1015-ND/1836393 FTDI TTL-232R-3V3-AJ USB to serial cable] . | The listed colors match the wire color if you are using an [https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/TTL-232R-3V3/768-1015-ND/1836393 FTDI TTL-232R-3V3-AJ USB to serial cable] . | ||
Line 900: | Line 917: | ||
== References == | == References == | ||
< | <syntaxhighlight lang="bash"> | ||
https://devtalk.nvidia.com/default/topic/929186/jetson-tx1/jetson-tx1-kernel-compilation/ | https://devtalk.nvidia.com/default/topic/929186/jetson-tx1/jetson-tx1-kernel-compilation/ | ||
https://devtalk.nvidia.com/default/topic/762653/?comment=4654303 | https://devtalk.nvidia.com/default/topic/762653/?comment=4654303 | ||
Line 919: | Line 936: | ||
https://devtalk.nvidia.com/default/topic/781056/jetson-tk1-boot-from-nfs-system-hangs-up-during-services-boot/?offset=3 | https://devtalk.nvidia.com/default/topic/781056/jetson-tk1-boot-from-nfs-system-hangs-up-during-services-boot/?offset=3 | ||
https://devtalk.nvidia.com/default/topic/744908/jetson-tk1/jetson-tk1-boot-over-nfs/ | https://devtalk.nvidia.com/default/topic/744908/jetson-tk1/jetson-tk1-boot-over-nfs/ | ||
</ | </syntaxhighlight> | ||
== See also == | == See also == | ||
Line 930: | Line 947: | ||
:[http://cospandesign.github.io/linux/2016/04/11/tx1-bringup.html TX1 Additional documentation ] | :[http://cospandesign.github.io/linux/2016/04/11/tx1-bringup.html TX1 Additional documentation ] | ||
==Contact Us== | |||
{{ContactUs}} | {{ContactUs}} | ||
[[Category:Jetson]] | [[Category:Jetson]] |