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

uboot> http
Link down: eth0
Ethernet mode (duplex/speed): / 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: 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 #
Erasing: #######################################
############## Erased sectors: Copying to flash...
Writting at address: 0x9F050000 Done! HTTP ugrade is done! Rebooting... Resetting the board... *********************************************
* U-Boot 1.1. (Jun ) *
********************************************* AP121 (AR9331) U-Boot for AP02 v0. DRAM: MB DDR2 -bit
FLASH: Gigadevice GD25Q64B ( MB)
CLOCKS: /// MHz (CPU/RAM/AHB/SPI) LED on during eth initialization... Hit any key to stop autobooting: Booting image at: 0x9F050000 Image name: MIPS OpenWrt Linux-3.10.
Created: -- :: UTC
Image type: MIPS Linux Kernel Image (lzma compressed)
Data size: Bytes = MB
Load address: 0x80060000
Entry point: 0x80060000 Uncompressing kernel image... OK!
Starting kernel... [ 0.000000] Linux version 3.10. (tf@ubuntu) (gcc version 4.8. (OpenWrt/Linaro GCC 4.8-2014.04 r42311) ) # Wed Sep :: CST
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR9330 rev
[ 0.000000] Clocks: CPU:.000MHz, DDR:.000MHz, AHB:.000MHz, Ref:.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: @ (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 : [mem 0x00000000-0x03ffffff]
[ 0.000000] Primary instruction cache 64kB, VIPT, -way, linesize bytes.
[ 0.000000] Primary data cache 32kB, -way, VIPT, cache aliases, linesize bytes
[ 0.000000] Built zonelists in Zone order, mobility grouping on. Total pages:
[ 0.000000] Kernel command line: board=DRAGINO2 console=ttyATH0, mtdparts=spi0.:256k(u-boot)ro,64k(u-boot-env)ro,1280k(kernel),6464k(rootfs),64k(NVRAM),64k(ART)ro,7744k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
[ 0.000000] PID hash table entries: (order: -, bytes)
[ 0.000000] Dentry cache hash table entries: (order: , bytes)
[ 0.000000] Inode-cache hash table entries: (order: , bytes)
[ 0.000000] Writing ErrCtl register=
[ 0.000000] Readback ErrCtl register=
[ 0.000000] Memory: 61272k/65536k available (2239k kernel code, 4264k reserved, 604k data, 228k init, 0k highmem)
[ 0.000000] SLUB: HWalign=, Order=-, MinObjects=, CPUs=, Nodes=
[ 0.000000] NR_IRQS:
[ 0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=)
[ 0.080000] pid_max: default: minimum:
[ 0.080000] Mount-cache hash table entries:
[ 0.090000] NET: Registered protocol family
[ 0.100000] MIPS: machine is Dragino Dragino v2
[ 0.510000] Register platform device spi_gpio.
[ 0.510000] Register board infos
[ 0.560000] bio: create slab <bio-> at
[ 0.560000] Switching to clocksource MIPS
[ 0.570000] NET: Registered protocol family
[ 0.570000] TCP established hash table entries: (order: , bytes)
[ 0.580000] TCP bind hash table entries: (order: -, bytes)
[ 0.580000] TCP: Hash tables configured (established bind )
[ 0.590000] TCP: reno registered
[ 0.590000] UDP hash table entries: (order: , bytes)
[ 0.600000] UDP-Lite hash table entries: (order: , bytes)
[ 0.610000] NET: Registered protocol family
[ 0.630000] squashfs: version 4.0 (//) Phillip Lougher
[ 0.630000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) - Red Hat, Inc.
[ 0.650000] msgmni has been set to
[ 0.650000] io scheduler noop registered
[ 0.650000] io scheduler deadline registered (default)
[ 0.660000] Serial: / driver, ports, IRQ sharing disabled
[ 0.660000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = ) 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.: found gd25q64, expected m25p80
[ 0.690000] m25p80 spi0.: gd25q64 ( Kbytes)
[ 0.700000] cmdlinepart partitions found on MTD device spi0.
[ 0.710000] Creating 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 (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.: Found an AR7240/AR9330 built-in switch
[ 2.390000] eth0: Atheros AG71xx at 0xba000000, irq , mode:GMII
[ 2.940000] ag71xx ag71xx.: connected to PHY at ag71xx-mdio.: [uid=004dd041, driver=Generic PHY]
[ 2.950000] eth1: Atheros AG71xx at 0xb9000000, irq , mode:MII
[ 2.960000] TCP: cubic registered
[ 2.960000] NET: Registered protocol family
[ 2.960000] 8021q: .1Q VLAN Support v1.
[ 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,7744k@0x50000(firmware)

而我刚刚下载下去的Kernel大小为,即为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,7744k@0x50000(firmware)

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

  1. git add时遇到类似fatal: Path 'XXX' is in submodule 'XXX'错误提示如何解决?

    答:示例如下: fatal: Pathspec 'Vundle.vim/autoload/vundle.vim' is in submodule '.vim/bundle/Vundle.vim' 解决 ...

  2. 在Ubuntu 16.04 LTS上用g++和gcc编译C/C++代码错误提示“.../x86_64-linux-gnu/crt1.o: ELF section name out of range”

    (有一些图片我是直接从个人的CSDN博客上复制来的) 最近一个多月来,我曾经多次尝试在Ubuntu 16.04 LTS上使用g++和gcc(这俩好像合起来叫MinGW?)来编译C/C++代码,但是在解 ...

  3. Centos6下编译LEDE/OpenWrt

    准备工作 1. 安装依赖软件 这是官方文档提供的依赖列表 yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncu ...

  4. centos6.5新增加硬盘挂载并实现开机时自动挂载

    在内网主机新增一个2T硬盘,先关机断电再连接硬盘数据线和电源线! 查看当前磁盘设备信息: [root@tb ~]# fdisk -lWARNING: GPT (GUID Partition Table ...

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

    编译安装遇到的错误:进入mysql目录 [root@localhost software]# cd mysql-5.6.19 [root@localhost mysql-5.5.11]# cmake ...

  6. 如何使Android应用开机时自动启动

    先记下来,主要是继承BroadcastReceiver实现.还有开机自动启动service的,好像是继承 IntentReceiver,不知道有什么不一样,有时间试试. 一: 简单 Android也有 ...

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

    在Linux系统如何让程序开机时自动启动      核心提示:系统的服务在开机时一般都可以自动启动,那在linux系统下如果想要程序在开机时自动启动怎么办?我们知道在 windows系统“开始”--& ...

  8. 系统开机时提示BOOTMGR is compressed

    问题描述: 开机时提示 BOOTMGR  is compressed Press Ctrl+Alt+Del to restart 操作方法: 1.插入带有U盘启动的U盘2.进入winpe系统后,打开“ ...

  9. Ubuntu开机时提示“piix4_smbus 0000:00:07.3: SMBus Host controller not enabled”

    问题描述:Ubuntu开机时提示“piix4_smbus 0000:00:07.3: SMBus Host controller not enabled” 版本:Ubuntu 18.04    VMw ...

随机推荐

  1. Windows命令行命令集锦

    原文:Windows命令行命令集锦 转自:http://www.me2wg.com/bbs/forum.php?mod=viewthread&tid=15830 winver--------- ...

  2. linux+win7双系统重装win7修复grub的办法(转)

    本人是debian+win7的双系统, 下面介绍下重装win7的整个过程以及遇到的一些小问题,在查阅相关博客和朋友的帮助下成功修复, 记录下以便以后有不时之需, 也希望能帮助到遇到同样问题的朋友! 首 ...

  3. Vivado的helloword计划(一个):硬件project部分

    硬件平台:ZedBoard 软件平台:vivado2013.3 本演示样例通过综合.实现,生成比特流,发送到SDK实现. 启动vivado而且创建一个项目 依据提示操作一步步创建新项目的时候记得选择R ...

  4. 如何成功实施SDL提供的官方Android平台Demo

    如何成功实施SDL提供的官方Android平台Demo 作者:雨水  日期:2014-4-30 编写说明:SDL的官方提供了一个Anroid的demo模板SDLActivity,无法直接执行,依照官方 ...

  5. Docker安装应用程序(Centos6.5_x64)

    Docker安装应用程序(Centos6.5_x64) Authoer::jom_ch@2014/7/23 Docker官方网站 http://www.docker.com/ 一,安装EPEL 关于E ...

  6. Java NIO系列教程(三) Buffer(转)

    Java NIO中的Buffer用于和NIO通道进行交互.如你所知,数据是从通道读入缓冲区,从缓冲区写入到通道中的. 缓冲区本质上是一块可以写入数据,然后可以从中读取数据的内存.这块内存被包装成NIO ...

  7. 【Testin实验室】MoiMark安卓中国终端体验性能排行榜(11月报)

    [Testin实验室]MoiMark安卓中国终端体验性能排行榜(11月报) 2014/11/20 · Testin · 实验室报告 11月报要点: 新增机型Note4强势夺得第一.三星Note4以多个 ...

  8. JavaScript阻止事件冒泡(兼容IE、Chrome、FF)

    这里仅仅是一个简单代码demo,因为时间问题并未做深入研究,因为今天做项目时要用到阻止事件冒泡的内容,找了好多才找到一个可以使用的,特记录之. <!DOCTYPE HTML> <ht ...

  9. PL/SQL程序中调用Java代码(转)

    主要是学习PL/SQL调用JAVA的方法. 平台:WINDOWS 1.首先使用IDE写好需要调用的java代码,再添加"create or replace and compile java ...

  10. gcd&&lcm

    1011 最大公约数GCD 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题  收藏  关注 输入2个正整数A,B,求A与B的最大公约数.   Input 2个数A,B,中 ...