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.

demo programs cannot be run after rebuilding on dm6446

I am trying to enable the Compact Flash(CF) support on the DVEVM of dm6446 and to run the encode/decode demo program on the new built linux kernel to save the mepg files on the compact flash card.

The linux kernel was built based on the guideness of the SPRAAP7-Compact Flash (CF) Support on DVEVM and DVSDK software rebuilt for the target based on the SPRUE66D-Getting Started Guide(GSG). however, the demo programs cannot be run (without any output and waiting forever) after rebuilding.

My enviroment and rebuilding process were operated as follows:
1 Download installation files from website [Davinci software-Software Updates - DVSDK v1.30.01 - Production Release]
-mvl_4_0_1_demo_sys_setuplinux.bin
-mvl_4_0_1_demo_target_setuplinux.bin
-mvl_4_0_1_demo_lsp_setuplinux_01_20_00_014.bin
-dvsdk_setuplinux_1_30_00_41.bin
-xdc_setuplinux_3_00_02_14.bin
-dsp_bios_setuplinux_5_31_08_15.bin
-TI-C6x-CGTEVAL-v6.0.15.1.bin

2 Install all files as the GSG Section 4.3.1&4.3.2(4.3.3&4.3.4 are not installed)

3 Export a shared file system for Target access as the GSG Section 4.3.5

4 Setting up and test the biuld/development environment(Hello program is created)

5 Set the PLATFORM variable in the Rules.make file as described in GSG Section 4.6
  LINUXKERNEL_INSTALL_DIR configuration is a little different from the GSG.
  LINUXKERNEL_INSTALL_DIR=/home/<useracct>/workdir/lsp/ti-davinci_evm-arm_v5t_le/linux-2.6.10_mvl401

6 Because there is not linux-2.6.10_mv1401 folder on ti-davinci, I copied ti-davinci_evm-arm_v5t_le folder to my workdir/lsp described by Section 4.5

7 Configure the kernel Using the Davinci defaults by command [host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm644x_defconfig]

8 run command [host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig] and enable Compat Flash support

9 host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
  host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- modules
  host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- INSTALL_MOD_PATH=/home/<useracct>/workdir/filesys modules_install
  host $ cp /home/<useracct>/workdir/lsp/ti-davinci_evm-arm_v5t_le/linux-2.6.10_mvl401/arch/arm/boot/uImage /tftpboot
  host $ chmod a+r /tftpboot/uImage
  Everything is OK

10 Rebuild the DVSDK Software for the Target
 host $ make clean
 host $ make
   Because asm/arm/davinci_resizer.h and video/davincifb_ioctl.h cannot be found on /home/<useracct>/workdir/lsp/ti-davinci_evm-arm_v5t_le/linux-2.6.10_mvl401/include folder, I copied the necessary header files from /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci/include
 
  and then
   host $ make clean
   host $ make
   host $ make install

11 Before booting the EVM, I restarted the NFS as
  host $ /usr/sbin/exportfs -rav
  host $ /sbin/service nfs restart
  demo programs were created on /workdir/filesys/opt/dvsdk

12 Boot the new linux kernel on the EVM board via TFTP using NFS file system
  Boot was ok and compact flash could be mounted and the created hello program could be run corrretly. But when I ran ./encodedecode -h , the program waited forever if the ctrl+c was not pressed.

I checked above process for twice and the result is the same.
Would you please give my any hints to contiune those work.
 

 

  • Masaru said:

    6 Because there is not linux-2.6.10_mv1401 folder on ti-davinci, I copied ti-davinci_evm-arm_v5t_le folder to my workdir/lsp described by Section 4.5 

    Try using kernel from

    /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci

    Also, did you remember to run loadmodules.sh

     

  • loadmodules.sh was run before ./encode

    I will try /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci and report the result later

  • The following kernel

    /opt/mv_pro_4.0.1/montavista/pro/devkit/lsp/ti-davinci

    is OK.

    Now I can save mpeg4 file on the compact flash card.

    Thank you very much, Juan!

    The next question is how to play the saved mepg4 files on the microsoft windows system.  It seems that Media player can not play the saved file test1.mpeg4  directly.

    Would you please give me any advice?

  • I believe that the reason media player cannot play the mpeg4 files is that windows media player does not have the mpef4 plug-in, you will have to download this.

    Alternatively, you can use an open source tool such as MPLAYER to play mpeg4 files on windows system.

  • I am so thankful  for your reply, Juan.

    MPlayer has played my test1.mpeg4 successfully.

    I have made a great progress on dm6446 evaluation today by your help.

    If I want to save the mpeg file to the SD card by the demo programs, what should I do then?

    If there is any other application report to describe SD card support on DVEVM just as what you have written for compact flash on SPRAAP7.

    Best regards!

     

     

     

  • Masaru said:
    If I want to save the mpeg file to the SD card by the demo programs, what should I do then?

    First you would mount the SD card, and than run the demo from the comand line with the file you are generating pathed to the SD card mount location (-v \mnt\sdcard\file.mpeg4)

    Masaru said:
    If there is any other application report to describe SD card support on DVEVM just as what you have written for compact flash on SPRAAP7.

    These days I believe the SD card support is already built into the kernel you get on the DVEVM, so you should not have to go through the steps of rebuilding the kernel as shown in the SPRAAP7 document for SD cards. You will however have to go through the mounting steps, when you plug the SD card into your EVM you should get a message on the terminal saying that the card was detected and accessable in /dev/sdb1 or something similar, after you see this just run 'mkdir \mnt\sdcard' than 'mount \dev\sdb1 \mnt\sdcard' so the SD contents will be available in \mnt\sdcard.

  • Bernie is mostly right; the SD/MMC drivers are included in the kernel by default in our latest DVSDK (1.30.00.41), but I believe that instead of /dev/sdb1 (more commonly associated with USB drives), you will see "mmcblk0p1"  Also, it would be a good idea to specify the file system type (how SD card was formatted) in the mount command.  Hence to summarize, you can try the following

    > mkdir /mnt/sdcard

    > mount -t vfat /dev/mmcblk0p1  /mnt/sdcard

    Please note that mmc standards are subset of SD (sort of); I believe all SD cards are expected to be backward compatible and support MMC type functionality as well.  Anyway, this is the primary reason why MMC/SD are bundled into same kernel driver and why the /dev/ node name suggests mmcblk0p1.

     

  • I think Juan is right, mmcblk0p1 sounds familiar from work I was doing with the OMAP3, which is why i was suggesting you watch the terminal for the driver message that pops up when you insert the card, just in case it ends up being called something else for some reason. I have not had to specify the filesystem myself when mounting, usually Linux appears to be able to determine what it is on its own, but if you are using something non standard than that is certainly an option of the mount command to keep in mind.

    Incidently, I think you will get sdb1 if you use an external USB based SD card reader :)

  • Bernie and Juan

    Thank you very much that I have tested the SD-card to save the mpeg file outputed by the demo encode program as you described above using the compact-flash support uImage I built above.

     Boot information of mine is as following

    Palm Chip BK3710 IDE Register Fail
    elevator: using anticipatory as default io scheduler
    Initializing USB Mass Storage driver...
    usbcore: registered new driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.0:USB HID core driver
    mice: PS/2 mouse device common for all mice
    mmc mmc.0: Supporting 4-bit mode
    mmc mmc.0: Using DMA mode
    Registering platform device 'davinci-audio.0'. Parent at platform
    mmcblk0: mmc0:b368 SD    1960448KiB
     mmcblk0: p1
    NET: Registered protocol family 2

    The test results :

    1 SD-card is mounted by command $target mount -t vfat /dev/mmcblk0p1 /mnt/sd_card/

    2 The sd-card file system can be  recognize directly without -t option if the file system is standard one (e.g. vfat).

    3 I can not find sdb1 even an external USB based card reader is connected to USB port of dm6446 evm board.

    A question again :P

    From your indications, I know that a lot of modules and  functions have been built into the Linux kernel for dm6446.

    Are there any documents to guide how to use or test these modules and funcitons built in the kernel?

    In fact I am now trying to get data from a Gyro Sensor which is connected to dm6446 by the SPI interface DC3.

    It will be great helpful if the SPI driver has been built into the kernel already and there are some documents to tell me how to use it.

    Best regards

    Masaru

  • Masaru,

    The LSP data manual (sprs496 in DVSDK 1.30.0.41) describes the Linux kernel drivers that are included in the DM6446 kernel.  Unfortunately, there is no SPI driver available for DM6446, but there is one for DM355 (included in same DVSDK 1.30.00.41) that you may be able to leverage to write your own SPI driver for DM6446.  Some details of SPI driver ofr DM355 is also included in LSP data manual (sprs496) normally found under PSP_XX_XX_XX_XXX directory under DVSDK.