flashcp: verification mismatch at 0x0

本文探讨了在嵌入式系统中遇到的Flash写保护问题,特别是在更换MX25L12835F和W25Q128JV型号后,由于固件不匹配导致的写入失败现象。分析了写保护机制,包括电压阈值、自动写入禁用及软件硬件写保护,并提供了解决方案。

# flashcp rootfs.bin   /dev/mtd3

flashcp: verification mismatch at 0x0

 

# flashcp  -v  rootfs.bin  /dev/mtd3

Erasing block: 75/75 (100%)

Writing kb: 4745/4745 (100%)

Verifying kb: 0/4745 (0%) flashcp: verification mismatch at 0x0

 

Flash_eraseall 擦除很快  而且擦除不了

uboot里面烧写,提示可以烧成功了,但是实际没有成功!

原因:之前以为是flash 坏了,更换flash 0k 后,用一段时间后也会出现flash写保护,flash的WP引脚正常电压为0.5V,写保护后电压为0.25V,最后发现烧的boot固件里面的flash型号不匹配!

MX25L12835F和W25Q128JVSQ

W25Q128JV写保护功能:

 当VCC低于阈值时,设备复位

·上电后禁用延时写

·写入启用/禁用指令以及擦除或编程后自动禁用写入

·使用状态寄存器的软件和硬件(/ WP引脚)写保护

·使用掉电指令进行写保护

·锁定写保护,直到下次上电

·一次性程序(OTP)写保护

 

Starting kernel ... early_atags_to_fdt() success Booting Linux on physical CPU 0x0 Linux version 5.10.117 (tp@ubuntu) (arm-sigmastar-linux-uclibcgnueabihf-9.1.0-gcc (crosstool-NG 1.24.0) 9.1.0, GNU ld (crosstool-NG 1.24.0) 2.32) #2 PREEMPT Tue Sep 30 12:01:31 CST 2025 CPU: ARMv7 Processor [411fd010] revision 0 (ARMv7), cr=50c5383d CPU: div instructions available: patching division code CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache early_atags_to_fdt() success OF: fdt: Machine model: IFORD SSC029C-S01A LXmem is 0x4000000 PHYS_OFFSET is 0x20000000 Add mem start 0x20000000 size 0x4000000!!!! LX_MEM = 0x20000000, 0x4000000 LX_MEM2 = 0x0, 0x0 LX_MEM3 = 0x0, 0x0 MMU_MEM = 0x0, 0x0 EMAC_LEN= 0x0 DRAM_LEN= 0x0 Memory policy: Data cache writeback Reserved memory: created CMA memory pool at 0x23000000, size 16 MiB OF: reserved mem: initialized node cma0, compatible id shared-dma-pool no any mmap reserved deal_with_reserve_mma_heap memblock_reserve success mma_config[0].reserved_start= 0x21960000 size:16a0000 Zone ranges: Normal [mem 0x0000000020000000-0x0000000023ffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000020000000-0x000000002195ffff] node 0: [mem 0x0000000023000000-0x0000000023ffffff] Initmem setup node 0 [mem 0x0000000020000000-0x0000000023ffffff] CPU: All CPU(s) started in SVC mode. Built 1 zonelists, mobility grouping on. Total pages: 10464 Kernel command line: console=ttyS0,115200n8r androidboot.console=ttyS0 root=/dev/mtdblock10 rootfstype=squashfs noinitrd init=/etc/preinit LX_MEM=0x4000000 mma_heap=mma_heap_name0,miu=0,sz=0x16a0000 mma_memblock_remove=1 Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear) mem auto-init: stack:off, heap alloc:off, heap free:off Memory: 20880K/42368K available (2496K kernel code, 403K rwdata, 1136K rodata, 120K init, 125K bss, 5104K reserved, 16384K cma-reserved) SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 rcu: Preemptible hierarchical RCU implementation. Trampoline variant of Tasks RCU enabled. rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 GICv3: 192 SPIs implemented GICv3: 0 Extended SPIs implemented GICv3: Distributor has no Range Selector support GICv3: 16 PPIs implemented GICv3: CPU0: found redistributor 0 region 0:0x16040000 sstar_init_main_intc: np->name=sstar_main_intc, parent=gic sstar_pm_main_init: np->name=sstar_pm_main_intc, parent=sstar_main_intc sstar_pm_gpi_init: np->name=sstar_pm_gpi_intc, parent=sstar_main_intc sstar_gpi_init: np->name=sstar_gpi_intc, parent=sstar_main_intc random: get_random_bytes called from start_kernel+0x1bb/0x308 with crng_init=0 arch_timer: cp15 timer(s) running at 6.00MHz (virt). clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1623fa770, max_idle_ns: 440795202238 ns sched_clock: 56 bits at 6MHz, resolution 166ns, wraps every 4398046511055ns Switching to timer-based delay loop, resolution 166ns printk: console [ttyS0] enabled Calibrating delay loop (skipped), value calculated using timer frequency.. 12.00 BogoMIPS (lpj=60000) pid_max: default: 4096 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) CPU: Testing write buffer coherency: ok Setting up static identity map for 0x20008200 - 0x20008254 rcu: Hierarchical SRCU implementation. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 40 variant 1 rev 2 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 16 (order: -4, 448 bytes, linear) NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations Version : MVX4##I###g7993bdfKL_LX510##[BR:develop_master_1.7]#XVM irq: IRQ35: trimming hierarchy from :soc:sstar_main_intc irq: IRQ36: trimming hierarchy from :soc:sstar_main_intc irq: IRQ37: trimming hierarchy from :soc:sstar_main_intc irq: IRQ38: trimming hierarchy from :soc:sstar_main_intc GPIO: probe end [Padmux]reset PAD48(reg 0x3f00:52; mask0x300) t0 I2C0_MODE_4 (org: PM_SDIO_MODE_3) Do qos-initialize [sstar_update_dq_init] clocksource: Switched to clocksource arch_sys_counter NET: Registered protocol family 2 IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear) tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 6144 bytes, linear) TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear) TCP bind hash table entries: 1024 (order: 2, 20480 bytes, linear) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 128 (order: 0, 6144 bytes, linear) UDP-Lite hash table entries: 128 (order: 0, 6144 bytes, linear) NET: Registered protocol family 1 Initialise system trusted keyrings workingset: timestamp_bits=30 max_order=14 bucket_order=0 squashfs: version 4.0 (2009/01/31) Phillip Lougher jffs2: version 2.2. © 2001-2006 Red Hat, Inc. Key type asymmetric registered Asymmetric key parser 'x509' registered io scheduler mq-deadline registered zram: Added device: zram0 i2c /dev entries driver failed to get uart clk_mcu failed to get uart clk_mcu please set rtc timer (hwclock -w) sstar,rtcpwc 1f006800.rtcpwc: registered as rtc0 sstar,rtcpwc 1f006800.rtcpwc: setting system clock to 1970-01-01T00:00:00 UTC (0) [Padmux]reset PAD48(reg 0x3f00:5; mask0x8) t0 I2C0_MODE_4 (org: GPIO_MODE) [Padmux]reset PAD49(reg 0x3f00:6; mask0x8) t0 I2C0_MODE_4 (org: GPIO_MODE) [Padmux]reset PAD3(reg 0x103e00:3; mask0x8) t0 I2C1_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD0(reg 0x103e00:0; mask0x8) t0 I2C1_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD65(reg 0x3f00:16; mask0x8) t0 PM_I2CM0_MODE_1 (org: GPIO_MODE) [Padmux]reset PAD66(reg 0x3f00:17; mask0x8) t0 PM_I2CM0_MODE_1 (org: GPIO_MODE) cryptodev: driver 1.10(a1e738a) loaded. ms_cpufreq_init 502 SIDD: 0x62 OSC:0xea ms_cpufreq_init 503 SIDD Thres: 0x0 OSC Thres:0x978 random: fast init done random: crng init done [ms_cpufreq_init] Current clk=800000048 SPI 54M [FLASH] Device id is 0xa1 0x40 0x18 [SPINOR] ReadData = 0x6b [SPINOR] Dummy = 0x8 [SPINOR] pageProgram = 0x2 [FLASH] BDMA mode [SPINOR] complement = 0x0 [SPINOR] top/buttom = 0x0 [SPINOR] blocks = 0x0 [SPINOR] SRP0 = 0x0 [SPINOR] SRP1 = 0x0 [FLASH] End flash init. sstar_spinor_probe: 7mtd .name = nor0, .size = 0x01000000 (16MiB) .erasesize = 0x00001000 .numeraseregions = 0 NET: Registered protocol family 10 Segment Routing with IPv6 mip6: Mobile IPv6 sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver NET: Registered protocol family 17 [sstar_pm_init] MIU0_BASE=20000000 [sstar_pm_init] resume_entry=0x2000f8cc, suspend_imi_vbase=0XC4876000 Loading compiled-in X.509 certificates INFO pm_part_init_device [89] found driver sstar-norflash INFO pm_part_init_device [114] mtd nor0 will use same node INFO pm_part_init_device [118] flash device soc:norflash0,update device node INFO create_part_to_mtd [49] mtd master is already register,only do partition Deleting MTD partitions on "nor0": clk: Not disabling unused clocks /dev/root: Can't open blockdev VFS: Cannot open root device "mtdblock10" or unknown-block(0,0): error -6 Please append a correct "root=" boot option; here are the available partitions: 1f00 16384 mtdblock0 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- 问题在哪
10-01
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值