2008-03-07 15:10:54     disabling rootfs to free memory

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

2008-03-07 15:10:54     disabling rootfs to free memory

David Rowe (AUSTRALIA)

Message: 52203    Hi,

 

On the IP04 hardware I am using I would like to remove (or at least greatly reduce) the memory used by rootfs.  My root filesystem is on yaffs so a ram based rootfs file system is not required.  I am using uClinux-dist-2007R1.1-RC3.

 

Could some one pls suggest the correct CONFIG options to select?

 

Here is my current dmesg:

 

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x00158284

  init      = 0x00159000-0x00169948

  data      = 0x0016ba50-0x001abe90

  stack     = 0x0016c000-0x0016e000

  bss       = 0x001abe90-0x001ba004

  available = 0x001ba004-0x03700000

  rootfs    = 0x03700000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

 

<snip>

 

VFS: Mounted root (yaffs filesystem).

 

root:~>

 

I would like to see as above with the rootfs entry removed.  I tried turning off:

 

Drivers-Memory Technology Devices (MTD) Mapping drivers for chip access - Generic uClinux RAM/ROM filesystem support

 

This gets me close:

 

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x00157cd0

  init      = 0x00158000-0x0046b1ac

  data      = 0x0046d260-0x004addc0

  stack     = 0x0046e000-0x00470000

  bss       = 0x004addc0-0x004bbf20

  available = 0x004bbf20-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

truction Cache Enabled

Data Cache Enabled (write-back)

Hardware Trace Enabled

Built 1 zonelists.  Total pages: 16002

Kernel command line: ethaddr=00:09:45:53:d1:ee console=ttyBF0,115200 root=/dev/mtdblock2 rw

 

<snip>

 

root:~> free

              total         used         free       shared      buffers

  Mem:        62232         8300        53932            0            0

root:~> mount

rootfs on / type rootfs (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

usbfs on /proc/bus/usb type usbfs (rw)

securityfs on /sys/kernel/security type securityfs (rw)

 

Lots of memory (great!), however for some reason (despite the kernel command line), root is not mounted on yaffs (mtdblock2).  Also - despite removing rootfs for the kernel I seem to have a ram based rootsfs from somewhere.

 

Any suggestions would be much appreciated.

 

Thanks,

 

David

QuoteReplyEditDelete

 

 

2008-03-07 15:27:50     Re: disabling rootfs to free memory

Mike Frysinger (UNITED STATES)

Message: 52204    the uClinux MTD RAM option controls the ramdisk backed rootfs (which is the "rootfs" in the memory map)

 

the initramfs option controls the ramfs backed rootfs

 

however, these options are only checked by the ADI Makefile's in the uclinux-dist ... if you're creating your own, you can modify the images target to produce the images you want

Attachments

    Outcomes