host: ubuntu22.04, JetPack 6.1
按以下操作步骤
1.toolchain
$ mkdir $HOME/l4t-gcc
$ cd $HOME/l4t-gcc
$ tar -xf <toolchain_archive>
$ sudo apt install build-essential bc
2.解压
$tar -xvf Jetson_Linux_R36.4.0_aarch64.tbz2
$ tar -xf public_sources.tbz2 -C Linux_for_Tegra/..
$ cd Linux_for_Tegra/source
$ tar -xf kernel_src.tbz2
$ tar -xf kernel_oot_modules_src.tbz2
$ tar -xf nvidia_kernel_display_driver_source.tbz2
$ cd ../../
$ tar -xf Tegra_Linux_Sample-Root-Filesystem_R36.4.0_aarch64.tbz2 -C Linux_for_Tegra/rootfs/
3.编译
$ cd Linux_for_Tegra/source
$ ./generic_rt_build.sh “enable”
$ export CROSS_COMPILE=/home/wel/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
$ make -C kernel
$ export INSTALL_MOD_PATH=/home/wel/nvidia/Linux_for_Tegra/rootfs/
$ sudo -E make install -C kernel
$ cp kernel/kernel-jammy-src/arch/arm64/boot/Image
/Linux_for_Tegra/kernel/Image
$ export IGNORE_PREEMPT_RT_PRESENCE=1
$ export CROSS_COMPILE=/bin/aarch64-buildroot-linux-gnu-
$ export KERNEL_HEADERS=/home/wel/nvidia/Linux_for_Tegra/source/kernel/kernel-jammy-src
$ make modules
$ sudo -E make modules_install
$ cd /Linux_for_Tegra
$ sudo ./tools/l4t_update_initrd.sh
$ make dtbs
$ cp kernel-devicetree/generic-dts/dtbs/* /Linux_for_Tegra/kernel/dtb/
4.烧录
$ cd Linux_for_Tegra/
$ sudo ./tools/l4t_flash_prerequisites.sh
$ sudo ./apply_binaries.sh
$ rm rootfs/etc/systemd/system/default.target
$bash ./nvsdkmanager_flash.sh --storage nvme0n1p1
烧录信息:
Entering RCM boot
[ 0.0248 ] mb1_t234_prod_aligned_sigheader.bin.encrypt filename is from --mb1_bin
[ 0.0248 ] psc_bl1_t234_prod_aligned_sigheader.bin.encrypt filename is from --psc_bl1_bin
[ 0.0248 ] rcm boot with presigned binaries
[ 0.0253 ] tegrarcm_v2 --instance 1-6 --new_session --chip 0x23 0 --uid --download bct_br br_bct_BR.bct --download mb1 mb1_t234_prod_aligned_sigheader.bin.encrypt --download psc_bl1 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[ 0.0257 ] BR_CID: 0x80012344705DD74C4400000015FF0180
[ 0.0343 ] Sending bct_br
[ 0.0444 ] Sending mb1
[ 0.0451 ] Sending psc_bl1
[ 0.0566 ] Sending bct_mb1
[ 0.0627 ] Generating blob for T23x
[ 0.0644 ] tegrahost_v2 --chip 0x23 0 --generateblob blob.xml blob.bin
[ 0.0647 ] The number of images in blob is 19
[ 0.0652 ] blobsize is 112011313
[ 0.0654 ] Added binary blob_uefi_jetson_with_dtb_aligned_blob_w_bin_sigheader.bin.encrypt of size 3300816
[ 0.1270 ] Added binary blob_pscfw_t234_prod_sigheader.bin.encrypt of size 310768
[ 0.1282 ] Added binary blob_mce_flash_o10_cr_prod_sigheader.bin.encrypt of size 187120
[ 0.1289 ] Added binary blob_tsec_t234_sigheader.bin.encrypt of size 176128
[ 0.1295 ] Added binary blob_applet_t234_sigheader.bin.encrypt of size 279808
[ 0.1301 ] Not supported type: mb2_applet
[ 0.1304 ] Added binary blob_mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt of size 440944
[ 0.1314 ] Added binary blob_xusb_t234_prod_sigheader.bin.encrypt of size 164864
[ 0.1322 ] Added binary blob_nvpva_020_sigheader.fw.encrypt of size 2164640
[ 0.1330 ] Added binary blob_display-t234-dce_sigheader.bin.encrypt of size 12070576
[ 0.1421 ] Added binary blob_nvdec_t234_prod_sigheader.fw.encrypt of size 294912
[ 0.1454 ] Added binary blob_bpmp_t234-TE980M-A1_prod_sigheader.bin.encrypt of size 1027008
[ 0.1468 ] Added binary blob_tegra234-bpmp-3767-0001-3509-a02_with_odm_sigheader.dtb.encrypt of size 263488
[ 0.1479 ] Added binary blob_camera-rtcpu-t234-rce_sigheader.img.encrypt of size 458096
[ 0.1486 ] Added binary blob_adsp-fw_sigheader.bin.encrypt of size 415232
[ 0.1491 ] Added binary blob_spe_t234_sigheader.bin.encrypt of size 270336
[ 0.1496 ] Added binary blob_tos-optee_t234_sigheader.img.encrypt of size 1887312
[ 0.1505 ] Added binary blob_eks_t234_sigheader.img.encrypt of size 9232
[ 0.1510 ] Added binary blob_boot0.img of size 88039424
[ 0.2052 ] Added binary blob_tegra234-p3768-0000+p3767-0001-nv.dtb of size 249505
[ 0.2985 ] tegrarcm_v2 --instance 1-6 --chip 0x23 0 --pollbl --download bct_mem mem_rcm_sigheader.bct.encrypt --download blob blob.bin
[ 0.2989 ] BL: version 1.4.0.4-t234-54845784-e89ea9bc last_boot_error: 0
[ 0.3235 ] Sending bct_mem
[ 0.3327 ] Sending blob
[ 5.6277 ] RCM-boot started
/home/wel/nvidia/Linux_for_Tegra
-
*
- Step 3: Start the flashing process *
-
*
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Timeout
Device failed to boot to the initrd flash kernel. Please retrive the serial log during flashing to debug further.
Cleaning up…
root@wel-22-04-5:/home/wel/nvidia/Linux_for_Tegra#
串口打印信息:
[0075.305] I> MB1: MSS reconfig completed
I> MB2 (version: 0.0.0.0-t234-54845784-22833a33)
I> t234-A01-0-Silicon (0x12347)
I> Boot-mode : RCM BOOT
I> Emulation:
I> Entry timestamp: 0x047d7475
I> Regular heap: [base:0x40040000, size:0x10000]
I> DMA heap: [base:0x273800000, size:0x800000]
I> Task: SE error check
I> Task: Crypto init
I> Task: MB2 Params integrity check
I> Task: Enable CCPLEX WDT 5th expiry
I> Task: ARI update carveout TZDRAM
I> Task: Configure OEM set LA/PTSA values
I> Task: Check MC errors
I> Task: SMMU external bypass disable
I> Task: Enable hot-plug capability
I> Task: Set blob address
I> Task: TZDRAM heap init
I> Task: PSC mailbox init
I> Task: Enable clock for external modules
I> Task: Measured Boot init
I> Task: fTPM silicon identity init
I> fTPM is not enabled.
I> Task: I2C register
I> Task: Map CCPLEX_INTERWORLD_SHMEM carveout
I> Task: Program CBB PCIE AMAP regions
I> Task: Pass DRAM ECC PRL Flag to FSI
I> Task: Load and authenticate registered FWs
I> Task: Load AUXP FWs
I> Successfully register SPE FW load task with MB2 loader
I> Successfully register RCE FW load task with MB2 loader
I> Successfully register DCE FW load task with MB2 loader
I> Unpowergating APE
I> Unpowergate done
I> Successfully register APE FW load task with MB2 loader
I> Skipping FSI FW load
I> Successfully register XUSB FW load task with MB2 loader
I> Successfully register PVA FW load task with MB2 loader
I> spe: Authentication Finalize Done
I> Binary spe loaded successfully at 0x272e00000
I> rce: Authentication Finalize Done
I> Binary rce loaded successfully at 0x272a00000
I> dce: Authentication Finalize Done
I> Binary dce loaded successfully at 0x27a000000
I> ape: Authentication Finalize Done
I> Binary ape loaded successfully at 0x27d800000
I> xusb: Authentication Finalize Done
I> Binary xusb loaded successfully at 0x272f00000
I> pva-fw: Authentication Finalize Done
I> Binary pva-fw loaded successfully at 0x273180000
I> Task: Check MC errors
I> Task: Carveout setup
I> Program remaining OEM carveouts
I> Task: Enable FSI VMON
I> Task: Restore XUSB sec
I> Task: Enable FSI SE clock
I> Task: Initialize SBSA UART CAR
I> Task: Initialize CPUBL Params
I> CPUBL-params @ 0x276000000
I> Task: Prepare eeprom data
E> I2C: slave not found in slaves.
E> I2C: Could not write 0 bytes to slave: 0x00ae with repeat start true.
E> I2C_DEV: Failed to send register address 0x00000000.
E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xae at 0x00000000 via instance 0.
E> eeprom: Retry to read I2C slave device.
E> I2C: slave not found in slaves.
E> I2C: Could not write 0 bytes to slave: 0x00ae with repeat start true.
E> I2C_DEV: Failed to send register address 0x00000000.
E> I2C_DEV: Could not read 256 registers of size 1 from slave 0xae at 0x00000000 via instance 0.
E> eeprom: Failed to read I2C slave device
C> Task 0x0 failed (err: 0x1f1e050d)
E> Top caller module: I2C_DEV, error module: I2C, reason: 0x0d, aux_info: 0x05
I> Busy Spin
哪里出了问题?