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.

NAND boot SD card insertion

Other Parts Discussed in Thread: AM3352

Hi.


On a custom board with AM3352 with 256MiB nand flash and SD card reader, running linux debian wheezy, a boot from SD works ok, and a boot from nand flash works ok. In the later case the SD is removed (otherwise it boots from SD).

Problem: when booting from nand (SD removed), I can't get the kernel to add driver for the SD card. I haven't managed to mount the SD when the boot is made from nand.

Any idea why I can't see or mount the SD?

Br Peter

  • Hi,


    I copied the MLO, u-boot., ... from SDK 7 and boot from a nand. You can see what is happen when I inserted a sd-card.

    root@am335x-evm:~# [   58.602688] mmc1: new high speed SD card at address b368
    [   58.612737] mmcblk0: mmc1:b368 SD    1.88 GiB
    [   58.631379]  mmcblk0: p1 p2
    [   59.118163] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   61.165613] EXT4-fs (mmcblk0p2): recovery complete
    [   61.175601] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)

    root@am335x-evm:~#
    root@am335x-evm:~#
    root@am335x-evm:~# ls -l /dev/mm*
    brw-rw----    1 root     disk      179,   0 Mar 31 02:07 /dev/mmcblk0
    brw-rw----    1 root     disk      179,   1 Mar 31 02:07 /dev/mmcblk0p1
    brw-rw----    1 root     disk      179,   2 Mar 31 02:07 /dev/mmcblk0p2
    root@am335x-evm:~#

    Now after mounting this mmcblk0p1 and mmcblk0p2 you can work with sd-card.

    BR
    Ivan

  • Hi.

    Thanks for checking.

    Yes, that is how I would like it to behave. I recon the detection of the SD card is somewhere in the linux kernel/driver. I have tuned the kernel a bit because of the custom board, and I may have missed something regarding this.

    I came to think of, is there a physical GPIO "card insert" signal that should be populated to the SD card holder? I have to check the schematics to see if I have such a wire.

    If this potential wire is missing the boot from SD could still work (and it is working) by the boot code probing the devices in the boot sequence, I mean it is not waiting for the SD card to get inserted.

    Br Peter

  • Hi Peter,

    Your suspicious seems to be correct.

    SD card holder need "CD" pin (Card detect) is for auto detecting.

    Also, check in linux configuration something like "MMC card is not removable" through menuconfig in MMC driver sections.