xavier nx刷机后SMD分区损坏问题
1. 前言
SMD分区已经损坏。
我不确定损坏的根本原因是什么,
但我认为全刷机应该可以解决这个问题
root@ws-nxcore:/etc/waggle# nvbootctrl dump-slots-info
primary SMD is corrupted!
secondary SMD is corrupted!
# nvbootctrl get-number-slots
primary SMD is corrupted!
secondary SMD is corrupted!
-5
root@ws-nxcore:~# nvbootctrl get-suffix 0
root@ws-nxcore:~# nvbootctrl get-suffix 1
_b
我不能100%确定这是什么时候开始发生的
(因为我不经常检查SMD分区)
但我相信是在我开始使用./nvmassflashgen.sh脚本开始生成MFI构建时。
提供给./nvmassflashgen.sh的BOARDID等参数可能与此有关吗?
我一直在想,对于一个非devkit的Xavier NX,正确的值应该是什么。
README_Massflash.txt文件指定为jetson-xavier-nx-devkit-emmc他们应该是:
BOARDID=3668
BOARDSKU=0001
FAB=100
BOARDREV=N/A
因为我使用的是ConnectTech Photon载波板,我选择了不同的值:
BOARDID="NGX003" BOARDSKU="0000" FAB="000" \
BOARDREV="E.0" FUSELEVEL="fuselevel_production" \
./nvmassflashgen.sh waggle_photon mmcblk0p1
然而,试图恢复系统执行一个完整的flash
(sudo ./flash.sh cti/xavier-nx/photon mmcblk0p1)
没有解决我的问题。
我得到类似的错误:
jswantek@jswantek-desktop:~$ nvbootctrl dump-slots-info
Fail to open metadata file
Init SMD partition failed!
Fail to open metadata file
jswantek@jswantek-desktop:~$ nvbootctrl get-number-slots
Fail to open metadata file
Init SMD partition failed!
Fail to open metadata file
-5
jswantek@jswantek-desktop:~$ nvbootctrl get-suffix 0
Fail to open metadata file
Init SMD partition failed!
jswantek@jswantek-desktop:~$ nvbootctrl get-suffix 1
Fail to open metadata file
Init SMD partition failed!
_b
2. 检查方向
(1)是否启用了Bootloader更新和冗余功能吗?
可参考开发人员指南,Bootloader更新和冗余。
(2)检查EEPROM
此外,还有Jetson模块EEPROM布局,用于保存板信息,可以检查如下,
例如:$ i2cump -f -y 0 0x50
3. 调试记录
成功地使用了修改过的smd_info.cfg和slot_metadata.bin启用A/B支持和冗余:
(1)用下面的命令创建slot_metadata.bin
./nv_smd_generator smd_info.cfg slot_metadata.bin
(2)将slot_metadata.bin放入该目录
Linux_for_Tegra/bootloader/on my x86 flashing machine
(3)./flash.sh
(4)然后我看到冗余被启用了
root@nx-sample-token:~# nvbootctrl dump-slots-info
magic:0x43424e00, version: 3 features: 3 num_slots: 2
slot: 0, priority: 15, suffix: _a, retry_count: 7, boot_successful: 1
slot: 1, priority: 14, suffix: _b, retry_count: 7, boot_successful: 1
(5)然后我就可以执行这样的命令
nvbootctrl set-active-boot-slot 1, nvbootctrl dump-slots-info, nv_update_engine -d(to disable redundancy), nvbootctrl set-active-boot-slot 0, nv_update_engine -v, nv_update_engine -e
在上述步骤和以下步骤之间的某个时刻,
我的SMD出现了故障,我无法解决这个问题。
我现在执行的步骤,以启用A/B支持和引导加载程序冗余如下:
(1)创建smd_info.cfg,使用引导加载程序启用A/B支持
(2)将smd_info.cfg复制到我的Linux_for_Tegra/引导加载程序中
(3)刷机
对于i2cdump,谢谢您提供的信息。我不知道还有一个小型eeprom设备。
我执行了转储,它输出如下内容,稍后我将更深入地研究这些内容。
@jswantek-desktop:~$ i2cdump -f -y 0 0x50
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 01 00 fc 00 54 0e 01 00 02 47 00 00 00 00 00 00 ?.?.T??.?G......
10: 00 00 00 00 36 39 39 2d 31 33 36 36 38 2d 30 30 ....699-13668-00
20: 30 31 2d 32 30 30 20 47 2e 30 00 00 00 00 00 00 01-200 G.0......
30: 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff a4 a0 05 2d b0 48 31 34 32 31 33 32 ....???-?H142132
50: 30 30 30 34 36 34 39 00 00 00 00 00 00 00 00 00 0004649.........
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 4e 56 43 42 1c 00 4d 31 00 00 ......NVCB?.M1..
a0: ff ff ff ff ff ff ff ff ff ff ff ff a4 a0 05 2d ............???-
b0: b0 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?H..............
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ee .........
想缩小问题范围,可以从目标设备的/etc/nv_boot_control.conf中查看设备规格信息
sudo FAB=400 BOARDID=2888 FUSELEVEL=fuselevel_production ./build_l4t_bup.sh jetson-xavier mmcblk0p1例如:$ sudo FAB=400 BOARDID=2888 FUSELEVEL=fuselevel_production ./build_l4t_bup.sh jetson-xavier mmcblk0p1 ./
测试结果
root@ws-nxcore:~# cat /etc/nv_boot_control.conf
TNSPEC 3668-200-0001-G.0-1-0-waggle_photon-mmcblk0p1
TEGRA_CHIPID 0x19
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1
执行build_l4t_bup.sh
find bootloader/ | grep bl_update
$
$ sudo FAB=200 BOARDID=3668 FUSELEVEL=fuselevel_production ./build_l4t_bup.sh waggle_photon mmcblk0p1
...
Payloads saved to "/home/jswantek/workspace/custom_builds/eeprom07/full/bootloader/payloads_t19x/"
当尝试flash这些时:
root@ws-nxcore:/opt/ota_package# ls -la bl_update_payload
-rw-r--r-- 1 root root 47658847 Mar 8 22:08 bl_update_payload
root@ws-nxcore:~# nv_update_engine --install
Nvidia A/B-Redundancy Update tool Version 1.2
primary SMD is corrupted!
secondary SMD is corrupted!
A/B has been disabled. Need to enable A/B.
waggle_photon.conf文件的内容:
source "${LDK_DIR}/p3668.cti-base.common";
DTB_FILE=tegra194-xavier-nx-cti-NGX003-WAGGLE-WS.dtb;
EMMC_CFG=flash_waggle_l4t_t194_spi_emmc_p3668.xml;
EMMCSIZE=17179869184;
ROOTFSSIZE=10GiB;
唯一的变化是tegra194-xavier-nx-cti-NGX003-WAGGLE-WS。DTB文件与flash_waggle_l4t_t194_spi_emmc_p3668.xml比较如下
@ubuntu-laptop:~/workspace/custom_builds/eeprom07/full/bootloader/t186ref/cfg$ diff flash_waggle_l4t_t194_spi_emmc_p3668.xml flash_l4t_t194_spi_emmc_p3668.xml
628,638d627
< <partition name="WAGGLE-RPI" type="data">
< <allocation_policy> sequential </allocation_policy>
< <filesystem_type> basic </filesystem_type>
< <size> 4294967296 </size>
< <file_system_attribute> 0 </file_system_attribute>
< <allocation_attribute> 0x8 </allocation_attribute>
< <align_boundary> 4096 </align_boundary>
< <percent_reserved> 0 </percent_reserved>
< <filename> waggle-rpi.img </filename>
< <description> **Required.** Contains the Waggle Raspberry PI PXE boot filesystem </description>
< </partition>
现在看一下p3668.cti-base.common文件与p3668.conf.common文件中的增量比较有趣
@ubuntu-laptop:~/workspace/custom_builds/eeprom07/full$ diff p3668.conf.common p3668.cti-base.common
1c1
< # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
---
> # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
42,55d41
< # Process_board_version:
< # Trigger to read the board id and board version from EEPROM on main board.
< # undef for non eeprom boards.
< process_board_version()
< {
< local board_id="${1}";
< local board_version="${2}";
< local board_sku="${3}";
< local board_revision="${4}";
< local chiprev="${5}";
<
< print_board_version "${board_id}" "${board_version}" "${board_sku}" "${board_revision}" "${chiprev}"
< }
<
101c87
< DTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
---
> #DTB_FILE=tegra194-p3668-all-p3509-0000.dtb;
141c127
< PINMUX_CONFIG="tegra19x-mb1-pinmux-p3668-a01.cfg";
---
> PINMUX_CONFIG="tegra19x-xavier-nx-cti-mb1-pinmux-p3668-a01.cfg";
143c129
< PMC_CONFIG="tegra19x-mb1-padvoltage-p3668-a01.cfg";
---
> PMC_CONFIG="tegra19x-mb1-padvoltage-p3668-0001-a00.cfg";
158,159d143
< OTA_BOOT_DEVICE="/dev/mtdblock0";
< OTA_GPT_DEVICE="/dev/mtdblock0";
还注意到tegra19x-mb1-padvoltage-p3668-0001-a00.cfg不存在。
假设这是ConnectTech p3668.cti-base.common文件中的一个错误,
值应该是PMC_CONFIG="tegra19x-mb1- padvolage -p3668-a01.cfg";
似乎我能够正确地生成bl_update_payload,但仍然无法刷机
4. 修改waggle_photon.conf
在waggle_photon.conf文件中做了一个更改,
以确保PMC_CONFIG变量被正确设置,
并确保OTA_BOOT_DEVICE和OTA_GPT_DEVICE被设置。
source "${LDK_DIR}/p3668.conf.common";
DTB_FILE=tegra194-xavier-nx-cti-NGX003-WAGGLE-WS.dtb;
EMMC_CFG=flash_waggle_l4t_t194_spi_emmc_p3668.xml;
EMMCSIZE=17179869184;
ROOTFSSIZE=10GiB;
# WORK-AROUND: bring-in CTI specific changes from p3668.cti-base.common (compared to p3668.conf.common)
PINMUX_CONFIG="tegra19x-xavier-nx-cti-mb1-pinmux-p3668-a01.cfg";
SMD分区看起来固定了
root@ws-nxcore:~# nvbootctrl dump-slots-info
magic:0x43424e00, version: 3 features: 1 num_slots: 2
slot: 0, priority: 15, suffix: _a, retry_count: 7, boot_successful: 1
slot: 1, priority: 14, suffix: _b, retry_count: 7, boot_successful: 1
看到/etc/nv_boot_control.conf的内容看起来像
TEGRA_OTA_BOOT_DEVICE和TEGRA_OTA_GPT_DEVICE有不同的值
Before:
root@ws-nxcore:~# cat /etc/nv_boot_control.conf
TNSPEC 3668-200-0001-G.0-1-0-waggle_photon-mmcblk0p1
TEGRA_CHIPID 0x19
TEGRA_OTA_BOOT_DEVICE /dev/mmcblk0boot0
TEGRA_OTA_GPT_DEVICE /dev/mmcblk0boot1
After
root@ws-nxcore:~# cat /etc/nv_boot_control.conf
TNSPEC 3668-200-0001-G.0-1-0-waggle_photon-mmcblk0p1
TEGRA_CHIPID 0x19
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0
- 分享
- 举报
-
2021-04-23 15:54:21
-
浏览量:5536次2021-07-20 13:48:35
-
浏览量:5969次2021-06-01 18:04:54
-
浏览量:6415次2021-06-02 16:59:22
-
浏览量:5907次2021-05-28 13:52:17
-
浏览量:10853次2021-05-06 16:22:01
-
2021-05-06 16:03:00
-
浏览量:5202次2021-07-09 15:23:33
-
浏览量:5292次2021-07-09 15:20:08
-
浏览量:6230次2021-07-09 15:17:28
-
浏览量:7450次2021-06-09 14:29:23
-
浏览量:7941次2021-06-04 16:25:58
-
浏览量:8590次2021-05-14 14:43:43
-
浏览量:1261次2024-02-02 10:51:53
-
浏览量:5252次2020-09-30 15:05:19
-
浏览量:7869次2021-06-09 14:49:23
-
浏览量:9457次2021-05-26 14:17:15
-
浏览量:9412次2021-04-27 17:56:41
-
浏览量:7420次2021-05-11 17:51:48
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
free-jdx
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明