Forum Discussion
about memory problem for uclinux....
hi all
I have upload a music file(xxx.wav,about 700kB ) to uclinux from my PC ,and I got very long error messages on uClinux . such as following:
it seems memory not enough..............
anyone have met the same problem ?
Have any ways to solve it ?
<0> [<00003ef8>]<0> [<00000000>]<0> [<00000005>]<0> [<00000044>]<0>
<0> [<000200d2>]<0> [<00000044>]<0> [<00000000>]<0> [<00000001>]<0>
<0> [<00000000>]<0> [<00000014>]<0> [<00000001>]<0> [<00018c88>]<0>
<0> [<0001d35c>]<0> [<000035ae>]<0> [<00000008>]<0> [<00060000>]<0>
<0> [<000000b8>]<0> [<00080000>]<0> [<00090000>]<0> [<00003e00>]<0>
<0> [<00000080>]<0> [<000a2098>]<0> [<0001fff4>]<0> [<0000d6b8>]<0>
<0> [<00000008>]<0> [<00000000>]<0> [<00077410>]<0> [<0005371c>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0> [<00053a28>]<0>
<0> [<00000000>]<0> [<00002400>]<0> [<00000f00>]<0> [<00000000>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000938>]<0> [<00000006>]<0>
<0> [<00000000>]<0> [<00000008>]<0> [<00000018>]<0> [<00000000>]<0>
<0> [<0000000b>]<0> [<00000000>]<0> [<00000000>]<0> [<00000001>]<0>
<0> [<00000000>]<0>
oom-killer: gfp_mask=0xd0, order=8
Stack from 0020fd80:<0>
<0> 00000008<0> 00033600<0> 00000000<0> 00000042<0> 001935f0<0> 001935f0<
0> 00000008<0> 00000000<0>
<0> 000000d0<0> 00452080<0> 00000000<0> 00034bc0<0> 00000000<0> 00000001<
0> 000000d0<0> 000000d0<0>
<0> 00000000<0> 00220d80<0> 00000008<0> 000000d0<0> 00000000<0> 00239920<
0> 0003f640<0> 00000010<0>
<0> 00000002<0> 00000000<0> 000a2098<0> 0045dc20<0> 00000000<0> 00000077<
0> 00205480<0> 00000001<0>
<0> 001e1800<0> 0003fa58<0> 00000004<0> 0003d4dc<0> 00000000<0> 00000004<
0> 002b06e4<0> 002b06a0<0>
<0> 00000007<0> ffffe000<0> 00003ef8<0> 00000040<0> 00000004<0> 00000001<
0> 00000000<0> 000681b8<0>
Call Trace:<0>
<0> [<00021254>]<0> [<00077b74>]<0> [<00000002>]<0> [<00000000>]<0>
<0> [<0003235c>]<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0>
<0> [<00003ef8>]<0> [<00000000>]<0> [<00000005>]<0> [<00000044>]<0>
<0> [<000200d2>]<0> [<00000044>]<0> [<00000000>]<0> [<00000001>]<0>
<0> [<00000000>]<0> [<00000014>]<0> [<00000001>]<0> [<00018c88>]<0>
<0> [<0001d35c>]<0> [<000035ae>]<0> [<00000008>]<0> [<00060000>]<0>
<0> [<000000b8>]<0> [<00080000>]<0> [<00090000>]<0> [<00003e00>]<0>
<0> [<00000080>]<0> [<000a2098>]<0> [<0001fff4>]<0> [<0000d6b8>]<0>
<0> [<00000008>]<0> [<00000000>]<0> [<00077410>]<0> [<0005371c>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0> [<00053a28>]<0>
<0> [<00000000>]<0> [<00002400>]<0> [<00000f00>]<0> [<00000000>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000938>]<0> [<00000006>]<0>
<0> [<00000000>]<0> [<00000008>]<0> [<00000018>]<0> [<00000000>]<0>
<0> [<0000000b>]<0> [<00000000>]<0> [<00000000>]<0> [<00000001>]<0>
<0> [<00000000>]<0>
Mem-info:
DMA per-cpu:
cpu 0 hot: high 0, batch 1 used:0
cpu 0 cold: high 0, batch 1 used:0
DMA32 per-cpu: empty
Normal per-cpu: empty
HighMem per-cpu: empty
Free pages: 752kB (0kB HighMem)
Active:255 inactive:278 dirty:0 writeback:0 unstable:0 free:188 slab:826 mapped:
0 pagetables:0
DMA free:752kB min:360kB low:448kB high:540kB active:1020kB inactive:1112kB pres
ent:8192kB pages_scanned:2382 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0 0
DMA32 free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB page
s_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pag
es_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
HighMem free:0kB min:128kB low:128kB high:128kB active:0kB inactive:0kB present:
0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 0*4kB 0*8kB 1*16kB 1*32kB 1*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB
0*4096kB = 752kB
DMA32: empty
Normal: empty
HighMem: empty
2048 pages of RAM
188 free pages
458 reserved pages
0 pages shared
0 pages swap cached
scheduling while atomic: ls/0x0000000b/40
Stack from 0020fd14:<0>
<0> 0000000b<0> 001797d0<0> ffffffff<0> 00000006<0> 0000000a<0> 0000000d<
0> 0031a001<0> 00192c80<0>
<0> 00000010<0> 00000042<0> 00000000<0> 00190d48<0> 0020fd88<0> 00452340<
0> 00192c80<0> ffffe2a6<0>
<0> 00000001<0> 0017ad90<0> 00000000<0> 00200200<0> ffffe2a6<0> 000195d0<
0> 00452080<0> 00217b84<0>
<0> 001adba0<0> ffffe000<0> 000200d0<0> 0017ae44<0> 00033610<0> 0000000a<
0> 000000e0<0> 32a9f880<0>
<0> 001935f0<0> 00000008<0> 00000000<0> 000000d0<0> 00452080<0> 00000000<
0> 00034bc0<0> 00000000<0>
<0> 00000001<0> 000000d0<0> 000000d0<0> 00000000<0> 00220d80<0> 00000008<
0> 000000d0<0> 00000000<0>
Call Trace:<0>
<0> [<0003f640>]<0> [<00000010>]<0> [<00000002>]<0> [<00000000>]<0>
<0> [<000a2098>]<0> [<00000000>]<0> [<00000077>]<0> [<00000001>]<0>
<0> [<0003fa58>]<0> [<00000004>]<0> [<0003d4dc>]<0> [<00000000>]<0>
<0> [<00000004>]<0> [<00000007>]<0> [<00003ef8>]<0> [<00000040>]<0>
<0> [<00000004>]<0> [<00000001>]<0> [<00000000>]<0> [<000681b8>]<0>
<0> [<00021254>]<0> [<00077b74>]<0> [<00000002>]<0> [<00000000>]<0>
<0> [<0003235c>]<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0>
<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0>
<0> [<00003ef8>]<0> [<00000000>]<0> [<00000005>]<0> [<00000044>]<0>
<0> [<000200d2>]<0> [<00000044>]<0> [<00000000>]<0> [<00000001>]<0>
<0> [<00000000>]<0> [<00000014>]<0> [<00000001>]<0> [<00018c88>]<0>
<0> [<0001d35c>]<0> [<000035ae>]<0> [<00000008>]<0> [<00060000>]<0>
<0> [<000000b8>]<0> [<00080000>]<0> [<00090000>]<0> [<00003e00>]<0>
.
.
thx in advance !
jay
31 Replies
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
hi hippo
i don't use AMD flash chip on my DE2 board, then if i want to use jffs2 filesystm and how to select options of MTD in kernel menuconfig? thx in advance! jay - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jay_1025@Apr 26 2006, 01:13 AM hi hippoi don't use amd flash chip on my de2 board, then if i want to use jffs2 filesystm and how to select options of mtd in kernel menuconfig?
thx in advance!
jay
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14661)
--- quote end ---
--- Quote End --- What is the flash chip on DE2? You can try add more flash chips support until you find one working. Or you can try nfs on ethernet. Or you can try sd card with the drivers from Jdhar.
- Altera_Forum
Honored Contributor
hi hippo
i am using spansion S29AL032D flash(4MB) on DE2 board. memory using info such as following: # free total used free shared buffers Mem: 6380 5636 744 0 0 i have used 5636kB memory that remained 744kB memory on my uclinux OS. I hope to access files from sd card or usb flash. if it can work. is it enough memory to mount external storage device? and have any ways to reduce using memory? thx in advance! jay - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jay_1025@Apr 26 2006, 07:53 PM hi hippoi am using spansion s29al032d flash(4mb) on de2 board.
memory using info such as following:
# free
total used free shared buffers
mem: 6380 5636 744 0 0
i have used 5636kb memory that remained 744kb memory on my uclinux os.
i hope to access files from sd card or usb flash. if it can work.
is it enough memory to mount external storage device?
and have any ways to reduce using memory?
thx in advance!
jay
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14704)
--- quote end ---
--- Quote End --- You have very few memory available. You should use the 4M cfi flash first. Spansion was previously a joint venture of AMD and Fujitsu. [* ] Support for AMD/Fujitsu flash chips You can use it as a jffs2 drive. You can mount it as rootfs, with kernel command line "root=/dev/mtdblock0", and disable initramfs. this will save some memory usage. There is new option, In kernel config for higher than 2.6.11, General setup --> [*] Configure standard kernel features (for small systems) ---> [ ] Enable full-sized data structures for core No in this option will reduce kernel data structure size. Using SD is OK, but it is slow. Using USB disk on isp1362 ? working ?
- Altera_Forum
Honored Contributor
hi hippo
thank you for your help ! so far, my usb isp1362 can't work on my board. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif so,i want to try other ways ,such as sd card or cfi-flash...... thx in advance ! jay - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Apr 26 2006, 07:39 AM you have very few memory available.you should use the 4m cfi flash first.
spansion was previously a joint venture of amd and fujitsu.
[* ] support for amd/fujitsu flash chips
you can use it as a jffs2 drive.
you can mount it as rootfs, with kernel command line "root=/dev/mtdblock0", and disable initramfs. this will save some memory usage.
there is new option,
in kernel config for higher than 2.6.11,
general setup -->
[*] configure standard kernel features (for small systems) --->
[ ] enable full-sized data structures for core
no in this option will reduce kernel data structure size.
using sd is ok, but it is slow.
using usb disk on isp1362 ? working ?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14709)
--- quote end ---
--- Quote End --- hi hippo may i select same options with buildboot guide# point 8(using cfi-flash) ? i have a question , because i don't know how to use kernel command line with "root=/dev/mtdblock0" and disable inutramfs . so ... where should i be done? thx in advance !
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jay_1025+apr 27 2006, 01:16 am--><div class='quotetop'>quote (jay_1025 @ apr 27 2006, 01:16 am)</div>--- quote start ---
<!--quotebegin-hippo@Apr 26 2006, 07:39 AM you have very few memory available.
you should use the 4m cfi flash first.
spansion was previously a joint venture of amd and fujitsu.
[* ] support for amd/fujitsu flash chips
you can use it as a jffs2 drive.
you can mount it as rootfs, with kernel command line "root=/dev/mtdblock0", and disable initramfs. this will save some memory usage.
there is new option,
in kernel config for higher than 2.6.11,
general setup -->
[*] configure standard kernel features (for small systems) --->
[ ] enable full-sized data structures for core
no in this option will reduce kernel data structure size.
using sd is ok, but it is slow.
using usb disk on isp1362 ? working ?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14709)
--- quote end ---
--- Quote End --- hi hippo may i select same options with buildboot guide# point 8(using cfi-flash) ? i have a question , because i don't know how to use kernel command line with "root=/dev/mtdblock0" and disable inutramfs . so ... where should i be done? thx in advance ! <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14722)</div> [/b] --- Quote End --- Yes, follow point8 about cfi-flash. 1. use initramfs, test until jffs2 works. 2. cp -a some dirs from / to jffs2 mount point to build the rootfs. note some other dirs should be empty, just mkdir of them, eg, /proc /sys .. , look at ~/rootfs . 3. in kernel config, set initramfs path to empty. () Initramfs source file(s) And Processor type and features ─> (root=/dev/mtdblock0) Default kernel command string
- Altera_Forum
Honored Contributor
hi hippo
i have built a rootfs in ~/rootfs/mnt dir and rebuilt kernel successfully. then i can't work under uClinux system. I find some wrong information to know from booting messages, and how should i edit memory address of my flash ? my booting info following: Altera Nios II support © 2004 Microtronix Datacom Ltd. setup_arch: No persistant network settings signature at 008F0000 Built 1 zonelists Kernel command line: root=/dev/mtdblock0 PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 6284k/8192k RAM, 0k/0k ROM (1649k kernel code, 166k data) Mount-cache hash table entries: 512 NET: Registered protocol family 16 SCSI subsystem initialized JFFS2 version 2.2. (NAND) © 2001-2003 Red Hat, Inc. io scheduler noop registered io scheduler deadline registered (default) Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart dmfe_probe:eth0, 50000 Khz Nios <DM9000> eth0 I/O: 80900090, VID: 90000a46 ADDR: 00:07:ed:00:00:00 dmfe_probe:eth1, 50000 Khz Nios Altera NDK flash (AMD): Found 1 x16 devices at 0x0 in 8-bit bank Amd/Fujitsu Extended Query Table at 0x0040 number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using Altera NDK partition definition Creating 4 MTD partitions on "Altera NDK flash (AMD)": 0x00200000-0x00600000 : "romfs/jffs2" mtd: partition "romfs/jffs2" extends beyond the end of device "Altera NDK flash (AMD)" -- size truncated to 0x200000 0x00000000-0x00200000 : "loader/kernel" 0x00600000-0x00700000 : "User configuration" mtd: partition "User configuration" is out of reach -- disabled 0x00700000-0x00800000 : "safe configuration" mtd: partition "safe configuration" is out of reach -- disabled NET: Registered protocol family 2 IP route cache hash table entries: 128 (order: -3, 512 bytes) TCP established hash table entries: 512 (order: -1, 2048 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 10 IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-bloc(0,0) http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif thx in advance ! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jay_1025@Apr 27 2006, 04:28 PM hi hippoi have built a rootfs in ~/rootfs/mnt dir and rebuilt kernel successfully.
then i can't work under uclinux system. i find some wrong information to know from booting messages,
and how should i edit memory address of my flash ?
my booting info following:
altera nios ii support © 2004 microtronix datacom ltd.
setup_arch: no persistant network settings signature at 008f0000
built 1 zonelists
kernel command line: root=/dev/mtdblock0
pid hash table entries: 64 (order: 6, 1024 bytes)
dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
memory available: 6284k/8192k ram, 0k/0k rom (1649k kernel code, 166k data)
mount-cache hash table entries: 512
net: registered protocol family 16
scsi subsystem initialized
jffs2 version 2.2. (nand) © 2001-2003 red hat, inc.
io scheduler noop registered
io scheduler deadline registered (default)
serial: jtag uart driver $revision: 1.4 $
ttyj0 at mmio 0x81004000 (irq = 1) is a jtag_uart
dmfe_probe:eth0, 50000 khz nios
<dm9000> eth0 i/o: 80900090, vid: 90000a46
addr: 00:07:ed:00:00:00
dmfe_probe:eth1, 50000 khz nios
altera ndk flash (amd): found 1 x16 devices at 0x0 in 8-bit bank
amd/fujitsu extended query table at 0x0040
number of cfi chips: 1
cfi_cmdset_0002: disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
redboot partition parsing not available
using altera ndk partition definition
creating 4 mtd partitions on "altera ndk flash (amd)":
0x00200000-0x00600000 : "romfs/jffs2"
mtd: partition "romfs/jffs2" extends beyond the end of device "altera ndk flash
(amd)" -- size truncated to 0x200000
0x00000000-0x00200000 : "loader/kernel"
0x00600000-0x00700000 : "user configuration"
mtd: partition "user configuration" is out of reach -- disabled
0x00700000-0x00800000 : "safe configuration"
mtd: partition "safe configuration" is out of reach -- disabled
net: registered protocol family 2
ip route cache hash table entries: 128 (order: -3, 512 bytes)
tcp established hash table entries: 512 (order: -1, 2048 bytes)
tcp bind hash table entries: 512 (order: -1, 2048 bytes)
tcp: hash tables configured (established 512 bind 512)
tcp reno registered
tcp bic registered
net: registered protocol family 1
net: registered protocol family 10
ipv6 over ipv4 tunneling driver
net: registered protocol family 17
kernel panic - not syncing: vfs: unable to mount root fs on unknown-bloc(0,0) http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/sad.gif
thx in advance !
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14746)
--- quote end ---
--- Quote End --- You should do it in two steps. First, with normal initramfs, and no kernel command line. Edit drivers/mtd/maps/altera.c , to the offset and size of your cfi flash. Remove unused mtd parts. Rebuild zImage, and check if mtd is detected correctly. If mtdblock0 is correct, then try mount it as jffs2, copy the rootfs. And then reboot again, to verify if all the data is correct. If all work without problems, then do the step2, rootfs to your mtd.