米尔开发板升级失败

按照米尔开发板教程,用的是Hi3093预制镜像。然后执行hi3093 /tmp # ./hi3093_upgrade.sh 4096 没有出现成功,全程log如下

hi3093 /tmp # ./hi3093_upgrade.sh 4096
-/bin/sh: ./hi3093_upgrade.sh: Permission denied
hi3093 /tmp # mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)
hi3093 /tmp # sh ./hi3093_upgrade.sh 4096
update L0FW…
70+1 records in
70+1 records out
72088 bytes (72 kB, 70 KiB) copied, 0.0153056 s, 4.7 MB/s
70+1 records in
70+1 records out
72088 bytes (72 kB, 70 KiB) copied, 0.0111955 s, 6.4 MB/s
update L1FW…
178+1 records in
178+1 records out
182876 bytes (183 kB, 179 KiB) copied, 0.0300691 s, 6.1 MB/s
178+1 records in
178+1 records out
182876 bytes (183 kB, 179 KiB) copied, 0.0270531 s, 6.8 MB/s
update uboot…
504+1 records in
504+1 records out
516616 bytes (517 kB, 505 KiB) copied, 0.0831492 s, 6.2 MB/s
504+1 records in
504+1 records out
516616 bytes (517 kB, 505 KiB) copied, 0.0796414 s, 6.5 MB/s
erase mmcblkogp…
393216+0 records in
393216+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 72.7896 s, 5.5 MB/s
[ 2759.661574] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.662295] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.662696] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.662791] EXT4-fs error (device mmcblk0gp1): ext4_dirty_inode:5995: inode #105: comm hisi_key.sh: mark_inode_dirty error
[ 2759.663262] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.663350] EXT4-fs error (device mmcblk0gp1): ext4_dirty_inode:5995: inode #106: comm hisi_key.sh: mark_inode_dirty error
[ 2759.664452] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.664545] EXT4-fs error (device mmcblk0gp1): ext4_dirty_inode:5995: inode #758: comm sed: mark_inode_dirty error
[ 2759.671255] EXT4-fs error (device mmcblk0gp1) in ext4_reserve_inode_write:5793: Corrupt filesystem
[ 2759.672811] EXT4-fs error (device mmcblk0gp1): ext4_dirty_inode:5995: inode #14: comm hisi_key.sh: mark_inode_dirty error
[ 2760.663891] jbd2_journal_bmap: journal block not found at offset 2385 on mmcblk0gp1-8
[ 2760.671957] Aborting journal on device mmcblk0gp1-8.
[ 2760.677620] EXT4-fs (mmcblk0gp1): Remounting filesystem read-only
[ 2760.680740] EXT4-fs (mmcblk0gp1): Remounting filesystem read-only
[ 2769.215995] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (
length 1)
[ 2769.236281] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (
length 1)
[ 2769.252575] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (
length 1)
[ 2769.269399] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (
length 1)
[ 2829.286552] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 2829.303292] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2829.322186] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2829.336797] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
393216+0 records in
393216+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 70.842 s, 5.7 MB/s
[ 2889.352432] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 2889.368834] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2889.392471] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2889.406560] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
393216+0 records in
393216+0 records out
402653184 bytes (403 MB, 384 MiB) copied, 72.6861 s, 5.5 MB/s
update Hi3093_ext4fs.img…
86310+1 records in
86310+1 records out
88381975 bytes (88 MB, 84 MiB) copied, 1.02058 s, 86.6 MB/s
86310+1 records in
86310+1 records out
88381975 bytes (88 MB, 84 MiB) copied, 1.04627 s, 84.5 MB/s
86310+1 records in
86310+1 records out
88381975 bytes (88 MB, 84 MiB) copied, 1.0166 s, 86.9 MB/s
Hi3093_ext4fs_cms.bin…
36+0 records in
36+0 records out
36864 bytes (37 kB, 36 KiB) copied, 0.00063328 s, 58.2 MB/s
36+0 records in
36+0 records out
36864 bytes (37 kB, 36 KiB) copied, 0.00063252 s, 58.3 MB/s
36+0 records in
36+0 records out
36864 bytes (37 kB, 36 KiB) copied, 0.000583 s, 63.2 MB/s
hi3093 /tmp # [ 2949.421548] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 2949.441473] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2949.460025] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 2949.475074] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 3009.492649] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 3009.512128] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 3009.529659] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 3009.550315] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 3069.566655] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)
[ 3069.583310] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 3069.599003] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32267: block 3096: comm crond: lblock 0 mapped to illegal pblock 3096 (length 1)
[ 3069.621380] EXT4-fs error (device mmcblk0gp1): ext4_map_blocks:598: inode #32655: block 3502: comm crond: lblock 0 mapped to illegal pblock 3502 (length 1)

hi3093 /tmp #

现在机器卡住下面

U-Boot 2022.07-g2b7327c0 (May 30 2024 - 14:11:22 +0800)hi309x

DRAM: hi309x_pcie_init OK
Boot Strap:0000802A
Reboot Control:00000001
Boot from Area 0(boot_cnt0[1] boot_cnt1[0])
Serial Probe!
66Core: 25 devices, 7 uclasses
MMC:
Loading Environment from MMC… load env from mmc success! num 128
OK
In: serial
Out: serial
Err: serial
Net: eth0: hi309x_gmac

PN=
SN=
Hit any key to stop autoboot: 0
=>
=> setenv ipaddr 192.168.1.123
=> setenv netmask 255.255.255.0
=> setenv gateway 192.168.1.1
=> setenv serverip 192.168.1.111
=> setenv tftp_dtb “tftp ${dtb_load_addr} hi3093.dtb”
=> run tftp_dtb
phy init failed, phy_id = 0xffffffff
Use eth2 ,phy addr is 0x3
Boot gmac[2] init ok!
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘hi3093.dtb’.
Load address: 0x87400000
Loading: #
177.7 KiB/s
done
Bytes transferred = 13518 (34ce hex)
=> run tftp_network_boot
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘hi3093.dtb’.
Load address: 0x87400000
Loading: #
879.9 KiB/s
done
Bytes transferred = 13518 (34ce hex)
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘uImage’.
Load address: 0x87480000
Loading: #################################################################
#################################################################
#################################################################
##########################################
1 MiB/s
done
Bytes transferred = 3470400 (34f440 hex)
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘initrd_boot.cpio.gz’.
Load address: 0xa1480000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################
1 MiB/s
done
Bytes transferred = 5242944 (500040 hex)

Booting kernel from Legacy Image at 87480000 …

Image Name: linux-5.10.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3470336 Bytes = 3.3 MiB
Load Address: 87480000
Entry Point: 87480040
Verifying Checksum … OK

Loading init Ramdisk from Legacy Image at a1480000 …

Image Name: Initramfs Boot
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5242880 Bytes = 5 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
=>

答案内容由AI生成,仅供参考:

总结

  • 主因:升级过程中 eMMC 上的文件系统出现严重错误,导致后续无法正常启动。
  • 次要问题:U-Boot 网络启动时设备树传递失败,可能是启动命令配置问题。
  • 推荐操作:利用 SD 卡备份恢复系统,或参考社区文档通过 TFTP 重新烧写干净的镜像。如果无法恢复,可能需要重新制作并写入正确的 Hi3093_ext4fs.img
点击此处查看详细分析解答

根据您提供的日志和升级过程,问题主要分为两个阶段:升级脚本执行过程中的文件系统损坏,以及U-Boot启动内核时未能找到有效的设备树。结合上下文信息,分析如下:

一、升级过程文件系统损坏

  • 您执行 ./hi3093_upgrade.sh 4096 时,脚本依次更新了 L0FW、L1FW、U-Boot,然后擦写 mmcblk0gp 分区并写入 Hi3093_ext4fs.img
  • 在擦写过程中,内核报告了大量 EXT4-fs error(如 Corrupt filesystemRemounting filesystem read-only),最终文件系统被强制挂载为只读。
  • 这表明升级脚本在写入新镜像时,可能由于分区大小、镜像格式或中断等原因,导致了 eMMC 上的文件系统损坏

已知信息:

  • 知识图谱中记载,Hi3093_ext4fs.img 是 ext4 文件系统镜像,通常用于更新开发板的根文件系统。
  • Hi3093_upgrade.sh 是官方提供的升级脚本,但上述错误提示该脚本执行过程中出现了严重错误,导致系统文件系统不可用。
  • 文档片段 4(“Hi3093开发板上手教学”)提到,执行升级前应准备好 SD 卡进行镜像备份,并上传 OpenUBMC 镜像包 rootfs_BMC.img 并重命名为 Hi3093_ext4fs.img 再执行升级。您的操作基本符合流程,但出现了异常。

二、U-Boot 启动时设备树问题

  • 升级完成后,您尝试通过 TFTP 网络启动,U-Boot 成功加载了 hi3093.dtb(13518 字节)、uImageinitrd_boot.cpio.gz
  • 但内核启动时输出 ERROR: Did not find a cmdline Flattened Device Tree,随后卡住。
  • 说明 U-Boot 虽然下载了设备树文件,但未能将其正确传递给内核,或者内核启动参数未指定设备树地址。

已知信息:

  • hi3093.dtb 是一个设备树 blob 文件,用于描述 Hi3093 开发板的硬件配置。
  • U-Boot 中您设置了 tftp_dtb 命令,并成功运行,但内核仍无法找到有效的设备树。常见原因包括:
    • 内核启动时未正确引用设备树内存地址(通常在 U-Boot 的 bootargsbootm 命令中指定);
    • initrd_boot.cpio.gz 可能与设备树不匹配,或 initrd 内部包含了冲突的设备树信息。

三、建议恢复步骤(基于上下文)

根据知识图谱和文档片段中的信息,您可尝试以下方法:

  1. 使用 SD 卡备份恢复系统

    • 知识图谱中明确提到:SD Card Backup 是推荐的方法,用于保存开发板系统镜像以备恢复。
    • 文档片段 4 也提示在操作前应提前准备 SD 卡进行镜像备份。
    • 如果之前已备份,可将备份镜像写回 eMMC,恢复稳定系统。
  2. 重新执行升级脚本(确保镜像完整)

    • 确认 /tmp 目录下的 Hi3093_ext4fs.img 文件完整且未被损坏(可通过 md5sum 校验)。
    • 升级脚本需要可执行权限(您首次执行提示 Permission denied,后改用 sh ./hi3093_upgrade.sh 4096 是正确的)。但文件系统损坏可能已导致无法正常写入,建议先通过 TFTP 或 SD 卡恢复干净的 eMMC 分区后再尝试。
  3. 检查 U-Boot 网络启动命令

    • 当前 tftp_network_boot 命令可能未包含正确的设备树加载参数。您可以手动加载内核和设备树:
      tftp 0x87400000 hi3093.dtb
      tftp 0x87480000 uImage
      tftp 0xa1480000 initrd_boot.cpio.gz
      bootm 0x87480000 0xa1480000 0x87400000
      
    • 或参考社区指南(如 Community Hi3093 Development Board Onboarding Guide)中的标准启动流程。
  4. 社区资源

    • 知识图谱中记录了 Community Hi3093 Development Board Onboarding Guide米尔电子Hi3093开发板调试手册,这些文档应包含详细的启动步骤和故障恢复方法。鉴于当前系统已损坏,建议优先根据上述手册通过 TFTP 或串口重新烧写完整镜像。

总结

  • 主因:升级过程中 eMMC 上的文件系统出现严重错误,导致后续无法正常启动。
  • 次要问题:U-Boot 网络启动时设备树传递失败,可能是启动命令配置问题。
  • 推荐操作:利用 SD 卡备份恢复系统,或参考社区文档通过 TFTP 重新烧写干净的镜像。如果无法恢复,可能需要重新制作并写入正确的 Hi3093_ext4fs.img

tftp都上传了对应的文件了 然后再执行一下 run_linux 看看是否能够启动呢

按照这样执行

tftp 0x87400000 hi3093.dtb
tftp 0x87480000 uImage
tftp 0xa1480000 initrd_boot.cpio.gz
bootm 0x87480000 0xa1480000 0x87400000

现在卡住这里

尝试一下这个流程

setenv tftp_dtb “tftp ${dtb_load_addr} hi3093.dtb”

run tftp_dtb # 下载dtb文件

run tftp_network_boot # 执行之后,需要确定已下载

run run_linux # 执行此步后,会自动启动系统

你这个问题看起来是dtb不配套。或者你试一下不tftp dtb

Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘hi3093.dtb’.
Load address: 0x87400000
Loading: #
776.4 KiB/s
done
Bytes transferred = 13518 (34ce hex)
=> run tftp_network_boot
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘hi3093.dtb’.
Load address: 0x87400000
Loading: #
879.9 KiB/s
done
Bytes transferred = 13518 (34ce hex)
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘uImage’.
Load address: 0x87480000
Loading: #################################################################
#################################################################
#################################################################
##########################################
1 MiB/s
done
Bytes transferred = 3470400 (34f440 hex)
Using hi309x_gmac device
TFTP from server 192.168.1.111; our IP address is 192.168.1.123
Filename ‘initrd_boot.cpio.gz’.
Load address: 0xa1480000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################
1 MiB/s
done
Bytes transferred = 5242880 (500000 hex)

Booting kernel from Legacy Image at 87480000 …

Image Name: linux-5.10.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3470336 Bytes = 3.3 MiB
Load Address: 87480000
Entry Point: 87480040
Verifying Checksum … OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
=> run run_linux

Booting kernel from Legacy Image at 87480000 …

Image Name: linux-5.10.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3470336 Bytes = 3.3 MiB
Load Address: 87480000
Entry Point: 87480040
Verifying Checksum … OK

Flattened Device Tree blob at 87400000

Booting using the fdt blob at 0x87400000
Loading Kernel Image
Using Device Tree in place at 0000000087400000, end 00000000874064cd
fdt_fix_memory_prop: vce_flag is 0 (SYSCTRL_INITIAL_INF: 0xadefe7ff)
bootNOTICE: Before BL31 init mmu
NOTICE: ddr_size=0x3
NOTICE: BL31 init mmu done
NOTICE: BL31: v0.00:0
NOTICE: BL31: Built : 14:11:59, 14:11:59
NOTICE: fiq init done !
Uncompressing… done, booting…
[I][00b2]: 0788 0x00000080 0x00000001 0xfffffff9 0x739cf3af
[I][0021]: 0141 0x00000000 0x00000048 0x0823e800 0x082377d8
[I][00b1]: 0210 0x00000005 0x00000006 0x00000004 0x08711000
[I][009f]: 0839 0x00000005 0x00000006 0x00000004 0x00000001
[W][009f]: 0883 0x00000000 0x0823e544 0x00000000 0x00000002
[W][009f]: 0963 0x00000002 0x0823e544 0x00000000 0x00000002
[W][009f]: 1044 0xffffffea 0x00000006 0x00000004 0x00000001
[W][009f]: 0883 0x00000000 0x0823e544 0x00000000 0x00000002
[W][009f]: 0963 0x00000002 0x0823e544 0x00000000 0x00000002
[W][009f]: 1050 0xffffffea 0x00000006 0x00000004 0x00000001
[I][009a]: 0298 0xe000e114 0x00000000 0x0820625b 0x00000048
[I][00b2]: 1149 0x00000000 0x0872b000 0x08710000 0x08711000
[I][00a5]: 0027 0x0823e734 0x00000002 0x0823b03c 0x00000000
[I][00a5]: 0027 0x0823e764 0x00000000 0x0823e800 0x0823b2bc
[I][00b2]: 0631 0x00000000 0x0872b000 0x08710000 0x00000000
[I][00b2]: 1178 0x00000000 0x0872b000 0x08710000 0x00000000
[I][00b2]: 1259 0x00000000 0x0875e000 0x08536000 0x00000048
[I][00b2]: 1262 0x00000001 0x0875e000 0x08536000 0x00000048
[I][00b2]: 1262 0x00000002 0x0875e000 0x08536000 0x00000048
[I][00a5]: 0027 0x0823e74c 0x00000003 0x0823b03c 0x00000001
[I][00b2]: 1262 0x00000003 0x0875e000 0x08536000 0x00000048
[I][00b2]: 1262 0x00000004 0x0875e000 0x08536000 0x00000048
[I][00b2]: 1284 0x00060006 0x0875e000 0x08536000 0x00000048
Serial Probe!
66

U-Boot 2022.07-g2b7327c0 (May 30 2024 - 14:11:22 +0800)hi309x

DRAM: hi309x_pcie_init OK
Boot Strap:0000802A
Reboot Control:00000001
Boot from Area 1(boot_cnt0[1] boot_cnt1[1])
Serial Probe!
66Core: 25 devices, 7 uclasses
MMC:
Loading Environment from MMC… load env from mmc success! num 128
OK
In: serial
Out: serial
Err: serial
Net: eth0: hi309x_gmac

PN=
SN=
Hit any key to stop autoboot: 0
blk_probe
detect ext4img info: block cnt:2604332616,block size:140737488355328
log2blksz 0

停住这里了

你卡住的这个点,我也没遇见过。你先尝试恢复到openeuler系统后,再进行烧录尝试

感觉不太正常,是不是前面分区有误?

当时分区以后,也做过认真检查了。也按照说明做了格式化。

后面是恢复到openeuler系统后又来一遍吗?

恢复openeuler系统的时候失败了,准备返厂了

我这边也想尝试下恢复openeuler,您那边方便说下操作步骤吗?
我看米尔软件开发教程里面说要拨SW2,但我拨了后没什么反应

Hi3093开发板上手教学 | openUBMC 这个帖子上有恢复的步骤

这个我看到了
第一步是进到SPI下,我进不去

如果你拨码确认没问题的话,那有可能那个芯片损坏了吧,得找客服了

可以拍一下你设置为SPI启动拨码开关的照片吗?

你这拨码错了啊,spi应该是123都朝上,4朝下。
emmc是13朝上,24朝下,你现在这个状态两个都对不上

1 个赞

spi 是从TF卡启动吗?


这里面的flash吧,默认也没给你TF卡啊