This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How can I expand the limited ramdisk size?

Other Parts Discussed in Thread: OMAP-L138, DA8XX

Hello

I modifed ramdisk by reference to below link:
 http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK

Thogh I could size up my ramdisk.gz from 4M to 5M.
when over 5M, booting is failed.

Is this concerned in DRAM size for operating
and not to recommend over 4M ramdisk?

OMAP-L138 initialization passed!
Booting TI User Boot Loader
        UBL Version: 1.65
        UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
   DONE
Jumping to entry point at 0xC1080000.


U-Boot 2009.11-dirty ( 8월 04 2010 - 17:31:48)

I2C:   ready
DRAM:  64 MB
NAND:  512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In:    serial
Out:   serial
Err:   serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net:   Ethernet PHY: GENERIC @ 0x00

Hit any key to stop autoboot:  0
U-Boot > printenv
bootdelay=3
baudrate=115200
ethaddr=00:00:00:00:0c:00
autoload=no
nfshost=192.0.0.171
bootfile=uImage.08.bin
filesize=57C726
fileaddr=C1180000
ipaddr=192.0.0.80
serverip=192.0.0.171
bootcmd=nand read.e 0xc1180000 0x400000 0x600000; nboot.e 0xc0700000 0 0x200000; bootm
bootargs=mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,6M
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.11-dirty ( 8월 04 2010 - 17:31:48)

Environment size: 441/131068 bytes
U-Boot > boot

NAND read: device 0 offset 0x400000, size 0x600000
 6291456 bytes read: OK

Loading from NAND 512MiB 3,3V 8-bit, offset 0x200000
   Image Name:   Linux-2.6.33-rc4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1879520 Bytes =  1.8 MB
   Load Address: c0008000
   Entry Point:  c0008000
## Booting kernel from Legacy Image at c0700000 ...
   Image Name:   Linux-2.6.33-rc4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1879520 Bytes =  1.8 MB
   Load Address: c0008000
   Entry Point:  c0008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.33-rc4 (sypark@omap-test) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #13 PREEMPT Thu Mar 24 18:55:23 KST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA850/OMAP-L138/AM18xx EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci da850/omap-l138 variant 0x0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,6M
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: 32MB = 32MB total
Memory: 22340KB available (3572K code, 267K data, 124K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)
Switching to clocksource timer0_1
musb_hdrc: version 6.0, cppi4.1-dma, host, debug=0
Waiting for USB PHY clock good...
musb_hdrc: USB Host mode controller at fee00000 using DMA, IRQ 58
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
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
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 6144K
EMAC: MII PHY configured, RMII PHY will not be functional
JFFS2 version 2.2. (NAND) ⓒ 2001-2006 Red Hat, Inc.
msgmni has been set to 55
io scheduler noop registered (default)
da8xx_lcdc da8xx_lcdc.0: GLCD: Found DVI_Adapter panel
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
console [ttyS2] enabled
brd: module loaded
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 2
ohci ohci.0: irq 59, io mem 0x01e25000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
input: TPS6507x Touchscreen as /devices/platform/i2c-gpio.1/i2c-1/1-0048/input/input0
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
i2c /dev entries driver
watchdog watchdog: heartbeat 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
usbcore: registered new interface driver snd-usb-audio
No device for DAI tlv320aic3x
asoc: tlv320aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DA850/OMAP-L138 EVM (tlv320aic3x)
TCP cubic registered
NET: Registered protocol family 17
Clocks: disable unused i2c1
Clocks: disable unused emac
Clocks: disable unused mmcsd
Clocks: disable unused aemif
Clocks: disable unused spi0
Clocks: disable unused spi1
Clocks: disable unused mcbsp0
Clocks: disable unused mcbsp1
Clocks: disable unused vpif
davinci_emac_probe: using random MAC addr: 16:3b:e4:84:fa:46
emac-mii: probed
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
RAMDISK: gzip image found at block 0
swapper invoked oom-killer: gfp_mask=0x200d0, order=0, oom_adj=0
Backtrace:
[<c002b730>] (dump_backtrace+0x0/0x114) from [<c02cc218>] (dump_stack+0x18/0x1c)
 r7:c1c22000 r6:00000000 r5:00000000 r4:c1c22000
[<c02cc200>] (dump_stack+0x0/0x1c) from [<c0072e40>] (dump_header+0x70/0x170)
[<c0072dd0>] (dump_header+0x0/0x170) from [<c0073650>] (__out_of_memory+0x168/0x1b8)
 r6:00000000 r5:00000000 r4:c03a7728
[<c00734e8>] (__out_of_memory+0x0/0x1b8) from [<c0073750>] (out_of_memory+0xb0/0x104)
[<c00736a0>] (out_of_memory+0x0/0x104) from [<c00766bc>] (__alloc_pages_nodemask+0x418/0x514)
 r6:000200d0 r5:00000000 r4:00000000
[<c00762a4>] (__alloc_pages_nodemask+0x0/0x514) from [<c00708bc>] (grab_cache_page_write_begin+0x58/0x98)
[<c0070864>] (grab_cache_page_write_begin+0x0/0x98) from [<c00c69b8>] (block_write_begin+0x40/0x120)
[<c00c6978>] (block_write_begin+0x0/0x120) from [<c00cb4b4>] (blkdev_write_begin+0x44/0x50)
[<c00cb470>] (blkdev_write_begin+0x0/0x50) from [<c006f940>] (generic_file_buffered_write+0xe8/0x21c)
[<c006f858>] (generic_file_buffered_write+0x0/0x21c) from [<c00719b0>] (__generic_file_aio_write+0x4c8/0x51c)
[<c00714e8>] (__generic_file_aio_write+0x0/0x51c) from [<c00ca954>] (blkdev_aio_write+0x44/0xa4)
[<c00ca910>] (blkdev_aio_write+0x0/0xa4) from [<c009eea8>] (do_sync_write+0x9c/0xe8)
 r8:00008000 r7:00008000 r6:c1c23eb8 r5:c0f72e80 r4:c1c23de8
[<c009ee0c>] (do_sync_write+0x0/0xe8) from [<c009f970>] (vfs_write+0xb8/0x164)
 r6:c1c23eb8 r5:c0f78000 r4:c0f72e80
[<c009f8b8>] (vfs_write+0x0/0x164) from [<c009fae0>] (sys_write+0x44/0x70)
 r8:c0f78000 r7:00008000 r6:c0f72e80 r5:00000000 r4:011f1a4e
[<c009fa9c>] (sys_write+0x0/0x70) from [<c00093f4>] (compr_flush+0x24/0x64)
 r8:00000000 r7:c0f6c000 r6:00000000 r5:c03c9f44 r4:00008000
[<c00093d0>] (compr_flush+0x0/0x64) from [<c0017024>] (gunzip+0x27c/0x34c)
 r5:c0f73340 r4:00008000
[<c0016da8>] (gunzip+0x0/0x34c) from [<c00096c8>] (rd_load_image+0x294/0x564)
[<c0009434>] (rd_load_image+0x0/0x564) from [<c0009ab0>] (initrd_load+0x40/0x330)
[<c0009a70>] (initrd_load+0x0/0x330) from [<c00091f4>] (prepare_namespace+0xcc/0x1c8)
 r5:c0023a08 r4:c0023a18
[<c0009128>] (prepare_namespace+0x0/0x1c8) from [<c00084c8>] (kernel_init+0xf0/0x12c)
 r5:00000000 r4:c03c9d00
[<c00083d8>] (kernel_init+0x0/0x12c) from [<c003f098>] (do_exit+0x0/0x6b4)
 r5:00000000 r4:00000000
Mem-info:
DMA per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
active_anon:0 inactive_anon:0 isolated_anon:0
 active_file:5 inactive_file:14 isolated_file:0
 unevictable:1536 dirty:13 writeback:1 unstable:0
 free:180 slab_reclaimable:33 slab_unreclaimable:192
 mapped:0 shmem:0 pagetables:0 bounce:0
DMA free:720kB min:720kB low:900kB high:1080kB active_anon:0kB inactive_anon:0kB active_file:20kB inactive_file:56kB unevictable:6144kB isolated(anon):0kB isolated(file):0kB present:32512kB mlocked:0kB dirty:52kB writeback:4kB mapped:0kB shmem:0kB slab_reclaimable:132kB slab_unreclaimable:768kB kernel_stack:176kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:154 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0
DMA: 12*4kB 0*8kB 4*16kB 1*32kB 1*64kB 2*128kB 1*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 720kB
1555 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
8192 pages of RAM
202 free pages
1071 reserved pages
178 slab pages
32 pages shared
0 pages swap cached
Kernel panic - not syncing: Out of memory and no killable processes...

Backtrace:
[<c002b730>] (dump_backtrace+0x0/0x114) from [<c02cc218>] (dump_stack+0x18/0x1c)
 r7:c1c22000 r6:00000000 r5:00000000 r4:c03ca458
[<c02cc200>] (dump_stack+0x0/0x1c) from [<c02cc280>] (panic+0x64/0x13c)
[<c02cc21c>] (panic+0x0/0x13c) from [<c0073658>] (__out_of_memory+0x170/0x1b8)
 r3:00000000 r2:00000001 r1:0000227e r0:c0359e66
[<c00734e8>] (__out_of_memory+0x0/0x1b8) from [<c0073750>] (out_of_memory+0xb0/0x104)
[<c00736a0>] (out_of_memory+0x0/0x104) from [<c00766bc>] (__alloc_pages_nodemask+0x418/0x514)
 r6:000200d0 r5:00000000 r4:00000000
[<c00762a4>] (__alloc_pages_nodemask+0x0/0x514) from [<c00708bc>] (grab_cache_page_write_begin+0x58/0x98)
[<c0070864>] (grab_cache_page_write_begin+0x0/0x98) from [<c00c69b8>] (block_write_begin+0x40/0x120)
[<c00c6978>] (block_write_begin+0x0/0x120) from [<c00cb4b4>] (blkdev_write_begin+0x44/0x50)
[<c00cb470>] (blkdev_write_begin+0x0/0x50) from [<c006f940>] (generic_file_buffered_write+0xe8/0x21c)
[<c006f858>] (generic_file_buffered_write+0x0/0x21c) from [<c00719b0>] (__generic_file_aio_write+0x4c8/0x51c)
[<c00714e8>] (__generic_file_aio_write+0x0/0x51c) from [<c00ca954>] (blkdev_aio_write+0x44/0xa4)
[<c00ca910>] (blkdev_aio_write+0x0/0xa4) from [<c009eea8>] (do_sync_write+0x9c/0xe8)
 r8:00008000 r7:00008000 r6:c1c23eb8 r5:c0f72e80 r4:c1c23de8
[<c009ee0c>] (do_sync_write+0x0/0xe8) from [<c009f970>] (vfs_write+0xb8/0x164)
 r6:c1c23eb8 r5:c0f78000 r4:c0f72e80
[<c009f8b8>] (vfs_write+0x0/0x164) from [<c009fae0>] (sys_write+0x44/0x70)
 r8:c0f78000 r7:00008000 r6:c0f72e80 r5:00000000 r4:011f1a4e
[<c009fa9c>] (sys_write+0x0/0x70) from [<c00093f4>] (compr_flush+0x24/0x64)
 r8:00000000 r7:c0f6c000 r6:00000000 r5:c03c9f44 r4:00008000
[<c00093d0>] (compr_flush+0x0/0x64) from [<c0017024>] (gunzip+0x27c/0x34c)
 r5:c0f73340 r4:00008000
[<c0016da8>] (gunzip+0x0/0x34c) from [<c00096c8>] (rd_load_image+0x294/0x564)
[<c0009434>] (rd_load_image+0x0/0x564) from [<c0009ab0>] (initrd_load+0x40/0x330)
[<c0009a70>] (initrd_load+0x0/0x330) from [<c00091f4>] (prepare_namespace+0xcc/0x1c8)
 r5:c0023a08 r4:c0023a18
[<c0009128>] (prepare_namespace+0x0/0x1c8) from [<c00084c8>] (kernel_init+0xf0/0x12c)
 r5:00000000 r4:c03c9d00
[<c00083d8>] (kernel_init+0x0/0x12c) from [<c003f098>] (do_exit+0x0/0x6b4)
 r5:00000000 r4:00000000

Thank you for reading.

  • Hi,

    Do a regular boot with 4M Ramdisk and execute below command. Show the output

    "dmesg | grep RAMDISK"

    Try below methods

     

    1. http://www.kernel.org/doc/Documentation/blockdev/ramdisk.txt

    2) Kernel Command Line Parameters
    ---------------------------------
    
    	ramdisk_size=N
    	==============
    
    This parameter tells the RAM disk driver to set up RAM disks of N k size.  The
    default is 4096 (4 MB) (8192 (8 MB) on S390).
    
    	ramdisk_blocksize=N
    	===================
    
    This parameter tells the RAM disk driver how many bytes to use per block.  The
    default is 1024 (BLOCK_SIZE).


    2.
    http://www.denx.de/wiki/DULG/HowToIncreaseSizeOfRamdisk

    Finally try below command to confirm

    df -h | grep *ram*

    Regards
    Gururaja
  •  Hello, Seyoung!

    Did you resolve this issue?

    I have the same one. In my case I increased my uncompressed initrd up to 16M (changed kernel option, boot params & ramdisk size), but I can't allocate memory for it. I receive the following error after kernel loading: 

    RAMDISK: gzip image found at block 0
    swapper invoked oom-killer: gfp_mask=0x200d0, order=0, oom_adj=0, oom_score_adj=0
    Backtrace:
    [<c000c25c>] (dump_backtrace+0x0/0x114) from [<c01e1ca8>] (dump_stack+0x18/0x1c)

    .......

    3594 total pagecache pages
    8192 pages of RAM
    206 free pages
    801 reserved pages
    215 slab pages
    14 pages shared
    0 pages swap cached
    [ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name
    Kernel panic - not syncing: Out of memory and no killable processes...

     

     I have 32M from 0xC0000000 to 0xC2000000. When I use initrd with size 13M it's all good. The command df -h returns me:

    ~ # df -h
    Filesystem Size Used Available Use% Mounted on
    /dev/root 12.6M 6.2M 6.4M 49% /
    mdev 14.5M 0 14.5M 0% /dev
    /dev/mtdblock4 1.5M 788.0K 748.0K 51% /Flash
    ~ #

     Do you now how to adjust memory space for the ramdisk? Is it possible generally? 

    I'll be thankful for any help.

    Bakir