uboot-Invalid boot device

这里写图片描述
这里写图片描述
leesagacious

报错1: /* 擦除 */ tiangong1 # nand erase.chip NAND erase.chip: device 0 whole chip Erasing at 0xffe0000 -- 100% complete. OK /* esbc */ tiangong1 # bootmenu *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_esbc.bin'. Load address: 0x86000000 Loading: ################ 6.7 MiB/s done Bytes transferred = 77004 (12ccc hex) Erasing 0x00000000 ... 0x0007ffff (4 eraseblock(s)) Writing 77004 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x13000 /* uboot.bin */ tiangong1 # *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_uboot.bin'. Load address: 0x86000000 Loading: ################################################################# ################################ 7.9 MiB/s done Bytes transferred = 495132 (78e1c hex) Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495132 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79000 Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495132 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79000 /* reset */ tiangong1 # re resetting ... reset_cpu hi-esbc start boot_info.value a0000..... boot mode 2...... match board TG1C0D8_TYPE1, board_id_val 412121 sec init spi hw init succ �up��0_ boot_info.value a0000..... flash boot mode ...... hi_nand_probe...... Nand Spec : Block[20000B] Page[800B] OOB[40B] page_shift[0b] read_addr_cycle[05] read_if_type[00] read_dummy_num[01] read_cmd[03] uboot_region_size [100000]...... This boot is main region 0 area...... nand read oob: offset 0x80000 nand read: offset 0x80000 size 0x1000 to addr 0x17512cd0 nand read oob: offset 0x80000 nand read oob: offset 0x80000 nand read: offset 0x81000 size 0x100 to addr 0x17513cd0 nand read oob: offset 0x80000 nand read oob: offset 0x80000 nand read: offset 0x81100 size 0x1bf0 to addr 0x17513dd0 normal boot...... no secure boot, dont check sign...... no secure boot, dont check code image..... start ddrinit from addr 17513dd0 ddrinit finish This boot is main region 0 area...... nand read oob: offset 0x80000 nand read oob: offset 0x80000 nand read: offset 0x82cf0 size 0x1000 to addr 0x80100f00 nand read oob: offset 0x80000 nand read oob: offset 0x80000 nand read: offset 0x83cf0 size 0x100 to addr 0x80101f00 nand read oob: offset 0x80000 nand read oob: offset 0x80000 nand read oob: offset 0xa0000 nand read oob: offset 0xc0000 nand read oob: offset 0xe0000 nand read: offset 0x83df0 size 0x7502c to addr 0x80102000 dont decrypt boot code...... no secure boot, dont check sign...... no secure boot, dont check code image..... check nvcnt...... check version start...... There is no version in efuse dice not support...... subkey_id = 0x00 esbc_mask = 0x01 bl_nvcnt = 0x01 start to uboot...... U-Boot 2022.07 (Aug 28 2025 - 11:08:19 +0800) for tiangong1 Watchdog enabled DRAM: 224 MiB Core: 139 devices, 17 uclasses, devicetree: separate NAND: device found, Manufacturer ID: 0xc8, Chip ID: 0x92 GigaDevice GD5F2GM7UEYIGR GigaDevice GD5F2GM7UEYIGR 256 MiB, MLC, erase size: 128 KiB, page size: 2048, OOB size: 128 256 MiB Loading Environment from NAND... Scanning device for bad blocks *** Warning - bad CRC, using default environment In: uart1@10119000 Out: uart1@10119000 Err: uart1@10119000 invalid bootflag, using default Saving Environment to NAND... Erasing redundant NAND... Erasing at 0x360000 -- 100% complete. Writing to redundant NAND... OK OK Reset Info: Uboot reset cmd to reset Net: lsw_dp lsw_dp: lsw_dp probe succ lsw_pfe lsw_pfe: get reset bulk failed lsw_pfe lsw_pfe: lsw_pfe probe succ hsan_mac gemac0@0: gemac0@0 probe succ mdio_bus mdio0@0: mdio_register mdio0@0 mdio_bus mdio0@0: mdio0@0 probe succ Genius Phy hwVer:0x20669a22 fwVer:0x6e01 hsan_mac gemac1@1: gemac1@1 probe succ hsan_mac gemac2@2: gemac2@2 probe succ hsan_mac gemac3@3: gemac3@3 probe succ hsan_mac gemac@8: gemac@8 probe succ mdio_bus mdio1@1: mdio_register mdio1@1 mdio_bus mdio1@1: mdio1@1 probe succ Could not get PHY for mdio1@1: addr 1 hsan_mac gemac@8: gemac@8 no phy device hsan_pie pie: pie probe succ Warning: pie (eth0) using random MAC address - 5a:60:6c:f7:b9:c3 eth0: pie bootflag a bootreg 10 hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full multiupg detect bootdelay is 3000 Hit any key to stop autoboot: 0 /* uboot */ tiangong1 # bootmenu *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_uboot.bin'. Load address: 0x86000000 Loading: ################################################################# ################################ 7.7 MiB/s done Bytes transferred = 495132 (78e1c hex) Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495132 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79000 Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495132 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79000 /* reset */ tiangong1 # re resetting ... reset_cpu hi-esbc start boot_info.value a0000..... boot mode 2...... match board TG1C0D8_TYPE1, board_id_val 412121 sec init spi hw init succ �oo��0_ boot_info.value a0000..... flash boot mode ...... hi_nand_probe...... Nand Spec : Block[20000B] Page[800B] OOB[40B] page_shift[0b] read_addr_cycle[05] read_if_type[00] read_dummy_num[01] read_cmd[03] uboot_region_size [100000]...... This boot is main region 0 area...... nand read oob: offset 0x80000 nand read: offset 0x80000 size 0x1000 to addr 0x17512cd0 [err] ECC error in page_addr: 0x80000, flash_status 00 nand read fail at 0x%08x Nand read from offset 0x80000 failed 1879048192 flash read ddrinit head [80000] fail...... flash boot fail...... hi-esbc start fail 70000000 hi-esbc start boot_info.value a0000..... boot mode 2...... match board TG1C0D8_TYPE1, board_id_val 412121 sec init spi hw init succ �e ��0_ boot_info.value a0000..... flash boot mode ...... hi_nand_probe...... Nand Spec : Block[20000B] Page[800B] OOB[40B] page_shift[0b] read_addr_cycle[05] read_if_type[00] read_dummy_num[01] read_cmd[03] uboot_region_size [100000]...... This boot is standby region 0 area...... nand read oob: offset 0x180000 nand read: offset 0x180000 size 0x1000 to addr 0x17512cd0 [err] ECC error in page_addr: 0x180000, flash_status 00 nand read fail at 0x%08x Nand read from offset 0x180000 failed 1879048192 flash read ddrinit head [180000] fail...... flash boot fail...... hi-esbc start fail 70000000 hi-esbc start boot_info.value a0000..... boot mode 2...... match board TG1C0D8_TYPE1, board_id_val 412121 sec init spi hw init succ �e ��0_ boot_info.value a0000..... flash boot mode ...... hi_nand_probe...... Nand Spec : Block[20000B] Page[800B] OOB[40B] page_shift[0b] read_addr_cycle[05] read_if_type[00] read_dummy_num[01] read_cmd[03] uboot_region_size [100000]...... This boot is main region 0 area...... nand read oob: offset 0x80000 nand read: offset 0x80000 size 0x1000 to addr 0x17512cd0 [err] ECC error in page_addr: 0x80000, flash_status 00 nand read fail at 0x%08x Nand read from offset 0x80000 failed 1879048192 flash read ddrinit head [80000] fail...... flash boot fail...... hi-esbc start fail 70000000 报错2: /* 擦除 */ tiangong1 # mtd erase nand0 Erasing 0x00000000 ... 0x0fffffff (2048 eraseblock(s)) attempt to erase a bad block at page 0x00007380 Skipping bad block at 0x039c0000 /* esbc */ tiangong1 # bootmenu *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_esbc.bin'. Load address: 0x86000000 Loading: ########### 6.6 MiB/s done Bytes transferred = 55420 (d87c hex) Erasing 0x00000000 ... 0x0007ffff (4 eraseblock(s)) Writing 55420 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0xe000 /* uboot */ tiangong1 # *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_uboot.bin'. Load address: 0x86000000 Loading: ################################################################# ################################ 7.8 MiB/s done Bytes transferred = 495892 (79114 hex) Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495892 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79800 Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495892 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79800 /* reset */ tiangong1 # re resetting ... reset_cpu hi-esbc start spi hw init succ �un�� hit succ U-Boot 2022.07 (Aug 25 2025 - 19:01:33 +0800) for tiangong1 Watchdog enabled DRAM: 224 MiB Core: 140 devices, 17 uclasses, devicetree: separate NAND: device found, Manufacturer ID: 0xc8, Chip ID: 0x92 GigaDevice GD5F2GM7UEYIGR GigaDevice GD5F2GM7UEYIGR 256 MiB, MLC, erase size: 128 KiB, page size: 2048, OOB size: 128 256 MiB Loading Environment from NAND... Scanning device for bad blocks Bad eraseblock 462 at 0x0000039c0000 *** Warning - bad CRC, using default environment In: uart1@10119000 Out: uart1@10119000 Err: uart1@10119000 invalid bootflag, using default Saving Environment to NAND... Erasing redundant NAND... Erasing at 0x360000 -- 100% complete. Writing to redundant NAND... OK OK Reset Info: Uboot reset cmd to reset Net: lsw_dp lsw_dp: lsw_dp probe succ lsw_pfe lsw_pfe: lsw_pfe probe succ hsan_mac gemac0@0: gemac0@0 probe succ mdio_bus mdio0@0: mdio_register mdio0@0 mdio_bus mdio0@0: mdio0@0 probe succ Genius Phy hwVer:0x20669a22 fwVer:0x6e01 hsan_mac gemac1@1: gemac1@1 probe succ hsan_mac gemac2@2: gemac2@2 probe succ hsan_mac gemac3@3: gemac3@3 probe succ hsan_mac gemac@8: gemac@8 probe succ mdio_bus mdio1@1: mdio_register mdio1@1 mdio_bus mdio1@1: mdio1@1 probe succ Could not get PHY for mdio1@1: addr 1 hsan_mac gemac@8: gemac@8 no phy device hsan_pie pie: pie probe succ Warning: pie (eth0) using random MAC address - 96:a1:cb:b9:1c:36 eth0: pie bootflag a bootreg 10 hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full multiupg detect bootdelay is 3000 Hit any key to stop autoboot: 0 /* uboot */ tiangong1 # bootmenu *** U-Boot Boot Menu *** update rootfs.rw update rootfs.ro update fwk update kernel.images update uboot update esbc reboot uboot update fwk.squashfs U-Boot console Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full Using pie device TFTP from server 192.168.0.10; our IP address is 192.168.0.1 Filename 'hi_uboot.bin'. Load address: 0x86000000 Loading: ################################################################# ################################ 7.3 MiB/s done Bytes transferred = 495892 (79114 hex) Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495892 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79800 Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s)) Writing 495892 byte(s) at offset 0x00000000 Size not on a page boundary (0x800), rounding to 0x79800 /* reset */ tiangong1 # re resetting ... reset_cpu hi-esbc start spi hw init succ hi-esbc start fail 70000000 hi-esbc start spi hw init succ hi-esbc start fail 70000000 hi-esbc start spi hw init succ �i ��pihi-esbc start fail 70000000 hi-esbc start spi hw init succ 以上两个报错是一样的吗?如果一样,告诉我可能的原因
最新发布
09-02
从你提供的两个报错日志来看,**这两个报错虽然表现形式不同,但核心问题是一致的:U-Boot 在启动过程中无法正确读取 NAND Flash 中的 ESBC(Early Secure Boot Code)和 U-Boot 映像,导致系统无法正常启动。** --- ### 报错分析 #### **报错1 分析** - U-Boot 成功通过 TFTP 加载 `hi_uboot.bin` 并写入 NAND Flash。 - 但在重启后,系统尝试从 NAND 读取 U-Boot 映像时出现 **ECC 错误**: ``` [err] ECC error in page_addr: 0x80000, flash_status 00 nand read fail at 0x%08x Nand read from offset 0x80000 failed 1879048192 ``` - 这说明 NAND Flash 在指定地址读取时出现了 **数据校验失败**,可能是数据写入不完整、写入位置错误、NAND 坏块、或 ECC 配置问题。 - 系统尝试从备用区域(`0x180000`)读取,也失败了。 #### **报错2 分析** - 在擦除 NAND 时出现坏块提示: ``` attempt to erase a bad block at page 0x00007380 Skipping bad block at 0x039c0000 ``` - 系统加载 `hi_uboot.bin` 后,重启时直接卡在 ESBC 阶段: ``` hi-esbc start fail 70000000 ``` - 说明 ESBC 映像本身可能没有正确写入,或者写入的位置不对,导致系统无法进入 U-Boot--- ### 共同问题总结 | 项目 | 报错1 | 报错2 | 共同点 | |------|-------|-------|--------| | NAND ECC 错误 | ✅ | ❌ | ✅ | | NAND 坏块问题 | ❌ | ✅ | ✅ | | ESBC 启动失败 | ✅ | ✅ | ✅ | | U-Boot 启动失败 | ✅ | ✅ | ✅ | 这两个日志的根本问题都在于 **ESBC 或 U-Boot 映像未能正确写入 NAND Flash,或者写入后无法被正确读取**。 --- ### 可能原因 1. **NAND Flash 存在坏块** - 日志中出现跳过坏块的提示(`Skipping bad block at 0x039c0000`),这可能导致关键启动映像被写入坏块区域,从而无法读取。 - NAND Flash 的坏块分布可能没有被 U-Boot 正确识别或跳过。 2. **映像写入地址错误** - 写入 U-Boot 和 ESBC 的地址可能与系统期望的启动地址不一致。 - 比如 U-Boot 期望从 `0x80000` 读取映像,但实际写入位置可能不对。 3. **映像文件损坏或不兼容** - 上传的 `hi_uboot.bin` 或 `hi_esbc.bin` 文件本身可能损坏,或者不是为当前硬件设计的版本。 - 文件大小与 NAND 页大小不匹配,导致 ECC 校验失败。 4. **ECC 配置错误** - NAND 控制器的 ECC 配置不匹配,导致读取时无法正确解码数据。 5. **NAND Flash 类型识别错误** - U-Boot 可能未正确识别 NAND Flash 的类型(页大小、块大小等),导致写入/读取逻辑错误。 6. **烧写命令使用不当** - 使用的烧写命令可能没有正确对齐 NAND 页边界或块边界,导致数据写入不完整。 --- ### 建议解决方案 1. **检查 NAND Flash 的坏块表** - 使用 `nand bad` 命令查看当前 NAND Flash 的坏块列表。 - 确保关键映像(ESBC、U-Boot)不写入坏块。 2. **确认映像写入地址** - 查阅芯片手册或 U-Boot 配置,确认 ESBC 和 U-Boot 的正确写入地址。 - 例如:ESBC 通常写入 `0x00000000`,U-Boot 写入 `0x80000`。 3. **检查映像文件** - 使用 `md` 命令在内存中查看加载的映像是否正确。 - 比较文件大小与 NAND 页大小是否匹配。 4. **使用 `nand write` 命令并确保对齐** - 示例: ```bash tftp 0x86000000 hi_uboot.bin nand erase 0x80000 0x100000 nand write 0x86000000 0x80000 0x78e1c ``` 5. **检查 NAND ECC 配置** - 查看 U-Boot 配置项(如 `CONFIG_MTD_NAND_ECC_SOFT`)是否与硬件匹配。 - 检查 NAND 控制器寄存器配置。 6. **更新 U-Boot 或 NAND 驱动** - 如果是 NAND 驱动兼容性问题,尝试更新 U-Boot 版本或修改 NAND 驱动配置。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值