兔展制作h5頁面模板/天津債務(wù)優(yōu)化公司
目錄
前言
一、準(zhǔn)備工作
二、AGX Orin 系統(tǒng)刷機(jī)步驟
三、AGX Orin 系統(tǒng)備份
總結(jié)
前言
????????NVIDIA AGX Orin 是一款高性能的嵌入式計(jì)算平臺,專為邊緣計(jì)算和 AI 應(yīng)用而設(shè)計(jì)。為了確保系統(tǒng)的穩(wěn)定性和適應(yīng)不同的應(yīng)用場景,用戶可能需要對 AGX Orin 進(jìn)行系統(tǒng)刷機(jī)和備份操作。本文將詳細(xì)介紹如何完成這些操作,幫助您更好地管理和維護(hù) AGX Orin 設(shè)備。
一、準(zhǔn)備工作
在開始刷機(jī)和備份之前,請確保您已經(jīng)準(zhǔn)備好以下工具和資源:
- NVIDIA Jetson SDK Manager:這是 NVIDIA 提供的刷機(jī)工具,可以在 官方頁面 下載。
- USB 線纜:用于將 AGX Orin 連接到主機(jī)電腦。
- Ubuntu 系統(tǒng)電腦:建議使用 Ubuntu 18.04 或 20.04 版本作為主機(jī)電腦。
- 存儲設(shè)備:用于備份系統(tǒng)鏡像的外部存儲設(shè)備,如 USB 盤或外置硬盤。
二、AGX Orin 系統(tǒng)刷機(jī)步驟
????????AGX-Orin刷機(jī)方式有兩種,一種使用官方Jetson SDK Manager刷寫方式,使用nvidia提供裝刷機(jī)軟件進(jìn)行刷機(jī),該方式在第一篇博文中有介紹,本文主要介紹在ubuntu20.04系統(tǒng)中使用命令的方式進(jìn)行刷機(jī),具體刷機(jī)步驟如下:
a、ubuntu20.04工具安裝
??ubuntu20.04系統(tǒng)環(huán)境配置:在Linux_for_Tegra目錄下執(zhí)行sudo ./tools/l4t_flash_prerequisites.sh腳本,安裝ubuntu系統(tǒng)所需的庫,腳本內(nèi)容如下所示:
sudo apt-get update && \
sudo apt-get install -y abootimg \binfmt-support \binutils \cpp \device-tree-compiler \dosfstools \lbzip2 \libxml2-utils \nfs-kernel-server \python3-yaml \qemu-user-static \sshpass \udev \uuid-runtime \whois \openssl \cpio \rsync \zstdSYSTEM_VER="$(grep "DISTRIB_RELEASE" </etc/lsb-release | cut -d= -f 2 | sed 's/\.//')"# Install lz4c utility required for compressing bpmp-fw-dtb.
# For Ubuntu 18.04 and older version, run "sudo apt-get install liblz4-tool".
# For Ubuntu 20.04 and newer version, run "sudo apt-get install lz4".
if [ "${SYSTEM_VER}" -lt 2004 ]; thensudo apt-get install -y liblz4-tool
elsesudo apt-get install -y lz4
fi
????????執(zhí)行以下命令應(yīng)用Jetson二進(jìn)制文件,sudo ./apply_binaries.sh腳本位于Linux_for_Tegra目錄下:
b、連接 AGX Orin
- 使用 USB 線纜將 AGX Orin 連接到主機(jī)電腦。
- 將 AGX Orin 置于恢復(fù)模式(Recovery Mode)。通常的步驟是先關(guān)機(jī),按住恢復(fù)按鍵(Recovery Button),然后按下電源鍵啟動(dòng)。
c、flash.sh命令刷機(jī)
????????SDK命令刷機(jī)主要是采用flash.sh進(jìn)行刷機(jī)操作,其中flash.sh位于JetPack SDK開發(fā)包中,腳本位置在:
flash.sh腳本參數(shù)選擇如下所示:
cftc@cftc-virtual-machine:~/nvidia/nvidia_sdk/JetPack_5.1.3_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra$ ./flash.sh --helpUsage: sudo ./flash.sh [options] <target_board> <rootdev>Where,target board: Valid target board name.rootdev: Proper root device.options:-c <cfgfile> ---------- Flash partition table config file.-d <dtbfile> ---------- device tree file.-f <flashapp> --------- Path to flash application (tegraflash.py)-h -------------------- print this message.-i <enc rfs key file>-- key for disk encryption support.-k <partition id> ----- partition name or number specified in flash.cfg.-m <mts preboot> ------ MTS preboot such as mts_preboot_si.-n <nfs args> --------- Static nfs network assignments<Client IP>:<Server IP>:<Gateway IP>:<Netmask>-o <odmdata> ---------- ODM data.-r -------------------- skip building and reuse existing system.img.-t <tegraboot> -------- tegraboot binary such as nvtboot.bin-u <PKC key file>------ PKC key used for odm fused board.-v <SBK key file>------ Secure Boot Key (SBK) key used for ODM fused board.-w <wb0boot> ---------- warm boot binary such as nvtbootwb0.bin-x <tegraid> ---------- Tegra CHIPID.-B <boardid> ---------- BoardId.-C <cmdline> ---------- Kernel commandline arguments.WARNING:Each option in this kernel commandline getshigher preference over the values set byflash.sh. In case of NFS booting, this scriptadds NFS booting related arguments, if -i optionis omitted.-F <flasher> ---------- Flash server such as cboot.bin.-G <file name> -------- Read partition and save image to file.-I <initrd> ----------- initrd file. Null initrd is default.-K <kernel> ----------- Kernel image file such as zImage or Image.-L <bootloader> ------- Bootloader such as cboot.bin or u-boot-dtb.bin.-M <mts boot> --------- MTS boot file such as mts_si.-N <nfsroot> ---------- i.e. <my IP addr>:/my/exported/nfs/rootfs.-R <rootfs dir> ------- Sample rootfs directory.-S <size> ------------- Rootfs size in bytes. Valid only for internalrootdev. KiB, MiB, GiB short hands are allowed,for example, 1GiB means 1024 * 1024 * 1024 bytes.-T <ext num sectors> ---The number of the sectors of the external storage device.The default value is 122159104 if this option is not set.-Z -------------------- Print configurations and then exit.--no-flash ------------ perform all steps except physically flashing the board.This will create a system.img.--external-device------ Generate flash images for external devices--sparseupdate--------- only flash partitions that have changed. Currently only support SPI flash memory--no-systemimg -------- Do not create or re-create system.img.--bup ----------------- Generate bootloader update payload(BUP).--single-image-bup <part name> Generate specified single image BUP, this must work with --bup.--bup-type <type> ----- Generate specific type bootloader update payload(BUP), such as bl or kernel.--multi-spec----------- Enable support for building multi-spec BUP.--clean-up------------- Clean up BUP buffer when multi-spec is enabled.--usb-instance <id> --- Specify the USB instance to connect to;<id> = USB port path (e.g. 3-14).--no-root-check ------- Typical usage of this script require root permissions.Pass this option to allow running the script as aregular user, in which case only specific combinationsof command-line options will be functional.--uefi-keys <keys_conf> Specify UEFI keys configuration file.--rcm-boot ------------ Do RCM boot instead of physically flashing the board.--sign ---------------- Sign images and store them under "bootloader/signed"directory. The board will not be physically flashed.--image --------------- Specify the image to be written into board.--boot-chain-flash <c> Flash only a specific boot chain (ex. "A, "B", "all").Defaults to "all", inputs are case insensitive.Not suitable for production.--boot-chain-select <c> Specify booting chain (ex. "A" or "B") after the board is flashed.Defaults to "A", inputs are case insensitive.--pv-crt -------------- The certificate for the key that is used to sign cpu_bootloader--with-systemimg ------ Generate system images also when using -k option--pv-enc <enc_key>----- The encryption key that is used to encrypt cpu_bootloader.--uefi-enc <uefi_enc_key> Key file (0x19: 16-byte; 0x23: 32-byte) to encrypt UEFI payloads--uda-dir-------------- Directory to store user data that will be encrypted in UDA partition.--separate-rcmboot-binary ------ Enable use of different binaries for rcmboot and coldboot.--generic-passphrase -- Use generic passphrase for disk encryption.--disable-random-iv --- Disable generation of random IV, SALT1, SALT2 and DERSTR.--read-info ----------- Read and display board related info, fuse info (based on fuse_t234.xml),and EEPROM content.--reuse-uuid --------- Reuse uuid which is already generated first time.
????????flash.sh主要包含燒寫參數(shù)、板卡配置、燒寫分區(qū)等重要參數(shù)輸入,具體參數(shù)請參考--help 參數(shù)說明,燒寫命令如下所示:
sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1
? ? ? ? 其中-r表示跳過根文件系統(tǒng)system.img制作,重用已經(jīng)生成的鏡像文件系統(tǒng)文件,如果是首次刷機(jī),則需要去掉-r參數(shù)。其中mmcblk0p1為根文件系統(tǒng)分區(qū),agx-orin默認(rèn)燒錄至emmc分區(qū)中。jetson-agx-orin-devkit為官方AGX-Orin模組配置,具體板卡配置說明如下:
其他刷機(jī)指令,單獨(dú)刷寫內(nèi)核:
sudo ./flash.sh -k kernel y-c8-agx-orin-3550 mmcblk0p1
更新設(shè)備樹文件:
sudo ./flash.sh -r -k kernel-dtb y-c8-agx-orin-3550 mmcblk0p1
?更新MB1_BCT 配置文件:
sudo ./flash.sh -k MB1_BCT y-c8-agx-orin-3550 mmcblk0p1
三、AGX Orin 系統(tǒng)備份
備份操作可以在刷機(jī)前或系統(tǒng)配置完成后進(jìn)行,以確保在出現(xiàn)問題時(shí)能夠快速恢復(fù)。
-
連接存儲設(shè)備
- 將外部存儲設(shè)備連接到 AGX Orin,確保存儲空間足夠大以保存整個(gè)系統(tǒng)鏡像。
-
創(chuàng)建備份鏡像
sudo ./flash.sh -r -k APP -G system_n102.img y-c8-agx-orin-3550 mmcblk0p1
其中參數(shù)說明如下:
- -k APP:表示的是文件系統(tǒng)分區(qū)名稱;
- -G?system_n102.img:指定備份文件系統(tǒng)文件名稱;
系統(tǒng)備份如下圖所示:
備份途中會有百分比打印,全部部分完成有successfully打印
總結(jié)
????????通過以上步驟,您可以成功地為 NVIDIA AGX Orin 刷寫系統(tǒng)并創(chuàng)建備份。這些操作不僅能幫助您保持系統(tǒng)的更新和安全,還能在遇到問題時(shí)快速恢復(fù)系統(tǒng)。定期進(jìn)行系統(tǒng)備份是保障系統(tǒng)穩(wěn)定運(yùn)行的重要措施,建議大家在進(jìn)行重要更改前都進(jìn)行備份操作。
????????如果您在操作過程中遇到任何問題,可以查閱 NVIDIA 的官方文檔或?qū)で笊鐓^(qū)支持。希望這篇教程對您有所幫助!