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
Maybe you can try init+sash of uClinux-dist instead of all in busybox.
It should save some memory usage. http://nioswiki.jot.com/wikihome/operating...ems/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/uclinuxdist) You may also try NFS root. (but I didn't test that yet) Or, the hardware approach, check if you can replace the SDRAM chip to 32MB, (ie 16Mx16). It has the same pins out, but address A12. You can check if there is a PCB trace reserved for A12. Or you can find some spare pin out of 2C35. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@May 26 2006, 10:09 AM maybe you can try init+sash of uclinux-dist instead of all in busybox.it should save some memory usage.
http://nioswiki.jot.com/wikihome/operating...ems/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/uclinuxdist)
you may also try nfs root. (but i didn't test that yet)
or, the hardware approach, check if you can replace the sdram chip to 32mb, (ie 16mx16).
it has the same pins out, but address a12. you can check if there is a pcb trace reserved for a12. or you can find some spare pin out of 2c35.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15587)
--- quote end ---
--- Quote End --- Hi hippo : Thanks for your reply, I think NFS maybe the effective way,I will do it quickly.If I've done it, I will let you know! Regards!
- Altera_Forum
Honored Contributor
hi hippo
if i use cfi flash.when i have built kernel zImage to support the Jffs2 . Dose i must execute some steps to program flash (include zImage.flash & sof.flash)? such as following
in my csae, i have only 4M flash for DE2. Can i only create a MTD partition to store "my_image.flash" around 4M space? Because my sof.flash is big around 2.1M ,and i don't program it to flash. Thx !cd arch/nios2nommu/boot# Creating .flash file for the FPGA configuration sof2flash --offset=0xC00000 --input=$SOPC_KIT_NIOS2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof --output=standard.flash# Programming flash with the FPGA configuration nios2-flash-programmer --base=0x00000000 standard.flash# Creating .flash file for the project elf2flash --base=0x00000000 --end=0xffffff --reset=0x0 --input=zImage --output=ext_flash.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec# Programming flash with the project nios2-flash-programmer --base=0x00000000 ext_flash.flash - Altera_Forum
Honored Contributor
Hi jay_1025,
The DE2 is different from other Altera Nios dev boards. The DE2 's fpga configs from EPCS16 (not CFI), is 2MB. The sof is not written directly to EPCS, it will be converted to RBF (raw binary file). The compress configuration data of 2C35 size around 300K-400K, typically. So you will have around 1.6MB unused space in EPCS16. You should store zImage after the RBF on EPCS. That is, you should use EPCS first. Then the CFI 4MB will be available for jffs2. Another issue, busybox takes more memory on MMU-less arch. So I move to simplified init and sash in uCLinux-dist. (!!!) http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist) It will save more memory. - Altera_Forum
Honored Contributor
hi hippo
Thank you for reply. But i haven't sloved to erase my flash memory yet. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif when i use "nios2-flash-programmer" command to erase flash memory under sdk shell, then i got some info such as following <div class='quotetop'>QUOTE </div> --- Quote Start --- [SOPC Builder]$ nios2-flash-programmer --base=0x000000 --sof=DE2_SD_Card_Audio. sof --debug --erase WARNING: Default charset MS950 not supported, using ISO-8859-1 instead May 28, 2006 1:22:24 AM - (??) nios2-flash-programmer: Launching Quartus Program mer to download: DE2_SD_Card_Audio.sof Send (64) failed. Unable to synchronize with target. May 28, 2006 1:22:47 AM - (???) nios2-flash-programmer: Error opening target har dware May 28, 2006 1:22:47 AM - (???) nios2-flash-programmer: In order to program flash, you must first create a purpose-built flash-programming design (i.e. FPGA configuration) and associate it with your particular board. The Nios development kit is delivered with purpose-bui lt flash-programming designs pre-built for several development boards. If you wi sh to program flash on your own board, you must first create a flash-programming design. The process of creating a flash-programming design for your board is mostly automated. From a bash-shell, execute this script: mk_target_board --help The help-message includes references to other documentation on programming flash and targeting Nios systems to custom board designs. - exiting.[/b] --- Quote End --- i can see my target borad is UP4 under SOPC Bulider. Do you know how to solve it ? PS:i am using QII 5.0 sp2. Thx !!! - Altera_Forum
Honored Contributor
Jay,
You really need to upgrade your tools... You should be using, at least, Nios II/Quartus II 5.1SP1. Best Regards, - slacker - Altera_Forum
Honored Contributor
hi slacker
thank you ! I can ues "nios2-flash-programmer" command to erase my flash memory now,but i mount jffs2 /mtdblock to /mnt then got long messages about sector locked... <div class='quotetop'>QUOTE </div> --- Quote Start --- # mount -t jffs2 /dev/mtdblock0 /mnt# Erase at 0x003e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00390000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00380000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00370000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00360000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00350000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00340000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00330000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00320000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00310000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00300000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002f0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00290000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00280000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00270000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00260000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00250000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00240000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00230000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00220000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00210000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00200000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001f0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x001a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00190000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00180000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00170000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00160000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00150000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00140000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00130000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00120000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00110000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00100000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000f0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x000a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00090000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00080000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00070000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00060000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00050000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00040000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00030000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00020000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00010000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00000000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003f0000 failed immediately: -EROFS. Is the sector locked?# umount /mnt# cd ..# ls bin etc init mnt proc sbin tmp var dev home lib opt root sys usr[/b] --- Quote End --- Dear hippo Do you know how to solve this trouble problem? http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif Thx ! - Altera_Forum
Honored Contributor
Did you edit mtd map file atlera.c ?
What is your map section now? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@May 28 2006, 09:09 AM did you edit mtd map file atlera.c ?what is your map section now?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15627)
--- quote end ---
--- Quote End --- hi hippo Yes, i did. My map section is mtdblock0(cfi-flash) and can see it from command line of booting info. <div class='quotetop'>QUOTE </div> --- Quote Start --- Uncompressing Linux... Ok, booting the kernel. Linux version 2.6.16.1 ([email protected]) (gcc version 3.4.6)# 127 PRE MPT Sat May 27 01:03:31 CST 2006 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. 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: 6428k/8192k RAM, 0k/0k ROM (1184k kernel code, 484k data) Mount-cache hash table entries: 512 SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub 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 0x80c81120 (irq = 1) is a jtag_uart 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 1 MTD partitions on "Altera NDK flash (AMD)": 0x00000000-0x00400000 : "romfs/jffs2" usbmon: debugfs is not available driver isp1362-hcd, 2005-04-04 isp1362-hcd isp1362-hcd: ISP1362 Host Controller isp1362_hc_reset: isp1362-hcd isp1362-hcd: new USB bus registered, assigned bus number 1 isp1362-hcd isp1362-hcd: irq 4, io mem 0x80c810d0 isp1362_hc_start: isp1362-hcd isp1362-hcd: ISP1362 Memory usage: isp1362-hcd isp1362-hcd: ISTL: 2 * 256: 512 @ $0000:$0100 isp1362-hcd isp1362-hcd: INTL: 16 * ( 64+8): 1152 @ $0200 isp1362-hcd isp1362-hcd: ATL : 32 * ( 64+8): 2304 @ $0680 isp1362-hcd isp1362-hcd: USED/FREE: 3968 128 usb usb1: configuration# 1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected ISP1362 Host Controller, irq 4 Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. Freeing unused kernel memory: 384k freed (0x138000 - 0x197000) init started: BusyBox v1.1.1-pre0 (2006.04.20-12:52+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.04.20-12:52+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # mount -t jffs2 /dev/mtdblock0 /mnt# Erase at 0x003e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003d0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003c0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003b0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x003a0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00390000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00380000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00370000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00360000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00350000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00340000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00330000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00320000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00310000 failed immediately: -EROFS. Is the sector locked? Erase at 0x00300000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002f0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002e0000 failed immediately: -EROFS. Is the sector locked? Erase at 0x002d0000 failed immediately: -EROFS. Is the sector locked? . . . . .[/b] --- Quote End --- help me !!! How to solve this problem ? Thx !
- Altera_Forum
Honored Contributor
What is your cfi address ?
check your kernel dir, include/nios2_system.h or check in sopc builder .