This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Dm368 root file sys upload.

Hello All,

I am using a DM368 unit by Appro.  I am trying to upload/flash root file system on the board through a web based UI. 

1. I am using uImage_ipnc_dm368_IMX036_2.60.02.

2. My root file system size is 15,124KB.

3. When I upgrade through my Application I do get errors as follows 

lowmem_reserve[]: 0 0 0 0
DMA: 14*4kB 12*8kB 1*16kB 2*32kB 0*64kB 1*128kB 0*256kB 1*512kB 0*1024kB 0*2048k
B 0*4096kB 0*8192kB 0*16384kB = 872kB
DMA32: empty
Normal: empty
HighMem: empty
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
12288 pages of RAM
259 free pages
2673 reserved pages
672 slab pages
109 pages shared
0 pages swap cached
Out of Memory: Kill process 818 (UIApplication) score 1253 and children.
Out of memory: Killed process 818 (UIApplication).
Out of Memory: Kill process 867 (UIApplication) score 1253 and children.
Out of memory: Killed process 867 (UIApplication).
Out of Memory: Kill process 868 (UIApplication) score 1253 and children.
Out of memory: Killed process 868 (UIApplication).
Before this It also kills av_serve.out and system_server exe.
4. similar thing happens when I upload from Appro application but it keeps boa  alive, and that makes upload successful. but in my case it also kills UI application,
 but if I upload my root file system through Appro application it upgrades properly...
I am confuse about the reason behind this? 
  • hi,

    Can you please check when you run "top" command what is th free memory it is showing.

    I think the memory available for it to copy the filesystem to NAND is not enough.

    You can run this command before start the filesystem upgrade from GUI

    echo 1 > /proc/sys/vm/drop_caches

    This might help to free some memory for you

    Regards,

    Raghu

  • Hey Raghu,

    thanks for the inputs. I am able to save cramFS image in /tmp by changing boot arguments. previously it was going out of memory during that process. but now I am stuck up with new issue. my cram FS gets saved in /tmp OK , but when it comes to flashing NAND mtd3 for cramFS , it gives following errors, this is particularly happening for larger size file (14,556KB), it flashes ok for sizes 12,512KB.

    Saving image Complete
    Error -3 while decompressing!
    c03c2d6b(2768)->c001e000(4096)
    Alignment trap: flash_eraseall (869) PC=0x40106da8 Instr=0xe5923010 Address=0xe7
    9a2012 FSR 0x001
    Error -3 while decompressing!
    c03c640c(-8999233)->c20d2000(4096)
    Error -3 while decompressing!
    c03c270c(-2049089)->c28cd000(4096)
    Error -3 while decompressing!
    c03c240c(-8999233)->c22e3000(4096)

     

    Best Regards

    -swapnali

  • Hi,

    When the filesystem size increase, you need to increase the size while writing to NAND too.

    nand write 0x82000000 0x700000 0xE00000 change to

    nand write 0x82000000 0x700000 0x1000000

    From the log it looks like the few section at the end of filesystem is not burnt to NAND.

    The reason it is throwing decompress error

    Regards,

    Raghu

  • Hi Raghu,

    thanks for the directions. I am already using nand write 0x82000000 0x700000 0x1000000 . my current boot arguments are

    tftpboot 0x80700000 uImage         

    nand erase 0x500000 0x200000

    nand write 0x80700000 0x500000 0x200000

    tftpboot 0x82000000 cramfsImage

    nand erase 0x700000 0x1000000
    nand write 0x82000000 0x700000 0x1000000
    setenv bootcmd 'nand read 0x82000000 0x700000 0x1000000;nboot 0x80700000 0 0x500000; bootm 0x80700000'
    setenv bootargs 'mem=48M console=ttyS1,115200n8 root=/dev/mtdblock3 rw initrd=0x82000000,32M ip=dhcp eth=00:0C:0C:A0:07:A2'

    Best Regards

    -swapnali

  • my file upload for same file works ok in NFS mode

  • Can you run top and check the memory free, in NFS you might have more memory free.

    From the log it looks like it is basically to do free memory availble for it to copy filesystem

    regards,

    Raghu

  • Can you use this bootargs and bootcmd

    setenv bootargs 'mem=48M console=ttyS1,115200n8 root=/dev/mtdblock3 rootfstype=cramfs ip=dhcp eth=00:0C:0C:A0:07:A2'

    setenv bootcmd 'nboot 0x80700000 0 0x500000;bootm 0x80700000'

    Also, in you bootargsyou change this to 16M instead of 32M

    initrd=0x82000000,16M

    Regards,

    Raghu

  • Hello Raghu,

    thanks for the suggestions. previously I was using same 16M, that time I was facing issue , which I wrote in very 1st post, my application was crashing due to lack of memory. then I found mtdblock3 is 32MB so i changed my boot arges with 32M , that resolved my out of memory issue.  and  I was able to save my file on /tmp/.... but I landed in to current issue , that is if file size is larger it saves on /tmp but while flshing NAND it gives errors......

    Best Regards                                                                                                                                                                                                                                                                                       swapnali

  • can you use this bootargs and check

    setenv bootargs 'mem=48M console=ttyS1,115200n8 root=/dev/mtdblock3 rootfstype=cramfs ip=dhcp eth=00:0C:0C:A0:07:A2'

    Your bootargs sound old compared to the one in v2.6

    Please use the filesys form the v2.6 and untar with root privilages

    Regards,

    Raghu

  • Hi, Raghu

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/166645.aspx

    I got my TMS320DM368 EVM from TI E-Store, and am having trouble with the setup.sh script. I am following the instructions in the TMS320DM368 Software Developers Guide.

    I am running Win7 Pro on my computer, and have installed Ubuntu 10.04 via VMWare. 

    There are two network cards on my computer, the wireless one connects to the internet, and the wired one connects to the target. I used NAT networking in vmware to access external internet (it seems to be working well), and adopted bridged networking in vm using static IP address to connect with the target. The procedure of setting static IP address is as show below.

    I edited the '/etc/network/interfaces' files,  and added the following instructions

    auto eth0
    iface eth0 inet static
    address 192.168.1.252
    netmask 255.255.255.0
    gateway 192.168.1.1
    broadcast 192.168.1.255
    However I don't know how to check whether it works well. Is it correct?
    When I was installing the dvsdk_dm368-evm_4_02_00_06, I didn't connect the host with the target. Must you connect the Ethernet cable and RS-232 and power on the EVM when install the dvsdk?
    I tried to execute the setup.sh script, and setup.sh eventually asks me if I want to run the minicom script. Doing so does bring up minicom, but it just hangs there forever. I can't see any activity on minicom terminal. I don't know what's wrong.
    One more question, I restart the SAMBA after configuring it. I used this instruction '/etc/init.d/smbd restart', and get the following message: 

    Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service smbd restart

    Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart(8) utility, e.g. restart smbd smbd start/running, process 9265.

    Is this a problem?

    Any help would be very much appreciated. Thanks.

  • Hi Raghu,

     I am sending Swapnali's reply, she was unable to reply on e2e forum.

    1. I am already using filesys from V2.6. I had extracted the filesys from V2.6 added my exes and then created it. I used following for it
       mount -o loop -t cramfs cramfsImage_DM368 rdmnt/
        cd rdmnttemp/
        tar -cf  -  . | tar -C ../filesys/  -xpf  -

    2. to create cramfs I am using following  
    mkfs.cramfs filesys cramfsImage_DM368

    3. The boot arguments he has suggested I tried this morning, but was getting same errors.

    4. untar with root privilages: my application is getting crashed for large
    file size , during flashing NAND, it shows
    Error -3 while decompressing!
    c03c2d6b(2768)->c001e000(4096)
    Alignment trap: flash_eraseall (869) PC=0x40106da8 Instr=0xe5923010
    Address=0xe7
    9a2012 FSR 0x001
    Error -3 while decompressing!
    c03c640c(-8999233)->c20d2000(4096)
    Error -3 while decompressing!
    c03c270c(-2049089)->c28cd000(4096)
    Error -3 while decompressing!
    c03c240c(-8999233)->c22e3000(4096)
    this is all happening inside my code.

    5. If I reduce file size(12,560KB) it works fine. it works even when I store
    large(14,556KB) file on /mnt/mmc/ instead of /tmp/

    Please help.

    Thanks!!

    Regards
    Sathish


  • Hi,

    From the error it looks like the filesystem is incomplete or size speicified is ot correct in your bootcmd

    Can you use this as your bootargs setenv bootargs 'mem=48M console=ttyS1,115200n8 root=/dev/mtdblock3 rootfstype=cramfs ip=dhcp eth=00:0C:0C:A0:07:A2'

    Where it directly uses from NAND rather than reading form DDR

    ALso, please set bootcmd as setenv bootcmd 'nboot 0x80700000 0 0x500000;bootm 0x80700000'

    Regards,

    Raghu