How to use SDHC on DM365 with MontaVista 5.0

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Why is this needed?

Out of the box, MVL 5.0 does not have SDHC support for the DM365, future versions probably will though today to get SDHC you need to apply some patches, the process of which is described in this article. Note that this just adds SDHC support to Linux, and that this does not mean that you can boot off of a SDHC card.

Test Conditions/Requirements

TMS320DM365
LSP 2.10.00.14 (DVSDK 2.10.01.18)

This was tested with 4GB SanDisk and 4GB HP cards on the DM365 EVM, if you try this with another card and it works please add it here.

CAUTION: Patches like this are given as is, with no guarantee, and are not supported by TI (i.e. if this patch breaks something else or does not otherwise work support@ti.com will probably not be able to help you, though do try http://e2e.ti.com/).

Preparing the SDHC Patched Kernel

1. Download the patch from here or here (mirrors) and save it on your Linux host machine.

2. Open a terminal and navigate to your Linux kernel source, here you will probably want to make a copy to apply the patch to so you keep your existing kernel source tree intact in the event of the unforeseen. We are assuming you have already gone though the getting started guide and are somewhat familiar with building a new Linux kernel.

cd ~/workdir/lsp_2_10_00_14/ti-davinci/linux-2.6.18_pro500
cp -r linux-2.6.18_pro500 linux-2.6.18_pro500_SDHC_patch
cd linux-2.6.18_pro500_SDHC_patch

3. Copy in the patch file you downloaded and apply the patch.

cp ~/sdhc_mvl.diff .
patch -p1 -i sdhc_mvl.diff

4. Build the newly patched kernel.

make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm365_defconfig
make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

5. Copy the newly built kernel image to your tftp boot directory so you can boot the new Linux kernel.

cp ~/workdir/lsp_2_10_00_14/ti-davinci/linux-2.6.18_pro500/arch/arm/boot/uImage /tftpboot
chmod a+r /tftpboot/uImage

6. Now that you have your new kernel booting you should be able to insert mount and access a SDHC SD card.

Testing Out SDHC Support

1. Boot up your DM365 board and insert a SDHC SD card, you should get a message like below, assuming your card is already formatted as most store bought cards are.

mmcblk0: mmc0:49a2 SD04G 3870720KiB
mmcblk0: p1

2. Now that the card has been recognized by Linux we have to mount the card with a filesystem, so we will create a new directory to mount to and mount it.

cd /mnt
mkdir sdhc_card
cd sdhc_card
mount /dev/mmcblk0p1 /mnt/sdhc_card

3. Access the files on your SDHC card from your DM365.

ls /mnt/sdhc_card
...

4. When you are done, umount the SDHC card so it can be safely removed.

umount /mnt/sdhc_card

References

http://e2e.ti.com/forums/t/10215.aspx
http://e2e.ti.com/forums/p/6206/23770.aspx#23770
http://atlas.saucontech.com/~mdeneen/ti/sdhc_mvl.diff
GSG:_DM365_DVEVM_Software_Setup#Building_a_New_Linux_Kernel

Special Thanks

To mdeneen for putting together the full patch and to Robin Iddon for the initial patch collection and testing.

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article How to use SDHC on DM365 with MontaVista 5.0 here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox