您尚未登录。

楼主 # 2022-07-06 09:20:11

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

flash w25q128 怎样生成rootfs文件才能避免坑 jffs2_scan_eraseblock,大神们帮看看呗

flash是16M的

生成jffs的命令:
mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs-brmin/ -o jffs2.img

但无论怎样烧录,都会出现这个问题:
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00097018: 0x690c instead


更全的启动日志

Hit any key to stop autoboot:  0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffecd ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.16-licheepi-zero+ (root@6559461d4579) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05)) #6 SMP Wed Jul 6 01:04:10 UTC 2
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33868 r8192 d23476 u65536
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 53568K/64036K available (6144K kernel code, 225K rwdata, 1524K rodata, 1024K init, 265K bss, 10468K reserved, 0K cma-reserved, 0K hig)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4000000 - 0xff800000   ( 952 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc3e89000   (  62 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a386e0   ( 226 kB)
[    0.000000]        .bss : 0xc0a3fb5c - 0xc0a821ac   ( 266 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000184] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000411] Console: colour dummy device 80x30
[    0.000445] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000459] pid_max: default: 32768 minimum: 301
[    0.000588] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000601] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001200] CPU: Testing write buffer coherency: ok
[    0.001575] /cpus/cpu@0 missing clock-frequency property
[    0.001597] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002027] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002204] Hierarchical SRCU implementation.
[    0.002707] smp: Bringing up secondary CPUs ...
[    0.002720] smp: Brought up 1 node, 1 CPU
[    0.002729] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.002737] CPU: All CPU(s) started in SVC mode.
[    0.003496] devtmpfs: initialized
[    0.006623] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.006909] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.006935] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007096] pinctrl core: initialized pinctrl subsystem
[    0.007968] random: get_random_u32 called from bucket_table_alloc+0xf4/0x244 with crng_init=0
[    0.008099] NET: Registered protocol family 16
[    0.008589] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.009712] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.009729] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.023012] SCSI subsystem initialized
[    0.023316] usbcore: registered new interface driver usbfs
[    0.023378] usbcore: registered new interface driver hub
[    0.023486] usbcore: registered new device driver usb
[    0.023711] Linux video capture interface: v2.00
[    0.023753] pps_core: LinuxPPS API ver. 1 registered
[    0.023761] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.023782] PTP clock support registered
[    0.024029] Advanced Linux Sound Architecture Driver Initialized.
[    0.025904] clocksource: Switched to clocksource arch_sys_counter
[    0.036789] NET: Registered protocol family 2
[    0.037367] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.037397] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.037420] TCP: Hash tables configured (established 1024 bind 1024)
[    0.037548] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.037597] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.037799] NET: Registered protocol family 1
[    0.038394] RPC: Registered named UNIX socket transport module.
[    0.038412] RPC: Registered udp transport module.
[    0.038418] RPC: Registered tcp transport module.
[    0.038424] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.040538] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.049473] NFS: Registering the id_resolver key type
[    0.049526] Key type id_resolver registered
[    0.049533] Key type id_legacy registered
[    0.049577] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.051091] random: fast init done
[    0.054025] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.054046] io scheduler noop registered
[    0.054053] io scheduler deadline registered
[    0.054300] io scheduler cfq registered (default)
[    0.054311] io scheduler mq-deadline registered
[    0.054319] io scheduler kyber registered
[    0.058727] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.128141] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.131331] console [ttyS0] disabled
[    0.151607] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[    0.745561] console [ttyS0] enabled
[    0.753551] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.758716] spi32766.0: parser cmdlinepart: 4
[    0.763070] 4 cmdlinepart partitions found on MTD device spi32766.0
[    0.769356] Creating 4 MTD partitions on "spi32766.0":
[    0.774500] 0x000000000000-0x000000100000 : "uboot"
[    0.780046] 0x000000100000-0x000000110000 : "dtb"
[    0.785150] 0x000000110000-0x000000510000 : "kernel"
[    0.790614] 0x000000510000-0x000001000000 : "rootfs"
[    0.796426] libphy: Fixed MDIO Bus: probed
[    0.801016] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.806898] dwmac-sun8i 1c30000.ethernet: No regulator found
[    0.812623] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[    0.818812] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    0.824473] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    0.831728] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    0.837399] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    0.844613] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    0.849583] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    0.856577] libphy: stmmac: probed
[    0.861892] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.868552] ehci-platform: EHCI generic platform driver
[    0.874069] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.879761] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.887700] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.915923] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.923192] hub 1-0:1.0: USB hub found
[    0.927144] hub 1-0:1.0: 1 port detected
[    0.931699] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.937999] ohci-platform: OHCI generic platform driver
[    0.943549] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.950289] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.958248] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    1.031051] hub 2-0:1.0: USB hub found
[    1.034870] hub 2-0:1.0: 1 port detected
[    1.043080] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.052032] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    1.058940] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.063474] i2c /dev entries driver
[    1.068347] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[    1.077468] usbcore: registered new interface driver uvcvideo
[    1.083219] USB Video Class driver (1.1.1)
[    1.088082] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.155955] sunxi-mmc 1c0f000.mmc: base:0xc407b000 irq:23
[    1.215939] sunxi-mmc 1c10000.mmc: base:0xc423b000 irq:24
[    1.222373] usbcore: registered new interface driver usbhid
[    1.228025] usbhid: USB HID core driver
[    1.233472] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[    1.241524] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.250116] NET: Registered protocol family 17
[    1.254686] Key type dns_resolver registered
[    1.259232] Registering SWP/SWPB emulation handler
[    1.270626] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000
[    1.281296] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    1.297597] Console: switching to colour frame buffer device 100x30
[    1.310017] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[    1.318581] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.329994] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.335761] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.345036] hub 3-0:1.0: USB hub found
[    1.349018] hub 3-0:1.0: 1 port detected
[    1.356912] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[    1.365424] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:02:37 UTC (157)
[    1.373859] vcc5v0: disabling
[    1.376896] ALSA device list:
[    1.379863]   #0: V3s Audio Codec
[    1.386026] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    1.391726] jffs2: Node at 0x00000fe0 with length 0x000000cd would run over the end of the erase block
[    1.401111] jffs2: Perhaps the file system was created with the wrong erase size?
[    1.408660] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000fe4: 0x00cd instead

离线

#1 2022-07-06 09:38:07

varzhou
会员
注册时间: 2020-07-14
已发帖子: 104
积分: 3

Re: flash w25q128 怎样生成rootfs文件才能避免坑 jffs2_scan_eraseblock,大神们帮看看呗

mkfs.jffs2 -s 0x100 -e 0x4000 -p 0xAF0000 -d rootfs-brmin/ -o jffs2.img这样试试。
而且你的-p参数有问题吧,你的文件系统只有10M??

离线

楼主 #2 2022-07-06 10:00:45

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: flash w25q128 怎样生成rootfs文件才能避免坑 jffs2_scan_eraseblock,大神们帮看看呗

SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB

Perhaps the file system was created with the wrong erase size?

这几个点,我试了一下4kib生成的情况,生成不了
mkfs.jffs2  -s 0x1000 -e 0x1000 -p 0x400000 -d rootfs-brmin/ -n -o   jffs2.img
Erase size 0x1000 too small. Increasing to 8KiB minimum

离线

楼主 #3 2022-07-06 11:46:12

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: flash w25q128 怎样生成rootfs文件才能避免坑 jffs2_scan_eraseblock,大神们帮看看呗

varzhou 说:

mkfs.jffs2 -s 0x100 -e 0x4000 -p 0xAF0000 -d rootfs-brmin/ -o jffs2.img这样试试。
而且你的-p参数有问题吧,你的文件系统只有10M??



谢谢!mkfs.jffs2 -s 0x100 -e 0x4000 -p 0x1000000 -d rootfs-brmin/ -o jffs2.img
这样制作,也出现一样的错误

最近编辑记录 happy (2022-07-06 11:46:40)

离线

楼主 #4 2022-07-06 14:45:08

happy
会员
注册时间: 2022-06-12
已发帖子: 16
积分: 26

Re: flash w25q128 怎样生成rootfs文件才能避免坑 jffs2_scan_eraseblock,大神们帮看看呗

已解决,SEC_4K问题:
https://www.kancloud.cn/lichee/lpi0/470834


#define SECT_4K BIT(0) /* SPINOR_OP_BE_4K works uniformly */

如果发现信息里有SECT_4K,则会导致jffs2不能正常擦除(64KB),需要去掉该flag。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn