[uClinux-dev] Re: Tiny memory

Greg Ungerer gerg at snapgear.com
Tue Mar 25 08:22:23 EST 2003


Hi John,

John Willlams wrote:
> However, I've got Greg in my other ear saying "it should work in 1 meg"!  A
> bit of internal biffo at SnapGear this afternoon maybe! :)

Non-beleivers, all of you :-)
I guess I'll just have to prove it for you :-)

Below is the output log of a uClinx/ColdFire kernel
and filesystem limited to 1MB on a Motorola M5272C3 board.
Kernel is 2.4.20, only app configured is a shell. I left
the proc fs enabled just for fun, networking is disabled.
Kernel and filesystem are in RAM, and this setup
actually loses the first 128k of the 1MB of RAM (due to
being compitible with the dBUG firmware of the M5272C3
board, so it is really 896k :-)

Binary sizes are:

-rw-r--r--    1 gerg     users      460048 Mar 25 23:13 image.bin
-rwxr-xr-x    1 gerg     users     2548702 Mar 25 23:13 image.elf
-rwxr-xr-x    1 gerg     users      400652 Mar 25 23:13 linux.bin
-rw-r--r--    1 gerg     users       59392 Mar 25 23:13 romfs.img

Regards
Greg




Linux version 2.4.20-uc0 (gerg at goober) (gcc version 2.95.3 20010315 
(release)(Co
ldFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP 
and shar
ed lib patches from http://www.snapgear.com/)) #35 Tue Mar 25 23:12:56 
EST 2003
^O^M

uClinux/COLDFIRE(m5272)
COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
On node 0 totalpages: 256
zone(0): 0 pages.
zone(1): 256 pages.
zone(2): 0 pages.
Kernel command line:
Calibrating delay loop... 43.72 BogoMIPS
Memory available: 356k/1024k RAM, 0k/0k ROM (289k kernel code, 166k data)
kmem_create: Forcing size word alignment - vm_area_struct
kmem_create: Forcing size word alignment - mm_struct
kmem_create: Forcing size word alignment - filp
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
kmem_create: Forcing size word alignment - inode_cache
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
kmem_create: Forcing size word alignment - bdev_cache
kmem_create: Forcing size word alignment - cdev_cache
kmem_create: Forcing size word alignment - kiobuf
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
kmem_create: Forcing size word alignment - sock
Starting kswapd
kmem_create: Forcing size word alignment - file_lock_cache
ColdFire internal UART serial driver version 1.00
ttyS0 at 0x10000100 (irq = 73) is a builtin ColdFire UART
ttyS1 at 0x10000140 (irq = 74) is a builtin ColdFire UART
kmem_create: Forcing size word alignment - blkdev_requests
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 7 disk images:
0: 92078-A0877 [VIRTUAL 92078-A0877] (RO)
1: FFE00000-FFE3FFFF [VIRTUAL FFE00000-FFE3FFFF] (RW)
2: FFE00000-FFE07FFF [VIRTUAL FFE00000-FFE07FFF] (RW)
3: FFE08000-FFE3FFFF [VIRTUAL FFE08000-FFE3FFFF] (RW)
4: FFE40000-FFFFFFFF [VIRTUAL FFE40000-FFFFFFFF] (RW)
5: FFF00000-FFFFFFFF [VIRTUAL FFF00000-FFFFFFFF] (RW)
6: FFE00000-FFFFFFFF [VIRTUAL FFE00000-FFFFFFFF] (RW)
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 12k freed (0x7e000 - 0x80000)

Sash command shell (version 1.1.1)
/>
/> mount -t proc proc proc
/> ps
   PID PORT STAT  SIZE SHARED %CPU COMMAND
     1      R      24K     8K  6.0 init
     2      S       0K     0K  0.0 keventd
     3      R       0K     0K  0.0 ksoftirqd_CPU0
     4      S       0K     0K  0.0 kswapd
     5      S       0K     0K  0.0 bdflush
     6      S       0K     0K  0.0 kupdated
/>
/> cat /proc/meminfo
         total:    used:    free:  shared: buffers:  cached:
Mem:    376832   217088   159744        0    16384        0
Swap:        0        0        0
MemTotal:          368 kB
MemFree:           156 kB
MemShared:           0 kB
Buffers:            16 kB
Cached:              0 kB
SwapCached:          0 kB
Active:             16 kB
Inactive:            0 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:          368 kB
LowFree:           156 kB
SwapTotal:           0 kB
SwapFree:            0 kB
/>
/> ls -l
drwxr-xr-x  1 0        0              32  Jan 01 1970  bin
drwxr-xr-x  1 0        0              32  Jan 01 1970  dev
drwxr-xr-x  1 0        0              32  Jan 01 1970  etc
drwxr-xr-x  1 0        0              32  Jan 01 1970  home
drwxr-xr-x  1 0        0              32  Jan 01 1970  lib
drwxr-xr-x  1 0        0              32  Jan 01 1970  mnt
dr-xr-xr-x 13 0        0               0  Nov 30 00:00 proc
lrwxrwxrwx  1 0        0               8  Jan 01 1970  tmp -> /var/tmp
drwxr-xr-x  1 0        0              32  Jan 01 1970  usr
drwxr-xr-x  1 0        0              32  Jan 01 1970  var
/>
/>

------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Wizard        EMAIL:  gerg at snapgear.com
Snapgear Pty Ltd                               PHONE:    +61 7 3279 1822
825 Stanley St,                                  FAX:    +61 7 3279 1820
Woolloongabba, QLD, 4102, Australia              WEB:   www.SnapGear.com




More information about the uClinux-dev mailing list