AnsweredAssumed Answered

如何减小mtd_size ?

Question asked by jizhenyue on Jul 18, 2012
Latest reply on Jul 19, 2012 by Aaronwu

开发板为BF512,内存32MB。 移植uclinux系统至开发板后,rootfs无法映射到内存。初步认为是内存太小所导致,请问应该如何减小mtd_size? 或者应该如何修改文件系统到内存的映射?望不吝赐教!谢谢!




NAND read: device 0 offset 0x0, size 0x200000

2097152 bytes read: OK

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

   Image Name:   bf512-0.1-3.0.8-ADI-2011R1-svn52

   Created:      2012-07-17   8:47:40 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1159747 Bytes = 1.1 MiB

   Load Address: 00001000

   Entry Point:  001ebc4c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001ebc4c

Linux version 3.0.8-ADI-2011R1-svn52 (gcc version 4.3.5 (ADI-201

2R1-BETA1) ) #2 Tue Jul 17 04:46:40 EDT 2012

register early platform devices

Could not find valid ram mtd attached.

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x0015c618

  rodata    = 0x0015c618-0x001c2db8

  bss       = 0x001c3000-0x001d34e8

  data      = 0x001d34e8-0x001e8000

    stack   = 0x001e6000-0x001e8000

  init      = 0x001e8000-0x00203000

  available = 0x00203000-0x01f00000

  rootfs    = 0x  (null)-0x  (null)

  DMA Zone  = 0x01f00000-0x02000000

Hardware Trace active and enabled

Boot Mode: 3

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

Compiled for ADSP-BF512 Rev 0.1

Blackfin Linux support by

Processor Speed: 300 MHz core clock and 75 MHz System Clock

Instruction Cache Disabled for CPU0

Data Cache Disabled for CPU0

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

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

arlyprintk=serial,uart0,115200 console=ttyBF0,115200

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

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

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

Memory available: 29356k/32768k RAM, (108k init code, 1389k kernel code, 559k da

ta, 1024k dma, 332k reserved)


Configuring Blackfin Priority Driven Interrupts

bfin-rtc: invalid date; resetting

console [ttyBF0] enabled

Calibrating delay loop... 571.39 BogoMIPS (lpj=1142784)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 32 KB (31 KB free)

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

Blackfin L1 Instruction SRAM: 32 KB (20 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

dso0324_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

Switching to clocksource bfin_cs_cycles

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

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

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

msgmni has been set to 57

Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

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

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

bfin-sport-uart: Blackfin uart over sport driver

bfin-sport-uart.0: ttySS0 at MMIO 0xffc00800 (irq = 23) is a BFIN-SPORT-UART

bfin-sport-uart.1: ttySS1 at MMIO 0xffc00900 (irq = 25) is a BFIN-SPORT-UART

brd: module loaded

uclinux[mtd]: RAM probe address=0x1c30e8 size=0xa3f000

Creating 1 MTD partitions on "RAM":

0x000000000000-0x000000a3f000 : "ROMfs"

Generic platform RAM MTD, (c) 2004 Simtec Electronics

NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bi


Scanning device for bad blocks

Bad eraseblock 35 at 0x000000460000

Bad eraseblock 44 at 0x000000580000

Bad eraseblock 45 at 0x0000005a0000

Bad eraseblock 46 at 0x0000005c0000

Bad eraseblock 47 at 0x0000005e0000

Bad eraseblock 48 at 0x000000600000

Bad eraseblock 49 at 0x000000620000

Bad eraseblock 50 at 0x000000640000

Bad eraseblock 51 at 0x000000660000

Bad eraseblock 994 at 0x000007c40000

Creating 2 MTD partitions on "gen_nand":

0x000000000000-0x000000400000 : "linux kernel(nand)"

0x000000400000-0x000010000000 : "file system(nand)"

dm9000 Ethernet Driver, V1.31

dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig

eth0: dm9000a at 20000000,20000002 IRQ 88 MAC: ca:52:de:25:8f:2c (random)