自己编译的openwrt在开机时一直打印jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found...的错误提示

具体的输入信息是这样的。

uboot> http
Link down: eth0
Ethernet mode (duplex/speed): 1/1000 Mbps
HTTP server is starting at IP: 192.168.0.250
HTTP server is ready!

Request for: /
Request for: /style.css
Data will be downloaded at 0x80800000 in RAM
Upgrade type: firmware
Upload file size: 3407876 bytes
Loading: #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         #######################################
         ####################

HTTP upload is done! Upgrading...

****************************
*    FIRMWARE UPGRADING    *
* DO NOT POWER OFF DEVICE! *
****************************

Executing: erase 0x9F050000 +0x340004; cp.b 0x80800000 0x9F050000 0x340004

Erase flash from 0x9F050000 to 0x9F39FFFF in bank #1
Erasing: #######################################
         ##############

Erased sectors: 53

Copying to flash...
Writting at address: 0x9F050000

Done!

HTTP ugrade is done! Rebooting...

Resetting the board...

*********************************************
*        U-Boot 1.1.4  (Jun 12 2014)        *
*********************************************

AP121 (AR9331) U-Boot for AP02 v0.0

DRAM:   64 MB DDR2 16-bit
FLASH:  Gigadevice GD25Q64B (8 MB)
CLOCKS: 400/400/200/33 MHz (CPU/RAM/AHB/SPI)

LED on during eth initialization...

Hit any key to stop autobooting:  0 

Booting image at: 0x9F050000

   Image name:   MIPS OpenWrt Linux-3.10.49
   Created:      2014-09-03   7:30:58 UTC
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1056463 Bytes = 1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...

[    0.000000] Linux version 3.10.49 ([email protected]) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42311) ) #25 Wed Sep 3 15:30:48 CST 2014
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=DRAGINO2 console=ttyATH0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1280k(kernel),6464k(rootfs),64k(NVRAM),64k(ART)ro,[email protected]0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61272k/65536k available (2239k kernel code, 4264k reserved, 604k data, 228k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is Dragino Dragino v2
[    0.510000] Register platform device spi_gpio.1
[    0.510000] Register board infos
[    0.560000] bio: create slab <bio-0> at 0
[    0.560000] Switching to clocksource MIPS
[    0.570000] NET: Registered protocol family 2
[    0.570000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.580000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.580000] TCP: Hash tables configured (established 512 bind 512)
[    0.590000] TCP: reno registered
[    0.590000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.610000] NET: Registered protocol family 1
[    0.630000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.630000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.650000] msgmni has been set to 119
[    0.650000] io scheduler noop registered
[    0.650000] io scheduler deadline registered (default)
[    0.660000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.660000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.670000] console [ttyATH0] enabled, bootconsole disabled
[    0.670000] console [ttyATH0] enabled, bootconsole disabled
[    0.680000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.690000] m25p80 spi0.0: found gd25q64, expected m25p80
[    0.690000] m25p80 spi0.0: gd25q64 (8192 Kbytes)
[    0.700000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.710000] Creating 7 MTD partitions on "spi0.0":
[    0.710000] 0x000000000000-0x000000040000 : "u-boot"
[    0.720000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.720000] 0x000000050000-0x000000190000 : "kernel"
[    0.730000] 0x000000190000-0x0000007e0000 : "rootfs"
[    0.730000] mtd: device 3 (rootfs) set to be root filesystem
[    0.750000] mtdsplit: no squashfs found in "rootfs"
[    0.770000] mtdsplit: no squashfs found in "spi0.0"
[    0.770000] 0x0000007e0000-0x0000007f0000 : "NVRAM"
[    0.780000] 0x0000007f0000-0x000000800000 : "ART"
[    0.780000] 0x000000050000-0x0000007e0000 : "firmware"
[    0.810000] libphy: ag71xx_mdio: probed
[    1.360000] ag71xx-mdio.1: Found an AR7240/AR9330 built-in switch
[    2.390000] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.940000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.950000] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.960000] TCP: cubic registered
[    2.960000] NET: Registered protocol family 17
[    2.960000] 8021q: 802.1Q VLAN Support v1.8
[    2.970000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x1292 instead
[    2.980000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x4e50 instead
[    2.990000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xc936 instead
.....

造成这个问题的原因是因为我们对FLASH的分区不正确导致的,经过两天的跟踪我发现了这个问题出在image/Makefile中。

我这个板的MTDLAYOUT内容是这样子的:

dragino2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6720k(rootfs),64k(NVRAM),64k(ART)ro,[email protected](firmware)

而我刚刚下载下去的Kernel大小为1056463,即为1031kB,已经超出了1024k了。我猜想后面的rootfs已经不在0x150000(256k+64k+1024k)这个地址上了,真实的rootfs在哪儿我没有去测,但我猜测是在256k+64k+1056463=0x151ECF之后了。u-boot得到的消息却说rootfs在0x150000上,所以就出错了。

解决方法就是加大kernel的值,加这个值有讲究,只能64k地64k地加,如果kernel用不完这64k,就不要给它加128k,否则出错!所以这儿需要把MTDLAYOUT设置为

dragino2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1088k(kernel),6656k(rootfs),64k(NVRAM),64k(ART)ro,[email protected](firmware)

时间: 2024-08-23 13:33:33

自己编译的openwrt在开机时一直打印jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found...的错误提示的相关文章

git add时遇到类似fatal: Path &#39;XXX&#39; is in submodule &#39;XXX&#39;错误提示如何解决?

答:示例如下: fatal: Pathspec 'Vundle.vim/autoload/vundle.vim' is in submodule '.vim/bundle/Vundle.vim' 解决办法: git rm -rf --cached .vim/bundle/Vundle.vim git add时遇到类似fatal: Path 'XXX' is in submodule 'XXX'错误提示如何解决? 原文地址:https://www.cnblogs.com/dakewei/p/108

怎么把wifidog直接编译进openwrt

怎么把wifidog直接编译进openwrt,让生成的bin文件就带有wifidog,省得再去装ipk文件? openwrt 根目录make menuconfig 搜索 Captive portal/ 看下有没有wifidog选项,如果没有 ./scripts/feeds update -a ./scripts/feeds install -a make menuconfig 还不行的话,在项目下终端: vim feeds.conf.default 增加这一行: src-git wifidog

Ubuntu编译安装Php,配置时出现:Configure: error: XML configuration could not be found

解决这个问题是需要安装libxml, sudo apt-get install libxml2-dev Ubuntu编译安装Php,配置时出现:Configure: error: XML configuration could not be found,布布扣,bubuko.com

在Linux系统如何让程序开机时自动启动

核心提示:系统的服务在开机时一般都可以自动启动,那在linux系统下如果想要程序在开机时自动启动怎么办?我们知道在 windows系统"开始"-->"所有程序"-->"启动"里面放个快捷方式就行,那Linux系统下呢?...系统的服务在开机时一般都可以自动启动,那在linux系统下如果想要程序在开机时自动启动怎么办?我们知道在 windows系统"开始"-->"所有程序"-->&qu

设置VS编译或部署时遇到错误提示是否继续运行

默认情况下,vs2010按F5进行编译,如果编译时发现有错误,vs会提示是否继续运行. 如果手贱不小心点了继续运行且不再提示,结果现在就算编译出错也不提示. 会照成整个项目编译完成后才提示错误信息非常浪费时间!下面是给手残党的配置图! 设置VS编译或部署时遇到错误提示是否继续运行

编译php 5.3 make时错误处理

编译php 5.3 make时出现错误一: make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1 解决办法: 在./configure加上选项: --disable-fileinfo Disable fileinfo support 禁用 fileinfo ./configure   --prefix=/usr/local/php   --with-apxs2=/usr/local/apache2/bin/apxs   --with-co

Launcher Activity在开机时重启两次解决办法

今天在看log的时候发现,Launcher activity会被onDestroy掉一次,然后再重启. 可能原因猜测: 1.横竖屏切换 2.MCC MNC等Configuration改变引起的 MCC(移动国家码)和 MNC(移动网络码) 由于当时的Launcher设置为强制横屏了,应该是不会引起重启的. 对于Configuration改变系统会发一个android.intent.action.CONFIGURATION_CHANGED的广播 于是就做了一个广播接收器去检测是不是由于Config

maven编译带中文的工程时出现syntax error的问题

在编译带中文的maven工程时,尽管pom文件中设置了<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>,但仍然会报错,如下信息: [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.2:scr (generate-scr-scrdescriptor) on project toolkit.monitor.manag

编译安装或者mysql启动时遇到的错误小记

编译安装遇到的错误:进入mysql目录 [[email protected] software]# cd mysql-5.6.19 [[email protected] mysql-5.5.11]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/home/mydb -DMYSQL_UNIX_ADDR=/home/mydb/mysqld.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -