cf-543-A.Writing Code-dp完全背包

本文探讨了在有限的Bug数量限制下,如何通过不同人员完成特定行数代码的编写任务,采用动态规划中的完全背包算法解决问题,实现有效分配以达到最大的编写方案组合。

这里写图片描述

题意:

有n个人,要写m行代码,第i个人每写一行会出现ai个bug,每个人可以写任意行,但总bug数不能超过b个,求总方案数

思路:

套用完全背包模板,人即是物品,每个人贡献的重量是ai,贡献的价值是1,总共不超过b个bug即是总重量,即求价值为m且总重量不超过b的全部方案之和
dp[i][j]表示,写第i行,且当前剩余空间为j时的总方案数
状态转移方程:dp[i][j]=(dp[i][j]+dp[i-1][j-a[i] ] )

代码:

#include <iostream>
using namespace std;

long long dp[600][600];        //防止溢出,直接开long long
long long a[600];
int main()
{
    int n,m,b,mod;
    long long ans=0;
    cin>>n>>m>>b>>mod;
    for(int i=1;i<=n;i++)
        cin>>a[i];
    dp[0][0]=1;                    //初始化

    for(int i=1;i<=n;i++)
    {
        if(a[i]>b) continue;
        for(int j=1;j<=m;j++)
        {
            for(int k=a[i];k<=b;k++)
            {
                dp[j][k]=(dp[j][k]+dp[j-1][k-a[i]])%mod;
            }
        }
    }
    for(int i=0;i<=b;i++)              //注意,可能存在a[i]=0的情况,此时可能有b=0,因此最后计算时要考虑进去
        ans=(ans+dp[m][i])%mod;
    cout<<ans<<endl;
    return 0;
}
hi-esbc start spi hw init succ �ol��0_it succ U-Boot 2022.07 (Aug 25 2025 - 19:01:33 +0800) for tiangong1 Watchdog enabled DRAM: 224 MiB �hi-esbc start spi hw init succ �ia��0_it 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 OK In: uart1@10119000 Out: uart1@10119000 Err: uart1@10119000 bootflag verify succ Hard Power-on reset for internal POR circuit timing 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 - ba:03:a1:16:5c:0c eth0: pie bootflag a bootreg 0 bootreg init, set 10 hsan_mac gemac2@2: gemac2@2 link up, Speed: 1000, full multiupg detect bootdelay is 3000 Hit any key to stop autoboot: 0 tiangong1 # 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 /* 擦除 */ tiangong1 # nand erase.chip NAND erase.chip: device 0 whole chip Erasing at 0xffe0000 -- 100% complete. OK /* eabc */ 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 最后的报错是什么?分析一下
08-31
报错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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Ogmx

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值