Forum Discussion
Altera_Forum
Honored Contributor
16 years agomounting SD Card on uClinux
Hi everyone,
I'm trying to implement a fat file system on sd card I followed the instructions for Altera SPI Core on this page http://www.nioswiki.com/operatingsystems/uclinux/mmcsd didn't work... was I suppose to use SPI (3 wire) IP? thanks, Asaf37 Replies
- Altera_Forum
Honored Contributor
I have the same problem,don't know how to handle it.
just display the message above ,no other messages,who can give me helps? : mmc_spi spi2.0: ASSUMING SPI bus stays unshared! mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff - Altera_Forum
Honored Contributor
... This output seems OK. What is the problem ?
-Michael - Altera_Forum
Honored Contributor
mmc_spi spi2.0: ASSUMING SPI bus stays unshared!
mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff ... but when I try to moun it /> mount -t vfat /dev/mmcblk0p1 /mnt mount: mounting /dev/mmcblk0p1 on /mnt failed: No such device or address I have insert 4GB SDcard,but cannot found the message above and cannot mount it. ———————————————————————————————— mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SDHC card on SPI mmcblk0: mmc0:0000 SD04G 3.69 GiB mmcblk0:Command: mount -t proc proc /proc -o noexec,nosuid,nodev p1 —————————————————————————————————— - Altera_Forum
Honored Contributor
(using the drivers as modules), to allow for Linux and Windows formatted cards, which uses different partition tables)I do this:
modprobe mmc_block modprobe mmc_spi# sd card formatted by Windows (no parition table) mount -t vfat /dev/mmcblk0 /mnt/sdcard# sd card formatted by Linux (first parition) mount -t vfat /dev/mmcblk0p1 /mnt/sdcard - Altera_Forum
Honored Contributor
I want know why after I use nios2-terminal command, I cann't see the display messages above,is the hardware problem or pin assign problem?
"mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SDHC card on SPI mmcblk0: mmc0:0000 SD04G 3.69 GiB mmcblk0:Command: mount -t proc proc /proc -o noexec,nosuid,nodev " DO you means that I should download the zImage and mmc_block.o and mmc_spi.o at first ?and modprobe mmc_block and mmc_spi ? I make zImage with mmc_block.o and mmc_spi.o. "nios2-linux/uClinux-dist/linux-2.6.x/drivers/mmc/host/mmc_spi.o" "nios2-linux/uClinux-dist/linux-2.6.x/drivers/mmc/card/mmc_block.o" - Altera_Forum
Honored Contributor
Sorry. Most of your messagge does not make sense to me. Please rephrase.
I suppose the "Read only switch" is not supported by the hardware. -Michael - Altera_Forum
Honored Contributor
again:
At first, after command nios2-download and nios2-terminal,just display " mmc_spi spi2.0: ASSUMING SPI bus stays unshared! mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff ... " no other message as "mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SDHC card on SPI mmcblk0: mmc0:0000 SD04G 3.69 GiB mmcblk0:Command: mount -t proc proc /proc -o noexec,nosuid,nodev " follow your suggestion ,I have donwnload zImage , mmc_block.o and mmc_spi.o,and modporbe it ,but display errors like :modprobe : chdir <2.6.30>no such file or directory. - Altera_Forum
Honored Contributor
I see this:
========================================================== Command: mkdir /mnt/sdcard Command: /etc/mount_sdcard Shell invoked to run file: /etc/mount_sdcard Command: modprobe mmc_block Command: modprobe mmc_spi mmc_spi spi2.0: ASSUMING SPI bus stays unshared! mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff Command: mount -t vfat /dev/mmcblk0 /mnt/sdcard mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SD card on SPI mmcblk0: mmc0:0000 121 MiB mmcblk0: Command: mount -t vfat /dev/mmcblk0p1 /mnt/sdcard mount: mounting /dev/mmcblk0p1 on /mnt/sdcard failed: No such device or address Execution Finished, Exiting ============================================================= Thus mmcblk0 is mounted, while mounting /dev/mmcblk0p1 fails, as this is a Windows-formatted SD-Card without a partition table. -Michael - Altera_Forum
Honored Contributor
why I cannt see the message at the process of uclinux startup?
like " Command: mount -t vfat /dev/mmcblk0 /mnt/sdcard mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new SD card on SPI mmcblk0: mmc0:0000 121 MiB mmcblk0: Command: mount -t vfat /dev/mmcblk0p1 /mnt/sdcard mount: mounting /dev/mmcblk0p1 on /mnt/sdcard failed: No such device or address Execution Finished, Exiting " and when I typed "mount -t vfat /dev/mmcblk0 /mnt/sdcard " also display "No such device or address " - Altera_Forum
Honored Contributor
we know than :(
-Michael