2010-03-08 03:18:45     加载文件系统时出现的几个异常现象

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-03-08 03:18:45     加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86942   

 

开发板为BF518F-EZBRD,我把SPI flash换成了M225P128,把kernel和filesystem都放在了SPI flash,

 

u-boot:0x0---0x40000

 

kernel:0x40000--200000

 

filesystem:200000--1000000

 

但是启动的时候出现如下提示,这是什么原因呢?

 

rtc-bfin rtc-bfin: setting system clock to 1991-03-12 17:02:58 UTC (668797378)

Empty flash at 0x0000fffc ends at 0x00010000

CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)

Empty flash at 0x0001fffc ends at 0x00020000

CLEANMARKER node found at 0x00020000, not first node in block (0x00000000)

Empty flash at 0x0002fffc ends at 0x00030000

CLEANMARKER node found at 0x00030000, not first node in block (0x00000000)

Empty flash at 0x0004ff80 ends at 0x00050000

CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)

Empty flash at 0x0005fffc ends at 0x00060000

CLEANMARKER node found at 0x00060000, not first node in block (0x00040000)

Empty flash at 0x0006fffc ends at 0x00070000

CLEANMARKER node found at 0x00070000, not first node in block (0x00040000)

Empty flash at 0x0008fffc ends at 0x00090000

CLEANMARKER node found at 0x00090000, not first node in block (0x00080000)

Empty flash at 0x0009fffc ends at 0x000a0000

CLEANMARKER node found at 0x000a0000, not first node in block (0x00080000)

Empty flash at 0x000afffc ends at 0x000b0000

CLEANMARKER node found at 0x000b0000, not first node in block (0x00080000)

Empty flash at 0x000cfffc ends at 0x000d0000

CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000)

Empty flash at 0x000dfffc ends at 0x000e0000

CLEANMARKER node found at 0x000e0000, not first node in block (0x000c0000)

Empty flash at 0x000efffc ends at 0x000f0000

CLEANMARKER node found at 0x000f0000, not first node in block (0x000c0000)

Empty flash at 0x0010fffc ends at 0x00110000

CLEANMARKER node found at 0x00110000, not first node in block (0x00100000)

Empty flash at 0x0011fffc ends at 0x00120000

CLEANMARKER node found at 0x00120000, not first node in block (0x00100000)

Empty flash at 0x0012fffc ends at 0x00130000

CLEANMARKER node found at 0x00130000, not first node in block (0x00100000)

Empty flash at 0x0014fffc ends at 0x00150000

CLEANMARKER node found at 0x00150000, not first node in block (0x00140000)

Empty flash at 0x0015fffc ends at 0x00160000

CLEANMARKER node found at 0x00160000, not first node in block (0x00140000)

Empty flash at 0x0016fffc ends at 0x00170000

CLEANMARKER node found at 0x00170000, not first node in block (0x00140000)

Empty flash at 0x0018fffc ends at 0x00190000

CLEANMARKER node found at 0x00190000, not first node in block (0x00180000)

Empty flash at 0x0019fffc ends at 0x001a0000

CLEANMARKER node found at 0x001a0000, not first node in block (0x00180000)

Empty flash at 0x001afffc ends at 0x001b0000

CLEANMARKER node found at 0x001b0000, not first node in block (0x00180000)

Empty flash at 0x001cfffc ends at 0x001d0000

CLEANMARKER node found at 0x001d0000, not first node in block (0x001c0000)

Empty flash at 0x001dfffc ends at 0x001e0000

CLEANMARKER node found at 0x001e0000, not first node in block (0x001c0000)

Empty flash at 0x001efffc ends at 0x001f0000

CLEANMARKER node found at 0x001f0000, not first node in block (0x001c0000)

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 120k freed

eth2: link up, 100 Mb/s, full duplex

TranslateQuoteReplyEditDelete

 

 

2010-03-08 03:52:48     Re: 加载文件系统时出现的几个异常现象

Sonic Zhang (CHINA)

Message: 86943   

 

Too few information to answer.

 

kernel release?

 

how do you config M25P128 in your board file?

QuoteReplyEditDelete

 

 

2010-03-08 04:06:24     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86944   

 

U-Boot 2008.10 (ADI-2009R1-rc3) (Mar  7 2010 - 22:23:31)

 

CPU:   ADSP bf518-0.0 (Detected Rev: 0.1) (parallel flash boot)

NARItech BF518F-1

       Support:   www.naritech.cn/

Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz

RAM:   32 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   F2:AA:A5:C3:CF:CC

Hit any key to stop autoboot:  0

SF: Got idcode 20 20 18

16384 KiB M25P128 at 0:2 is now current device

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1

   Created:      2010-03-08   7:36:26 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1211635 Bytes =  1.2 MB

   Load Address: 00001000

   Entry Point:  00232bac

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00232bac

Linux version 2.6.28.10-ADI-2009R1 (root@ubuntu) (gcc version 4.1.2 (ADI svn)) #

62 Sun Mar 7 23:35:57 PST 2010

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x00179220

  rodata    = 0x00179220-0x001e75e0

  bss       = 0x001e8000-0x0020ea74

  data      = 0x0020ea74-0x00226000

    stack   = 0x00224000-0x00226000

  init      = 0x00226000-0x00244000

  available = 0x00244000-0x01eff000

  DMA Zone  = 0x01f00000-0x02000000

Hardware Trace Active and Enabled

Boot Mode: 3

Reset caused by Software reset

Blackfin support (C) 2004-2009 Analog Devices, Inc.

Compiled for ADSP-BF518 Rev 0.0

Warning: Compiled for Rev 0, but running on Rev 1

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 400 MHz core clock and 80 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 7873

Kernel command line: root=/dev/mtdblock3 rw rootfstype=jffs2 clkin_hz=25000000 e

arlyprintk=serial,uart0,57600 console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 128 (order: 7, 512 bytes)

I-pipe 1.10-00: pipeline enabled.

Console: colour dummy device 80x25

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 29128k/32768k RAM, (120k init code, 1504k kernel code, 692k da

ta, 1024k dma, 296k reserved)

Calibrating delay loop... 794.62 BogoMIPS (lpj=1589248)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezbrd_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

NET: Registered protocol family 1

I-pipe: Domain Xenomai registered.

Xenomai: hal/blackfin started.

Xenomai: real-time nucleus v2.4.7 (Andalusia) loaded.

Xenomai: starting native API services.

Xenomai: starting POSIX services.

Xenomai: starting RTDM services.

NTFS driver 2.1.29 [Flags: R/O].

JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.

msgmni has been set to 56

io scheduler noop registered (default)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_

clk=2500000Hz(mdc_div=15)@sclk=80MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

physmap platform flash device: 00300000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

NOR chip too large to fit in mapping. Attempting to cope...

Amd/Fujitsu Extended Query Table at 0x0040

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

Reducing visibility of 4096KiB chip to 3072KiB

cmdlinepart partition parsing not available

RedBoot partition parsing not available

Using physmap partition information

Creating 1 MTD partitions on "physmap-flash.0":

0x00000000-0x00300000 : "file system(nor)"

m25p80 spi0.2: m25p128 (16384 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x00000000-0x00040000 : "bootloader(spi)"

0x00040000-0x00200000 : "linux kernel(spi)"

0x00200000-0x01000000 : "file system(spi)"

bfin-spi bfin-spi.0: cs5 >= max 5

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b

ase@ffc00500, dma channel@7

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b

ase@ffc03400, dma channel@5

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

dma_alloc_init: dma_page @ 0x01e19000 - 256 pages at 0x01f00000

TCP cubic registered

NET: Registered protocol family 17

Distributed Switch Architecture driver version 0.1

eth0: detected a KSZ8893M switch

dsa slave smi: probed

rtc-bfin rtc-bfin: setting system clock to 1991-03-12 17:20:26 UTC (668798426)

Empty flash at 0x0000fffc ends at 0x00010000

CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)

Empty flash at 0x0001fffc ends at 0x00020000

CLEANMARKER node found at 0x00020000, not first node in block (0x00000000)

Empty flash at 0x0002fffc ends at 0x00030000

CLEANMARKER node found at 0x00030000, not first node in block (0x00000000)

Empty flash at 0x0004ff80 ends at 0x00050000

CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)

Empty flash at 0x0005fffc ends at 0x00060000

CLEANMARKER node found at 0x00060000, not first node in block (0x00040000)

Empty flash at 0x0006fffc ends at 0x00070000

CLEANMARKER node found at 0x00070000, not first node in block (0x00040000)

Empty flash at 0x0008fffc ends at 0x00090000

CLEANMARKER node found at 0x00090000, not first node in block (0x00080000)

Empty flash at 0x0009fffc ends at 0x000a0000

CLEANMARKER node found at 0x000a0000, not first node in block (0x00080000)

Empty flash at 0x000afffc ends at 0x000b0000

CLEANMARKER node found at 0x000b0000, not first node in block (0x00080000)

Empty flash at 0x000cfffc ends at 0x000d0000

CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000)

Empty flash at 0x000dfffc ends at 0x000e0000

CLEANMARKER node found at 0x000e0000, not first node in block (0x000c0000)

Empty flash at 0x000efffc ends at 0x000f0000

CLEANMARKER node found at 0x000f0000, not first node in block (0x000c0000)

Empty flash at 0x0010fffc ends at 0x00110000

CLEANMARKER node found at 0x00110000, not first node in block (0x00100000)

Empty flash at 0x0011fffc ends at 0x00120000

CLEANMARKER node found at 0x00120000, not first node in block (0x00100000)

Empty flash at 0x0012fffc ends at 0x00130000

CLEANMARKER node found at 0x00130000, not first node in block (0x00100000)

Empty flash at 0x0014fffc ends at 0x00150000

CLEANMARKER node found at 0x00150000, not first node in block (0x00140000)

Empty flash at 0x0015fffc ends at 0x00160000

CLEANMARKER node found at 0x00160000, not first node in block (0x00140000)

Empty flash at 0x0016fffc ends at 0x00170000

CLEANMARKER node found at 0x00170000, not first node in block (0x00140000)

Empty flash at 0x0018fffc ends at 0x00190000

CLEANMARKER node found at 0x00190000, not first node in block (0x00180000)

Empty flash at 0x0019fffc ends at 0x001a0000

CLEANMARKER node found at 0x001a0000, not first node in block (0x00180000)

Empty flash at 0x001afffc ends at 0x001b0000

CLEANMARKER node found at 0x001b0000, not first node in block (0x00180000)

Empty flash at 0x001cfffc ends at 0x001d0000

CLEANMARKER node found at 0x001d0000, not first node in block (0x001c0000)

Empty flash at 0x001dfffc ends at 0x001e0000

CLEANMARKER node found at 0x001e0000, not first node in block (0x001c0000)

Empty flash at 0x001efffc ends at 0x001f0000

CLEANMARKER node found at 0x001f0000, not first node in block (0x001c0000)

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 120k freed

   *************************************************************

  *       check the username and passwords successful!          *

   *************************************************************

  *            _   _     _                                      *

  *          / _| | |   |_|            __  __ (TM)              *

  *   _   _ | |   | |    _ ____  _   _ \ \/ /                   *

  *  | | | || |   | |   | |  _ \| | | | \  /     uClinux        *

  *  | |_| || |__ | |__ | | | | | |_| | /  \   www.naritech.cn  *

   * \_____| \___/\____||_|_| |_|\____|/_/\_\                  *

     *********************************************************

           *  **This is a uClinux for naritech!**  *

           *****************************************

           * ~~~    ~~     ~~~     ~~~~~~   ~~~~~~ *

           * ~~ ~   ~~    ~~ ~~    ~~    ~    ~~   *

           * ~~  ~  ~~   ~~   ~~   ~~~~~~     ~~   *

           * ~~   ~ ~~  ~~  ~~ ~~  ~~ ~       ~~   *

           * ~~    ~~~ ~~       ~~ ~~  ~~~  ~~~~~~ *

           *****************************************

                 **Welcome to naritech!**

 

 

BusyBox v1.13.4 (2009-12-17 00:14:44 PST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> eth1: link up, 100 Mb/s, full duplex

TranslateQuoteReplyEditDelete

 

 

2010-03-08 04:07:57     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86945   

 

static struct mtd_partition bfin_spi_flash_partitions[] =

{

{

  .name = "bootloader(spi)",

  .size = 0x00040000,

  .offset = 0,

  .mask_flags = MTD_CAP_ROM

}, {

  .name = "linux kernel(spi)",

  .size = 0x1C0000,

  .offset = MTDPART_OFS_APPEND,

},{

  .name       = "file system(spi)",

  .size       = MTDPART_SIZ_FULL,

  .offset     = MTDPART_OFS_APPEND,

}

};

TranslateQuoteReplyEditDelete

 

 

2010-03-08 04:18:53     Re: 加载文件系统时出现的几个异常现象

Sonic Zhang (CHINA)

Message: 86947   

 

Any change to struct flash_paltform_data?

QuoteReplyEditDelete

 

 

2010-03-08 04:44:11     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86948   

 

有,static struct flash_platform_data bfin_spi_flash_data =

       {

.name = "m25p80",

.parts = bfin_spi_flash_partitions,

.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),

.type = "m25p128",//.type = "m25p16",

       };

TranslateQuoteReplyEditDelete

 

 

2010-03-08 04:52:29     Re: 加载文件系统时出现的几个异常现象

Sonic Zhang (CHINA)

Message: 86949   

 

How do you write the images into the spi flash?

 

step by step please.

QuoteReplyEditDelete

 

 

2010-03-08 06:49:58     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86950   

 

bfin>sf probe 2

bfin>sf erase 0x40000 0x140000

bfin>tftp 1000000 vmImage

bfin>sf write 0x1000000 0x40000 size

bfin>tftp 1000000 rootfs.jffs2

bfin>sf write 0x1000000 0x200000 size

 

但是好像在擦除0x40000到0x140000时把u-boot擦掉了,要重新烧写u-boot,修改环境变量后系统能运行,但是就是会出现上面那种情况,M25P128美国sector的大小是0x40000,不是M25P16的0x10000

TranslateQuoteReplyEditDelete

 

 

2010-03-08 22:37:29     Re: 加载文件系统时出现的几个异常现象

Yi Li (CHINA)

Message: 86960   

 

zhihua,

 

sf write 之前,应该做 sf erase. (在kernel里,要做flash_eraseall).

 

Please note,写flash之前,都应该先做erase.

 

-Yi

QuoteReplyEditDelete

 

 

2010-03-09 00:01:21     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86961   

 

Hi,Yi,

 

    可是我在写kernel之前先执行了sf erase 0x40000 0x140000的啊?是不是在写kernel和filesystem之前都得分别执行sf erase 0x40000 0x200000和sf erase 0x200000 0x1000000把所有空间全部擦除,因为现在总的空间是到0x1000000,而且我发现执行完sf erase 之后u-boot就起不来了,要重新load一遍u-boot,是因为我擦写的那个起始和结束地址有问题吗?在m25p16这样擦除是没问题的...

TranslateQuoteReplyEditDelete

 

 

2010-03-09 02:05:38     Re: 加载文件系统时出现的几个异常现象

Yi Li (CHINA)

Message: 86964   

 

> 是不是在写kernel和filesystem之前都得分别执行sf erase

 

是的

 

你的sf erase的用法貌似也不对,sf erase $start_address $sector_size

 

-Yi

QuoteReplyEditDelete

 

 

2010-03-09 02:25:27     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86965   

 

thank you,Yi,

 

    我先试试看...

TranslateQuoteReplyEditDelete

 

 

2010-03-09 03:08:49     Re: 加载文件系统时出现的几个异常现象

zhang zhihua (CHINA)

Message: 86967   

 

Hi,Yi,

 

    我每个sector的大小是0x40000,那么我擦除从0x40000两个sector是不是就应该sf erase 0x40000 0x80000?

 

而且从0x40000开始一个一个地将扇区擦除后从0x40000写入kernel,0x200000写入filesystem,但是u-boot还是坏掉了,怎么回事?

TranslateQuoteReplyEditDelete

 

 

2010-03-10 04:06:22     Re: 加载文件系统时出现的几个异常现象

Yi Li (CHINA)

Message: 87035   

 

Sorry. 我前面回帖不正确:

 

sf erase offset len : erase 'len' bytes from 'offset‘.

 

请参照:   docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:serial-flash

 

另外,你还可以在kernel中 erase, write SPI flash,e.g:

 

flash_eraseall /dev/mtd1

 

cat kernel_image > /dev/mtd1

 

-Yi

Attachments

    Outcomes