您尚未登录。

楼主 #1 2020-03-29 13:46:03

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

本人新手,最近刚入手LicheePinano。
根据前辈的帖子入门licheepi nano https://whycan.cn/t_3138.html
途中遇到的问题:我的板子上的nor-flash型号为xt25f128,帖子里flash型号为w25q128.导致无法识别flash。于是参考帖子https://cn.bbs.sipeed.com/d/171-nanoxtx25f128-spi-flash-u-bootflash/2进行了修改解决了此问题。
本来以为能成功启动,现在又遇到了jffs2 Magic bitmask 错误,故来请教各位前辈。贴上报错:
jffs2 Magic bitmask错误

离线

楼主 #2 2020-03-29 13:51:22

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

分区规划如下1.png2.png

离线

#3 2020-03-29 13:55:25

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

linux mtd 驱动你改了吗?

离线

楼主 #4 2020-03-29 13:58:51

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

在drivers/mtd/spi-nor/spi-nor.c中,我也将SECT_4K修改为了0xt25f128.png
我的镜像生成命令如下mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\

离线

楼主 #5 2020-03-29 14:05:17

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

有梦的地方 说:

linux mtd 驱动你改了吗?

在drivers/mtd/spi-nor/spi-nor.c中我添加了我这个flash

离线

#6 2020-03-29 14:24:24

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

试一试 -s 0x1000

离线

楼主 #7 2020-03-29 14:37:06

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

有梦的地方 说:

试一试 -s 0x1000

已经尝试,错误依旧

离线

#8 2020-03-29 16:41:32

yywyai
会员
注册时间: 2019-01-17
已发帖子: 64
积分: 104

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

吴彦祖123 说:

在drivers/mtd/spi-nor/spi-nor.c中,我也将SECT_4K修改为了0https://whycan.cn/files/members/2840/xt25f128.png
我的镜像生成命令如下mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\

INFO最后那个参数设置为0就可以了

离线

楼主 #9 2020-03-29 17:01:34

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

yywyai 说:

INFO最后那个参数设置为0就可以了

四楼图中我已经将SECT_4K改为0了

离线

楼主 #10 2020-03-29 21:05:48

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

在这篇帖子中找到灵感 https://whycan.cn/t_1108.html
于是我将xt25f128信息更换为w25q128的而非原先的w25q128fw,如下所示

	{
		"w25q128fw", INFO(0xef6018, 0, 64 * 1024, 256,
			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
	},
      /*  {
   		"xt25f128b",INFO(0x0b4018, 0x0,64 * 1024, 256, 
			0 | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
			         SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) 
	},
    */
        { "w25q80", INFO(0xef5014, 0, 64 * 1024,  16, SECT_4K) },
	{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024,  16, SECT_4K) },
	{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
	/*{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },*/
	{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, 0) }, 

  由于本人能力实在有限,暂时还没能力研读数据手册,才导致了这个问题。感谢楼上两位前辈的指点。

离线

楼主 #11 2020-03-29 21:12:56

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

启动成功贴码

 U-Boot SPL 2018.01-05682-gd83b2fefcf-dirty (Mar 29 2020 - 00:18:57)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2018.01-05682-gd83b2fefcf-dirty (Mar 29 2020 - 00:18:57 -0400) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected xt25f128b with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected xt25f128b with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e03000, end 80e07f3a ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc8-licheepi-nano+ (tang@tang-virtual-machine) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #31 Sun Mar 29 08:28:37 EDT 2020
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22672K/32768K available (6144K kernel code, 238K rwdata, 1420K rodata, 1024K init, 246K bss, 10096K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 239 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 247 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000054] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000124] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000754] Console: colour dummy device 80x30
[    0.000851] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070251] pid_max: default: 32768 minimum: 301
[    0.070589] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070636] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072232] CPU: Testing write buffer coherency: ok
[    0.074167] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076867] devtmpfs: initialized
[    0.083797] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083875] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.084170] pinctrl core: initialized pinctrl subsystem
[    0.086476] NET: Registered protocol family 16
[    0.088474] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.090629] cpuidle: using governor menu
[    0.118344] SCSI subsystem initialized
[    0.118708] usbcore: registered new interface driver usbfs
[    0.118877] usbcore: registered new interface driver hub
[    0.119107] usbcore: registered new device driver usb
[    0.119610] pps_core: LinuxPPS API ver. 1 registered
[    0.119638] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.119710] PTP clock support registered
[    0.120387] Advanced Linux Sound Architecture Driver Initialized.
[    0.122072] clocksource: Switched to clocksource timer
[    0.151252] NET: Registered protocol family 2
[    0.152949] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.153032] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.153084] TCP: Hash tables configured (established 1024 bind 1024)
[    0.153453] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.153521] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.154074] NET: Registered protocol family 1
[    0.155376] RPC: Registered named UNIX socket transport module.
[    0.155415] RPC: Registered udp transport module.
[    0.155432] RPC: Registered tcp transport module.
[    0.155448] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.157732] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.159762] Initialise system trusted keyrings
[    0.160367] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.179160] NFS: Registering the id_resolver key type
[    0.179254] Key type id_resolver registered
[    0.179276] Key type id_legacy registered
[    0.179402] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.194867] Key type asymmetric registered
[    0.194908] Asymmetric key parser 'x509' registered
[    0.195140] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.195178] io scheduler noop registered
[    0.195196] io scheduler deadline registered
[    0.196038] io scheduler cfq registered (default)
[    0.196073] io scheduler mq-deadline registered
[    0.196092] io scheduler kyber registered
[    0.197297] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.207397] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.395406] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.402850] console [ttyS0] disabled
[    0.423121] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.899084] console [ttyS0] enabled
[    0.909875] panel-simple panel: panel supply power not found, using dummy regulator
[    0.953553] brd: module loaded
[    0.979741] loop: module loaded
[    0.983879] SCSI Media Changer driver v0.25 
[    0.991999] m25p80 spi0.0: xt25f128b (16384 Kbytes)
[    0.997060] 4 ofpart partitions found on MTD device spi0.0
[    1.002623] Creating 4 MTD partitions on "spi0.0":
[    1.007438] 0x000000000000-0x000000100000 : "u-boot"
[    1.015442] 0x000000100000-0x000000110000 : "dtb"
[    1.022996] 0x000000110000-0x000000510000 : "kernel"
[    1.030643] 0x000000510000-0x000001000000 : "rootfs"
[    1.039095] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.045780] ehci-platform: EHCI generic platform driver
[    1.051314] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.057638] ohci-platform: OHCI generic platform driver
[    1.063369] usbcore: registered new interface driver usb-storage
[    1.070328] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    1.079418] i2c /dev entries driver
[    1.142225] sunxi-mmc 1c0f000.mmc: base:0x85f7a259 irq:19
[    1.149868] usbcore: registered new interface driver usbhid
[    1.155586] usbhid: USB HID core driver
[    1.178720] NET: Registered protocol family 17
[    1.183569] Key type dns_resolver registered
[    1.190181] Loading compiled-in X.509 certificates
[    1.207011] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739e78)
[    1.215940] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073915c)
[    1.223727] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.230334] [drm] No driver support for vblank timestamp query.
[    1.284509] Console: switching to colour frame buffer device 60x34
[    1.307739] sun4i-drm display-engine: fb0:  frame buffer device
[    1.314903] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.324111] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.335998] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.341791] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.351993] hub 1-0:1.0: USB hub found
[    1.356067] hub 1-0:1.0: 1 port detected
[    1.361521] using random self ethernet address
[    1.366152] using random host ethernet address
[    1.372509] usb0: HOST MAC 0e:1c:e9:71:09:0f
[    1.376892] usb0: MAC b2:1c:2f:3a:0f:f6
[    1.380882] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.388452] g_cdc gadget: g_cdc ready
[    1.393152] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.410637] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.417530] vcc3v3: disabling
[    1.420516] ALSA device list:
[    1.423572]   #0: Loopback 1
[    1.427297] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.436041] cfg80211: failed to load regulatory.db
[    1.545122] random: crng init done
[    1.944931] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    1.965264] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    1.973387] devtmpfs: mounted
[    1.981064] Freeing unused kernel memory: 1024K
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
Lichee login: root
Password: 
# cd /
# ls
bin      lib      media    proc     sbin     usr
dev      lib32    mnt      root     sys      var
etc      linuxrc  opt      run      tmp
# 

离线

楼主 #12 2020-03-29 21:17:21

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

最后附上本人编译好的镜像以及xt25f128数据手册flash数据手册.7z

离线

#13 2020-03-29 21:23:25

有梦的地方
会员
注册时间: 2020-03-17
已发帖子: 284
积分: 284

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

明明可以靠脸吃饭,偏偏要靠技术。

离线

#14 2020-04-10 15:48:56

shq2333
会员
注册时间: 2019-12-19
已发帖子: 2
积分: 2

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

吴彦祖123 说:

最后附上本人编译好的镜像以及xt25f128数据手册flash数据手册.7z

你好,你这个镜像的root密码是什么阿,我买的nano也是xt25f128b的

离线

楼主 #15 2020-06-15 19:11:30

吴彦祖123
会员
注册时间: 2020-01-01
已发帖子: 12
积分: 12

Re: LicheePi Nano linux启动失败,jffs2 Magic bitmask 错误

我记得是111111

shq2333 说:

你好,你这个镜像的root密码是什么阿,我买的nano也是xt25f128b的

离线

页脚

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

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