JetPack版本升级指南(NVIDIA Jetson)
Reference:
如何区分版本
JetPack版本与L4T Release是两个不同的版本概念,L4T(Linux for Tegra)是JetPack的子集,通常会一起更新。
它们之间的对应关系如下:
L4T的更新有三种,前两种基本可以无损升级,但第三种(跨大版本)不一定能无损升级,建议备份好后重刷系统:
Point Release Update(点版本更新):
例如从35.1.0 到 35.1.1,通常是小型错误修复。Minor Release Update(小版本更新):
例如从35.5到35.6,通常会更新系统组件如CUDA、TensorRT等。Release Update(大版本更新):
例如从34.x(JP4/Ubuntu18)升级到35.x(JP5/Ubuntu20),则必须要清空数据刷机才能进行。
更新之前
在执行任何更新之前,我都强烈建议你先安装好TimeShift并创建快照!以防更新后出现问题导致不得不重装系统。
这部分与其他普通Ubuntu系统一样,非常简单但能救命,可直接参考:
点版本更新
这种更新最简单,不需要修改任何文件,只需:
sudo apt update
sudo apt list --upgradable # 可选
sudo apt upgrade
小版本更新/大版本更新
注意:大版本更新流程与小版本更新基本一致,都需要修改软件源后执行dist-upgrade,可以直接参考。
当你发现一些工具包(例如CUDA或者TensorRT等)过旧的时候,就需要检查一下是否有小版本更新了。
检查是否有新版本
在这里可以看到当前的最新版本:
以我手头的Jetson Xavier NX为例,当前安装的版本是L4T 35.5(JP5.1.3),有新版本L4T 35.6(JP 5.1.4)可以更新。
查看已安装的JetPack版本:
sudo apt-cache show nvidia-jetpack
注意:此方式是查询软件源缓存来查看版本,可能不准确,建议使用jtop
工具查看。
修改软件源
sudo nano /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
将rXX.X
改为当前最新的版本,例如我这里将r35.5
改为r35.6
。
然后使用apt
更新:
sudo apt update
sudo apt dist-upgrade
然后就会看到有一大堆需要更新的东西:
jetson@patrick-jetson:~$ sudo apt update
Hit:1 http://mirrors.ustc.edu.cn/ubuntu-ports focal InRelease
Hit:2 http://mirrors.ustc.edu.cn/ubuntu-ports focal-updates InRelease
Hit:3 http://mirrors.ustc.edu.cn/ubuntu-ports focal-backports InRelease
Hit:4 http://mirrors.ustc.edu.cn/ubuntu-ports focal-security InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:6 http://packages.ros.org/ros2/ubuntu focal InRelease
Hit:8 https://packages.microsoft.com/repos/code stable InRelease
Hit:7 https://repo.download.nvidia.cn/jetson/common r35.6 InRelease
Hit:9 https://repo.download.nvidia.cn/jetson/t194 r35.6 InRelease
Hit:10 https://repo.download.nvidia.cn/jetson/ffmpeg r35.6 InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
329 packages can be upgraded. Run 'apt list --upgradable' to see them.
jetson@patrick-jetson:~$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
elementary-xfce-icon-theme exo-utils greybird-gtk-theme hddtemp libburn4 libexo-1-0 libexo-2-0 libexo-common
libexo-helpers libgarcon-1-0 libgarcon-common libgarcon-gtk3-1-0 libgtksourceview-3.0-1
libgtksourceview-3.0-common libisofs6 libjte2 libkeybinder-3.0-0 libqrencode4 libtagc0 libthunarx-3-0
libxfce4panel-2.0-4 libxfce4ui-utils mousepad ristretto thunar thunar-archive-plugin thunar-data
thunar-media-tags-plugin thunar-volman xarchiver xfburn xfdesktop4 xfdesktop4-data xiccd
Use 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
libavformat58 exo-utils libavfilter7 libpython3.9-minimal libswresample3
libpython3.9-stdlib libzmq5 iperf3 python2.7-minimal libcgraph6 libpython2.7
python2.7 python3-pip libavformat-dev python3.9 libzbar0 libexo-1-0
libexo-2-0 libswresample-dev libpostproc55 liblab-gamut1 libavutil-dev
libavcodec-dev libpmix2 python3.9-minimal libexo-common python-pkg-resources
libcdt5 libavutil56 libpathplan4 libswscale5 libgvpr2 libopenexr24
libsdl2-2.0-0 libmysofa1 libiperf0 libpython2.7-minimal libswscale-dev
libgvc6 libpython2.7-stdlib python3-scipy graphviz python-pip-whl libde265-0
libexo-helpers
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following NEW packages will be installed:
python3-toml ubuntu-pro-client ubuntu-pro-client-l10n
The following packages will be upgraded:
accountsservice apparmor base-files bind9-host bind9-libs binutils binutils-aarch64-linux-gnu binutils-common
bluez bluez-obexd bsdutils bubblewrap busybox-initramfs ca-certificates code cpio cups cups-browsed cups-client
cups-common cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers cups-ipp-utils cups-ppdc
cups-server-common curl distro-info-data dns-root-data dnsmasq-base e2fsprogs espeak-ng-data fdisk firefox
fonts-opensymbol gdb gdbserver ghostscript ghostscript-x gir1.2-accountsservice-1.0 gir1.2-gdkpixbuf-2.0
gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gtk-3.0 gir1.2-nm-1.0 gir1.2-soup-2.4 gir1.2-vte-2.91
git git-man gnome-shell gnome-shell-common gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-plugins-base
gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good gstreamer1.0-pulseaudio gstreamer1.0-tools
gstreamer1.0-x gtk-update-icon-cache gtk2-engines-pixbuf iputils-ping jetson-gpio-common klibc-utils less
libaccountsservice0 libapparmor1 libapr1 libarchive13 libbinutils libblkid-dev libblkid1 libbluetooth3 libc-bin
libc-dev-bin libc6 libc6-dbg libc6-dev libcdio18 libcom-err2 libctf-nobfd0 libctf0 libcups2 libcupsfilters1
libcupsimage2 libcurl3-gnutls libcurl4 libcurl4-openssl-dev libde265-0 libespeak-ng1 libexpat1 libexpat1-dev
libext2fs2 libfdisk1 libfontembed1 libfreerdp-client2-2 libfreerdp2-2 libgail-common libgail18 libgd3
libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev
libglib2.0-dev-bin libglib2.0-doc libglib2.0-tests libgnutls30 libgpgme11 libgs9 libgs9-common libgsf-1-114
libgsf-1-common libgssapi-krb5-2 libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0
libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-0 libgstreamer-plugins-good1.0-dev
libgstreamer1.0-0 libgstreamer1.0-0-dbg libgstreamer1.0-dev libgtk-3-0 libgtk-3-common libgtk2.0-0 libgtk2.0-bin
libgtk2.0-common libk5crypto3 libklibc libkpathsea6 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common
libmount-dev libmount1 libmpg123-0 libmysqlclient21 libndp0 libnghttp2-14 libnm0 libnspr4 libnss-systemd libnss3
libopenjp2-7 liborc-0.4-0 liborc-0.4-dev liborc-0.4-dev-bin libpam-modules libpam-modules-bin libpam-runtime
libpam-systemd libpam0g libpcap0.8 libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3.8
libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib librados2 librbd1 libsmartcols1 libsmbclient
libsoup-gnome2.4-1 libsoup2.4-1 libss2 libssh-4 libssh-gcrypt-4 libsynctex2 libsystemd0 libtiff5 libtss2-esys0
libudev1 libuuid1 libuv1 libvpx6 libvte-2.91-0 libvte-2.91-common libwbclient0 libwinpr2-2 libxml2 libxml2-dev
linux-libc-dev locales login logsave mount nano nautilus-share network-manager
network-manager-config-connectivity-ubuntu nfs-common nvidia-l4t-3d-core nvidia-l4t-apt-source
nvidia-l4t-bootloader nvidia-l4t-camera nvidia-l4t-configs nvidia-l4t-core nvidia-l4t-cuda
nvidia-l4t-display-kernel nvidia-l4t-firmware nvidia-l4t-gbm nvidia-l4t-graphics-demos nvidia-l4t-gstreamer
nvidia-l4t-init nvidia-l4t-initrd nvidia-l4t-jetson-io nvidia-l4t-jetson-multimedia-api
nvidia-l4t-jetsonpower-gui-tools nvidia-l4t-kernel nvidia-l4t-kernel-dtbs nvidia-l4t-kernel-headers
nvidia-l4t-libvulkan nvidia-l4t-multimedia nvidia-l4t-multimedia-utils nvidia-l4t-nvfancontrol
nvidia-l4t-nvpmodel nvidia-l4t-nvpmodel-gui-tools nvidia-l4t-nvsci nvidia-l4t-oem-config nvidia-l4t-openwfd
nvidia-l4t-optee nvidia-l4t-pva nvidia-l4t-tools nvidia-l4t-vulkan-sc nvidia-l4t-vulkan-sc-dev
nvidia-l4t-vulkan-sc-samples nvidia-l4t-vulkan-sc-sdk nvidia-l4t-wayland nvidia-l4t-weston nvidia-l4t-x11
nvidia-l4t-xusb-firmware openssh-client openssh-server openssh-sftp-server openssl openvpn passwd
python-jetson-gpio python-pip-whl python-zipp python2.7 python2.7-minimal python3-colcon-argcomplete
python3-colcon-bash python3-colcon-cd python3-colcon-cmake python3-colcon-common-extensions python3-colcon-core
python3-colcon-defaults python3-colcon-devtools python3-colcon-installed-package-information
python3-colcon-library-path python3-colcon-metadata python3-colcon-mixin python3-colcon-notification
python3-colcon-output python3-colcon-override-check python3-colcon-package-information
python3-colcon-package-selection python3-colcon-parallel-executor python3-colcon-pkg-config
python3-colcon-powershell python3-colcon-python-setup-py python3-colcon-recursive-crawl python3-colcon-ros
python3-colcon-test-result python3-colcon-zsh python3-configobj python3-cryptography python3-idna
python3-jetson-gpio python3-paramiko python3-pil python3-pip python3-pkg-resources python3-rosdistro
python3-rosdistro-modules python3-setuptools python3-update-manager python3-urllib3 python3.8 python3.8-dev
python3.8-minimal python3.8-venv remmina remmina-common remmina-plugin-rdp remmina-plugin-secret
remmina-plugin-vnc rfkill samba-libs snapd systemd systemd-sysv systemd-timesyncd thunderbird
thunderbird-gnome-support tracker-extract tracker-miner-fs tzdata ubuntu-advantage-desktop-daemon
ubuntu-advantage-tools ubuntu-drivers-common udev unzip update-manager update-manager-core update-notifier
update-notifier-common util-linux uuid-dev vim vim-common vim-runtime wget wpasupplicant xserver-common
xserver-xephyr xserver-xorg-core xserver-xorg-legacy xwayland xxd
329 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
219 standard LTS security updates
Need to get 964 MB/968 MB of archives.
After this operation, 12.8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
敲个Y回车,喝杯茶慢慢等吧~
偶尔得瞄两眼更新过程,有时可能有一些变更需要你确认,例如:
这里建议输入Y,虽然你已经把版本号改好了,但万一有什么其他变动呢…
注意:如果你正在从34.x升级到35.x(不是请忽略)
还需要执行:
sudo apt install nvidia-l4t-openwfd nvidia-l4t-vulkan-sc-dev nvidia-l4t-vulkan-sc-samples nvidia-l4t-vulkan-sc-sdk nvidia-l4t-vulkan-sc nvidia-l4t-jetsonpower-gui-tools
重启设备
更新完成,但别忘了jtop还需要更新一下:
sudo pip3 install -U jetson-stats
之后重启设备即可:
sudo reboot
如果发现启动之后出了问题,赶紧打开Timeshift准备Restore吧……
- 感谢你赐予我前进的力量