TI的大神你们好:
在uboot中设置启动参数setenv bootargs 'mem=48M ,会指定内存大小,但是我的DDR显示的内存为DRAM: 128 MB,我想修改指定内存48M,发现不传参数或改变48M的值都无法启动系统,
提示:
DM365 IPNC :>setenv bootargs 'mem=64M console=ttyS1,115200n8 noinitrd ip=192.168.1.168:192.168.1.46:192.168.1.1:255.255.255.0:::off rw ubi.mtd=3,2048 rootfstype=ubifs root=ubi0:rootfs cmemk.phys_start=0x83000000 cmemk.phys_end=0x88000000 cmemk.phys_start_1=0x00001000 cmemk.phys_end_1=0x00008000 cmemk.pools_1=1×28672 cmemk.allowOverlap=1 cmemk.useHeapIfPoolUnavailable=1 nohz=off highres=off clocksource=acpi_pm lpj=1077248 eth=20:8D:6F:00:00:10 quiet'
DM365 IPNC :>saveenv
Saving Environment to NAND…
Erasing Nand…
Erasing at 0x300000 — 100% complete.
Writing to Nand… done
DM365 IPNC :>boot
Loading from NAND 128MiB 3,3V 8-bit, offset 0x500000
Image Name: Linux-2.6.37_IPNC_DM365_5.1.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3448160 Bytes = 3.3 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 …
Image Name: Linux-2.6.37_IPNC_DM365_5.1.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3448160 Bytes = 3.3 MB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image … OK
OK
Starting kernel …
[ 0.347779] DRV: Module install successful
[ 0.347815] DRV: Module built on Aug 4 2015 15:46:18[ 0.354359] CMEMK Error: Failed to request_mem_region(0x83000000, 83886080)
[ 0.836289] Error: Driver 'davinci-mcbsp' is already registered, aborting…
INIT: version 2.86 booting
坐等回复,谢谢
Chris Meng:
你好,
在DM36x的代码里面,除了保留给Linux的内存外,其他的内存都留给了cmem,cmem是为了提供连续的物理空间的utility。你可以修改insmod cmemk.ko后面的参数来减少划给cmem的内存。但有可能在运行代码时候出现cmem空间不够的错误。
james ZHANG3:
回复 Chris Meng:
谢谢你的回复,我试试
james ZHANG3:
回复 Chris Meng:
请问一下 sd卡录像时,1分钟打一次包,会随机出现Error: Memory return Invalid,导致录像进程Appro_avi_save退出。这个会不会是由于cmem引起的
james ZHANG3:
回复 Chris Meng:
默认的DM36X代码是没有使用cmemk.ko吗?,我没有在我们的文件系统中找到,我在IPNC5.1代码中以下文件中找到该驱动,默认传给cmem的内存是多少,我要加载驱动使用下面那个,参数的单位是字节吗?
./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/mpeg2enc/apps/client/build/arm926/cmemk.ko
./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/mpeg4enc_hdvicp/apps/client/build/arm926/cmemk.ko./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/mpeg4dec_hdvicp/apps/client/build/arm926/cmemk.ko./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/mpeg2dec/apps/client/build/arm926/cmemk.ko./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/h264dec/apps/client/build/arm926/cmemk.ko./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/vc1dec/apps/client/build/arm926/cmemk.ko./dvsdk_ipnctools/codecs-dm365/packages/ti/sdo/codecs/h264enc/apps/client/build/arm926/cmemk.ko
Chris Meng:
回复 james ZHANG3:
你好,
2.6.18的kernel使用的cmem module.
2.6.37 kernel把cmem编译到kernel里面了。配置是在uboot里面做的。例如下面黄色部分:
setenv bootargs 'mem=48M console=ttyS1,115200n8 noinitrd ip=dhcp rw ubi.mtd=3,2048 rootfstype=ubifs root=ubi0:rootfs cmemk.phys_start=0x83000000 cmemk.phys_end=0x88000000 cmemk.phys_start_1=0x00001000 cmemk.phys_end_1=0x00008000 cmemk.pools_1=1×28672 cmemk.allowOverlap=1 cmemk.useHeapIfPoolUnavailable=1 nohz=off highres=off clocksource=acpi_pm lpj=1077248 eth=00:0C:0C:A0:07:DF'
james ZHANG3:
回复 Chris Meng:
你好,
这个uboot命令代表分给cmem总内存80M,然后后面的是什么意思,是不是内存都充分利用了
我在我的板子中用top查看内存和cpu发现一下奇怪的现象,内存使用率有超过100%的,能告诉我是为什么吗?谢谢
506 1 root S 210m 474% 25% ./av_server.out DM365 NTSC BOARDVER=2 815 468 root S 28448 63% 8% ./Appro_avi_save /mnt/mmc/ipnc/2015-08532 504 root S 26428 58% 1% ./wis-streamer -s -h 530 504 root S 26428 58% 1% ./wis-streamer -s -h 529 504 root S 26428 58% 1% ./wis-streamer -s -h 504 1 root S 26428 58% 1% ./wis-streamer -s -h 468 1 root S 98200 217% 1% ./system_server 812 692 root R 3080 7% 1% top 660 1 root S 1764 4% 0% avahi-autoipd: [eth0] bound 169.254.2.579 2 root SW 0 0% 0% [mmcqd/0]531 504 root S 26428 58% 0% ./wis-streamer -s -h 4 2 root SW 0 0% 0% [kworker/0:0]655 1 root S 44468 98% 0% ./boa -c /etc 692 1 root S 3080 7% 0% -sh 508 1 root S 2976 7% 0% /usr/sbin/inetd 687 1 root S 2964 7% 0% /sbin/syslogd -n -C64 -m 20 690 1 root S 2900 6% 0% /sbin/klogd -n 681 1 root S 2900 6% 0% /usr/sbin/telnetd 664 1 root S 2704 6% 0% avahi-daemon: running [192.local] 668 1 root S 2276 5% 0% ./upnp-scanip
james ZHANG3:
回复 Chris Meng:
谢谢你的回复,你的回复对我帮助很大,不知道你有没有弄过wifi移植,有的话麻烦帮我回答一下这个问题.
http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/92229.aspx
谢谢
da qin zheng sheng:
回复 Chris Meng:
学习了