Flashing AGX Orin from ubuntu 20.04 stuck on “Sync'ing system.img ... ”

I am trying to update the RT kernel for my AGX Orin. When I run “sudo./flash.sh jetson-agx-orin-devkit mmcblk0p1” on UBUNTU20.04 on my personal PC in AGX Orin recovery mode, It’s stuck in "Sync’ing system.img… ", has been stuck here for more than two hours, I think this is not normal, may I ask where there may be a problem, my previous compilation kernel did not encounter any error.
This is the output at the terminal
terminal.txt (18.2 KB)

./flash.sh: 行 2860: python:未找到命令

你確定之前這台主機能燒錄嗎? Compile kernel跟能不能燒錄是完全不相關的事情

我之前是通过SDK Manger烧录的系统,版本是r35.2.1,但是由于ethercat通信需要实时内核,按照官方的教程https://docs.nvidia.com/jetson/archives/r35.2.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html#to-build-the-real-time-kernel
但是官方的r35.2中没有相应的实时内核包,
所以我从https://developer.nvidia.com/embedded/jetson-linux-r3521
下载源码尝试编译烧录,我的过程是:

cd Linux_for_Tegra/source/public
tar –xjf kernel_src.tbz2
tar xf Jetson_Linux_R35.2.1_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R35.2.1_aarch64.tbz2
 tar xjf aarch64--glibc--stable-final.tar.gz
sudo apt install build-essential bc
TEGRA_KERNEL_OUT=/home/robot/Jetson_AGX_Orin/Linux_for_Tegra/source/public/kernel/output/
export CROSS_COMPILE=<cross_prefix>
export LOCALVERSION=-tegra
cd kernel-5.10/
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
scripts/rt-patch.sh apply-patches
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2
cd $TEGRA_KERNEL_OUT
cp arch/arm64/boot/Image /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/Image
cp arch/arm64/boot/dts/nvidia/*dtb /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/dtb/
 cp arch/arm64/boot/dts/nvidia/*dtbo /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/dtb/
 make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=/home/robot/Jetson_AGX_Orin/Linux_for_Tegra/rootfs/
cd Linux_for_Tegra/
sudo ./apply_binaries.sh

在重启进入recover mode后,在我的个人PC Ubuntu 20.04 lsusb中看到 7023 Nvidia core APX,之后再执行

sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

就会卡在我之前提到的那里

你能確定一下如果你不改RT kernel的話這包確定能燒嗎?

我不确定,现在我的板子已经不能正常开机了,我应该怎么做呢,尝试从SDK Manger重新烧录还是尝试继续从源码编译烧录一个没有RT 的内核

我不太確定為何還會問說要怎麼做…
這跟板子的狀況沒有關聯

你就把你所有有關RT kernel build的東西拿掉只裝單純的BSP就可以了…

你自己給的步驟, RT kernel的地方不用做,只燒純粹的BSP (重新抓一包新的)

把RT kernel的东西拿掉后可以正常烧录,能进入系统

請問host上硬碟空間夠嗎?

空间是够的,个人PC有1TB空余,jetson有内置64GB,我又扩展了1TB 的固态硬盘

可以確認一下是不是RT kernel module加進去rootfs導致的嗎?

我觉得应该是的,也许有可能与我编译内核时的.config设置有关系?我在执行

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2

这一步时选择的都是默认设置

我這裡解釋一下…你前面卡在的地方是你的host.

你kernel多加了設定都跟你的host無關… 跟你的.config加了甚麼無關.
我還是傾向是加完檔案之後的rootfs檔案過大導致system.img也跟著變大…

加了RT相关设置的roofts有7.6GB,我觉得不是因为空间不够的问题。
没有RT设置的roofts有5.4GB,但烧录时在system.img这一步很快就完成了。
如果是因为system.img文件过大,那也不至于卡在这一步两个小时。

你可以先試試看只做這三步

cp arch/arm64/boot/Image /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/Image
cp arch/arm64/boot/dts/nvidia/*dtb /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/dtb/
 cp arch/arm64/boot/dts/nvidia/*dtbo /home/robot/Jetson_AGX_Orin/Linux_for_Tegra/kernel/dtb/

但不做這一步

sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=/home/robot/Jetson_AGX_Orin/Linux_for_Tegra/rootfs/

看一下這樣還會不會卡住

另外35.2.1這版已經有點太舊了 建議你可以升到35.4.1再試試看

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.