2009-02-18 08:28:45     RootFS in 2008R1.5

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

2009-02-18 08:28:45     RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 69556   




In 2008R1.5 uClinux kernel, the uClinux MTD map is always available, but it is no longer the default. How do we determine the address in SDRAM to which rootfs is mapped to?




2009-02-18 08:49:41     Re: RootFS in 2008R1.5

Michael Hennerich (GERMANY)

Message: 69559   


We changed the default rootfs to initramfs/initrd.

CONFIG_MTD_UCLINUX is currently not used.


Initramfs is not a MTD and grows dynamically.

So why do you care where the filesystem is mapped to?







2009-02-18 09:48:55     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 69565   


Hi Michael,


Since no RAM space is now locked for rootfs as it was being done in 2007R1, will this 16MB space now be part of heap memory so that we can use it for dynamic allocation in our application that runs in uClinux?




2009-02-18 12:16:46     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 69578   


all memory is technically part of the kernel heap.


just because the initramfs method isnt the default doesnt mean you cant use the old way.




2009-02-18 22:36:23     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 69593   


When we ran our application in 2007R1 kernel, we are getting the following status for the 'free' command:


# free


                       total         used         free       shared      buffers


  Mem:        45740        40432         5308            0          192




But, when we ran the same application in 2008R1.5 kernel, the mem status is as follows:


# free


                       total         used         free       shared      buffers


  Mem:        60216        36808        23408            0            0

Could you please clarify the following:

1. Why the total mem has increased to 60M from 45M?

2. What is the reason for an increase in the free memory from 5M to 23M?






2009-02-18 23:11:35     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 69595   


you've already discovered why: initramfs is dynamic while uclinux mtd is a hard limit, and the latter goes through the page cache




2009-02-18 23:39:22     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 69597   


What is the main reason to change the initramfs from an mtd device in 2007R1 to dynamically growing type in 2008R1.5?


Is it advisable to use rootfs as an mtd device or retain the current dynamic feature? Also, do the names 'rootfs' and 'initramfs' mean the same?




2009-02-18 23:55:48     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 69599   


it's generally easier to work with things that are dynamic than static, and that is true here


rootfs does not mean the same thing as initrarmfs ... an initramfs can be a rootfs




2009-02-23 02:02:38     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 69733   


To enable MTD, is it enough if I just enable the macro CONFIG_MTD_UCLINUX in .config file?If not, please let me know the correct procedure to enable MTD.




2009-02-23 11:30:32     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 69760   


the MTD layer is documented in the wiki:





2009-02-26 11:14:39     Re: RootFS in 2008R1.5

Sudhakar GN (INDIA)

Message: 70014   


Hi Mike,


I am also looking to enable MTD for BF533.


Could you provide the procedure to enable "CONFIG_MTD_UCLINUX" from make menuconfig options?










2009-02-26 11:19:26     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 70016   


step 1: enable uClinux MTD

step 2: done




2009-02-26 11:43:51     Re: RootFS in 2008R1.5

Sudhakar GN (INDIA)

Message: 70018   


Could not locate  "step 1: enable uClinux MTD" under in make menuconfig options.


Menu settings flow  information will help..










2009-03-02 17:12:10     Re: RootFS in 2008R1.5

Rob Maris (GERMANY)

Message: 70233   


kernel configuration under "Device Drivers",  one of the entries on top.




2009-03-03 01:12:41     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 70244   




We were able to enable MTD and now we are getting uImage.ext2 as binary image instead of uImage.initramfs. We also enabled the jffs2 filesystem after which we got the rootfs.jfff2 file. Our intereset is to use the flash as romfs (jffs2 filesystem over flash) and access it as a MTD device.  Even after enabling the make menuconfig options as mentioned in the link  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:mtd we are not getting the MTD partitions for flash.  We get the below message


Creating 1 MTD partitions on "RAM":

0x00000000-0x01000000 : "ROMfs"


We are using the BF533-EZKIT version. Please suggest us the way to use flash as romfs (as a MTD device).




2009-03-03 01:36:55     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 70245   


By BF533-EZKIT we actually mean that the version was taken as a base and customised for our project. The flash we use is CFI complaint. Please let me know if you need any special info.




2009-03-03 01:46:08     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 70247   


partitions dont get detected if you havent enabled the right drivers for the partitions to set on top of


post the entire kernel boot output rather than a snippet




2009-03-03 02:27:19     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 70254   


Hi Mike,


Please find the kernel start up print


## Booting image at 01000000 ...

   Image Name:   uClinux Kernel and ext2

   Created:      2009-03-03   7:10:45 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    2291009 Bytes =  2.2 MB

   Load Address: 00180000

   Entry Point:  00318000

   Verifying Checksum ... crc32 = 0x99be5dbe


   Uncompressing Kernel Image ... OK

Starting Kernel at = 318000

Linux version (karthi@host_120) (gcc version 4.1.2 (ADI svn)) #161 Tue Mar 3 12:40:17 IST 2009

Hardware Trace Active and Enabled

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

Compiled for ADSP-BF533 Rev 0.5

Blackfin Linux support by  blackfin.uclinux.org/

Processor Speed: 594 MHz core clock and 118 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00180000-0x0029d720

  rodata    = 0x0029e000-0x00307ad8

  data      = 0x00308000-0x00318000

    stack   = 0x00308000-0x0030a000

  init      = 0x00318000-0x00334000

  bss       = 0x00334000-0x003e3b1c

  available = 0x003e3b1c-0x02f00000

  rootfs    = 0x02f00000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled

Data Cache Enabled (write-back)

Built 1 zonelists.  Total pages: 11938

Kernel command line: root=/dev/mtdblock0 ip= console=ttyBF0,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

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

Memory available: 43568k/65536k RAM, (112k init code, 1141k kernel code, 1193k data, 1024k dma, 2116k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (3 KB free)

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

Blackfin Instruction SRAM: 64 KB (52 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

ezkit_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: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

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

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Inside FPGA Driver init

condifure FPGA

initiate FPGA access


inside Initiate FPGA


going out Initiate FPGA

configuring GPIO


After Config_GPIO_Pins


after EXP_SetLatchBits


After init_config_fpga

Inside config SPORT

SPORT config


Inside WAIT_For_FPGA_Ready


inside while(1)


out of while(1) FPGA is ready


Got ready signal from FPGA


Configuring FPGA .........

inside DONE true condition


Configured FPGA Successfully


Initiating the access for FPGA registers


Reading data from WLAN registers


Hexa decimal Value Read from register




Passed at iteration: 0ADAV803 Module enabled


/* Flash Driver */


ST Micro Electronics Flash device

Bottom Boot M28640HSBXXX Flash device

Intel Compatible Control Interface

Flash Size : 8MB

Gpio module enabled

Keypad Module enabled


LCD Module enabled

IR Module enabled

Single Core  Loader Module enabled

timer_initialize: module loaded

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

Serial: Blackfin serial driver

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

RAMDISK driver initialized: 1 RAM disks of 4096K size 1024 blocksize

smc91x: not found (-19).

Network interface: "eth0"<6>/proc/HW_ADDR created

ret value from smsc911x_drv_probe Func is 0

uclinux[mtd]: RAM probe address=0x2f00000 size=0x1000000

Creating 1 MTD partitions on "RAM":

0x00000000-0x01000000 : "ROMfs"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@5

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

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 22:17:39 (80259)

eth0: link down

IP-Config: Complete:

      device=eth0, addr=, mask=, gw=,

     host=np2x00, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

VFS: Mounted root (ext2 filesystem) readonly.

Freeing unused kernel memory: 112k freed

dma_alloc_init: dma_page @ 0x0032f000 - 256 pages at 0x03f00000


        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -  blackfin.uclinux.org/

\    YP"    `| 8P  `.          -  docs.blackfin.uclinux.org/

/     \.___.d|    .'           -  www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -  www.analog.com/blackfin


Have a lot of fun...

th0: link up, 100Mbps, full-duplex, lpa 0x4DE1

Unable to bind server socket to port 23: Address already in use

chmod: Philips_NP: No such file or directory

insmod: wl.ko: No such file or directory

Philips_NP: not found

init: Booting to single user mode



BusyBox v1.4.1 (2009-03-02 15:57:56 IST) Built-in shell (msh)

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






2009-03-03 02:37:35     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 70255   


did you actually enable an appropriate driver then ?  or are you using your own driver ?




2009-03-03 04:18:00     Re: RootFS in 2008R1.5

Hari Prasad (INDIA)

Message: 70273   


Hi Mike,


We are using our own driver.




2009-03-03 16:49:36     Re: RootFS in 2008R1.5

Mike Frysinger (UNITED STATES)

Message: 70305   


then you'll have to review the stack to make sure your driver is doing the right thing.  the existing stack is geared towards using the common CFI drivers, not custom ones.