element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development SD mounting fails in Linux
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 9 replies
  • Subscribers 328 subscribers
  • Views 1530 views
  • Users 0 members are here
Related

SD mounting fails in Linux

Former Member
Former Member over 12 years ago

I've built linux and u-boot according to these references:
http://wiki.xilinx.com/zynq-uboot
http://wiki.xilinx.com/zynq-linux
`
Linux boots, but I cannot access files on the SD card. I can only access the root filesystem from the ramdisk.
`
During boot, I get these messages:
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
`
I don't know where the problem is. Am I missing something in my linux ".config"? Or maybe the device tree source? Or the ramdisk?
`
SD card access is obviously working in ROM/FSBL/u-boot, so it seems like a software issue with linux.
`
Thanks,
David
`
Edit: Maybe other devices aren't working properly either...
<snippet of booting>
Registering SWP/SWPB emulation handler
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
GEM: lp->tx_bd de042000 lp->tx_bd_dma 1e042000 lp->tx_skb ddbfd3c0
GEM: lp->rx_bd de041000 lp->rx_bd_dma 1e041000 lp->rx_skb ddbfd2c0
GEM: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
eth0: no PHY found
XEMACPS mii bus mii_probe fail.
IP-Config: Failed to open eth0
IP-Config: No network devices available
`
Edit2: Seems like I was specifying a fixed ip incorrectly in the device tree, so the ethernet seems happy now, but the MMC is still not working.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Hi

    It looks like Linux can't find the device file or the mnt directory; check if the 'mnt' directory and '/dev/mmcblk0' device exist in your rootfs.  If they are there, you may be trying to mount the SD card before it exists as a device, I would put the "mount /dev/mmcblk0p1 /mnt" command at the end of the rcS just to be safe.

    Matthew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Hi Matthew,
    The mnt directory is there of course, but the mmcblk0 doesn't exist (likewise for mmcblk0 partition 1).

    Seems like the Ethernet problem was unrelated (I think a side effect of me incorrectly modifying the "ip=" of the device tree source, but I have ETH is working now).

    However, I still do not know why the mmcblk0 device is not showing up.

    zynq> ls /dev
    console             network_latency     tty16               tty46
    cpu_dma_latency     network_throughput  tty17               tty47
    device              null                tty18               tty48
    full                psaux               tty19               tty49
    i2c                 ptmx                tty2                tty5
    input               pts                 tty20               tty50
    kmsg                ram0                tty21               tty51
    loop-control        ram1                tty22               tty52
    loop0               ram10               tty23               tty53
    loop1               ram11               tty24               tty54
    loop2               ram12               tty25               tty55
    loop3               ram13               tty26               tty56
    loop4               ram14               tty27               tty57
    loop5               ram15               tty28               tty58
    loop6               ram2                tty29               tty59
    loop7               ram3                tty3                tty6
    mem                 ram4                tty30               tty60
    mice                ram5                tty31               tty61
    mtd0                ram6                tty32               tty62
    mtd0ro              ram7                tty33               tty63
    mtd1                ram8                tty34               tty7
    mtd1ro              ram9                tty35               tty8
    mtd2                random              tty36               tty9
    mtd2ro              root                tty37               ttyPS0
    mtd3                tty                 tty38               urandom
    mtd3ro              tty0                tty39               vcs
    mtd4                tty1                tty4                vcs1
    mtd4ro              tty10               tty40               vcsa
    mtdblock0           tty11               tty41               vcsa1
    mtdblock1           tty12               tty42               xdevcfg
    mtdblock2           tty13               tty43               zero
    mtdblock3           tty14               tty44
    mtdblock4           tty15               tty45
    zynq>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Are you using the kernel from Xilinx or Digilent?  I'm not sure if the Xilinx kernel is compatible with the Zedboard.  Here's the entry for the SD Card from my devicetree, you can check it against yours:

    sdhci@e0100000 {
    tcompatible = "xlnx,ps7-sdhci-1.00.a";
    treg = <0xe0100000 0x1000>;
    tinterrupts = <0x0 0x18 0x0>;
    tinterrupt-parent = <0x1>;
    txlnx,has-cd = <0x1>;
    tclock-frequency = <0x1fc9f08>;
    };

    Matthew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Hi Matthew,

    I'm running the xilinx kernel (see link in my first post). I think that's the problem. I'll try the kernel from Digilent like you suggest (https://github.com/Digilent/linux-digilent)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Can u send the boot log.
    Are you able to access p1 on u-boot.?

    ./Jagan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Hi Jagan,

    Here is the boot log:
    http://pastebin.com/raw.php?i=9aZs1ty6

    I don't know what you mean by "access p1 on u-boot". Here's what I can see from u-boot:
    http://pastebin.com/raw.php?i=35HTddZB

    Here is my devicetree.dts:
    http://pastebin.com/raw.php?i=7cCPsJF9
    I used the one in the xilinx distribution and I think  only modified the bootargs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Edit: I got the latest of linux-xlnx, and after rebuilding the SD card works. I didn't see any mmc changes in the change log. I'm using the same compiled devicetree as before, so something in my uImage was messed up before.

    git pull
    make ARCH=arm xilinx_zynq_defconfig
    export PATH=$PATH:~/u-boot-xlnx/tools
    make ARCH=arm uImage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    When I ran into this problem, adding:

    devtmpfs.mount=1

    to the bootargs in the devicetree seemed to fix it for me.
    --Sam

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to Former Member

    yeauFF0Cthe correct solution ,thank you !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube