[ELDK] Problem with ramdisk

Detlev Zundel dzu at denx.de
Tue Jul 14 12:10:49 CEST 2009


Hi Ashok,

>  We are porting linux on MPC8540 based custom board, some problem is coming with ramdisk,
> since we got only 8MB of SDRAM on the board, we couldn't use the uRamdisk that has come with
> the ELDK, when using it kernel panic is coming with the "out of memory and no killable process"
> error. 

8 MB is *very* tight with a 2.6 kernel.  Actually I'm not sure if you
can make this combination fly at all, but one thing is clear, an ext2
initrd is not the best choice for your system as it bogs down precious
ram.  I don't see that you have nor flash support in your kernel, but
this would be one way to go, i.e. use a filesystem (e.g. CramFS or even
jffs2) on secondary storage.  In this way, the Linux kernel can always
reclaim RAM copies of storage blocks if needed.

> So i made a ramdisk by compiling busybox and copied to flash with out compressing it.
> when using this ramdisk the kernel is hanging with "Machine check in kernel mode"
> pls go thru the following log and help us in this issue.
>
>
> U-Boot 1.3.1 (Jul  9 2009 - 10:37:35)
>
> CPU:   8540, Version: 2.0, (0x80300020)
> Core:  E500, Version: 2.0, (0x80200020)
> Clock Configuration:
>        CPU: 660 MHz, CCB: 264 MHz,
>        DDR: 132 MHz, LBC:  33 MHz
> L1:    D-cache 32 kB enabled
>        I-cache 32 kB enabled
> Board: ADS
>     PCI1: disabled
> I2C:   ready
> DRAM:  Initializing
>     SDRAM:  8 MB
>     DDR:  8 MB
> FLASH:  8 MB

I suggest you extend your Linux kernel with support for this flash and
try the suggestions above.

> L2 cache 256KB: enabled
> *** Warning - bad CRC, using default environment
>
> In:    serial
> Out:   serial
> Err:   serial
> Net:   TSEC0, TSEC1, FEC
> =>
> => setenv bootargs console=ttyS0,115200 root=/dev/ram rw
> => bootm 0xff800000 0xffe00000 0xffd80000
> ## Booting image at ff800000 ...
>    Image Name:   Linux-2.6.19.2
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    682153 Bytes = 666.2 kB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> ## Loading RAMDisk Image at ffe00000 ...
>    Image Name:   Ramdisk image
>    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
>    Data Size:    1048576 Bytes =  1 MB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Booting using the fdt at 0xffd80000
>    Loading Ramdisk to 006ad000, end 007ad000 ... OK
>    Loading Device Tree to 007aa000, end 007ab226 ... OK
> Using MPC85xx ADS machine description
> Memory CAM mapping: CAM0=4Mb, CAM1=4Mb, CAM2=0Mb residual: 0Mb
> Linux version 2.6.19.2 (root at ecstest.crl.com) (gcc version 4.0.0 (DENX ELDK
> 4.1 4.0.0)) #1 Tue Jul 14 09:33:31 IST 2009
> Found initrd at 0xc06ad000:0xc07ad000
> setup_arch: bootmem
> mpc85xx_ads_setup_arch()
> arch: exit
> Zone PFN ranges:
>   DMA             0 ->     2048
>   Normal       2048 ->     2048
> early_node_map[1] active PFN ranges
>     0:        0 ->     2048
> Built 1 zonelists.  Total pages: 2032
> Kernel command line: console=ttyS0,115200 root=/dev/ram rw
> mpic: Setting up MPIC " OpenPIC  " version 1.2 at e0040000, max 1 CPUs
> mpic: ISU size: 4, shift: 2, mask: 3
> mpic: Initializing for 60 sources
> PID hash table entries: 32 (order: 5, 128 bytes)
>
> Using MPC85xx ADS machine description
> Memory CAM mapping: CAM0=4Mb, CAM1=4Mb, CAM2=0Mb residual: 0Mb
> Linux version 2.6.19.2 (root at ecstest.crl.com) (gcc version 4.0.0 (DENX ELDK
> 4.1 4.0.0)) #1 Tue Jul 14 09:33:31 IST 2009
> Found initrd at 0xc06ad000:0xc07ad000
> Zone PFN ranges:
>   DMA             0 ->     2048
>   Normal       2048 ->     2048
> early_node_map[1] active PFN ranges
>     0:        0 ->     2048
> Built 1 zonelists.  Total pages: 2032
> Kernel command line: console=ttyS0,115200 root=/dev/ram rw
> mpic: Setting up MPIC " OpenPIC  " version 1.2 at e0040000, max 1 CPUs
> mpic: ISU size: 4, shift: 2, mask: 3
> mpic: Initializing for 60 sources
> PID hash table entries: 32 (order: 5, 128 bytes)
> Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
> Inode-cache hash table entries: 512 (order: -1, 2048 bytes)
> Memory: 5600k/8192k available (1236k kernel code, 2592k reserved, 120k data,
> 71k bss, 92k init)
> Mount-cache hash table entries: 512
> checking if image is initramfs...it isn't (bad gzip magic numbers); looks like
> an initrd
> Freeing initrd memory: 1024k freed
> io scheduler noop registered
> io scheduler anticipatory registered (default)
> io scheduler deadline registered
> io scheduler cfq registered
> Generic RTC Driver v1.07
> Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
> serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 0) is a 16550A
> serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 0) is a 16550A
> RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
> loop: loaded (max 8 devices)
> RAMDISK: ext2 filesystem found at block 0
> RAMDISK: Loading 1024KiB [1 disk] into ram disk... done.
> VFS: Mounted root (ext2 filesystem).
> Freeing unused kernel memory: 92k init
> Warning: unable to open an initial console.

This means that your root filesystem is missing at least the entrys for
the console in /dev, i.e. /dev/console and /dev/ttyS0 are needed.

> Machine check in kernel mode.

This is _not_ good - but it is already a followup error.

Cheers
  Detlev

-- 
What is piracy?   Piracy is the act of stealing an artist's work without
any intention of paying for it. I'm not talking about Napster-type soft-
ware.  I'm talking about major label recording contracts.
           -- Courtney Love
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the eldk mailing list