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
Ultrazed Hardware Design SD card boot + rootfs
  • 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 Verified Answer
  • Replies 7 replies
  • Subscribers 326 subscribers
  • Views 2559 views
  • Users 0 members are here
Related

SD card boot + rootfs

micahstevens
micahstevens over 7 years ago

Hi,

I've been attempting to get the UltraZed_IOCC_BSP to boot and run the rootfs off the SD card. I can import the fresh BSP and build it, using those images the example boots as an initramfs image fine. I can log in, etc. 

Step 1:

If I merely switch Image Packaging Configuration -> Root Filesystem Type to "SD card". Then I rebuild with petalinux-build. I then put BOOT.BIN, image.ub and system.dtb on the first fat32 partition of 1 gig on a 16 gig sd-card. I then use 'dd' to write rootfs.ext3 to the second partition. 

Kernel begins to boot, but fails some time after the logging to the serial port stops. (See #2 below).  Here is a link to the boot log: 

Pastebin Log

Step 2: 

If I go in and add the console=ttyPS0,115200 stuff to the boot args (petalinux-config -> Kernel Bootargs) I notice it's pointing the rootfs to the wrong partition, so I update the argument string. 

Original: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait

Updated: earlycon earlyprintk clk_ignore_unused root=/dev/mmcblk1p2 rw rootwait console=ttyPS0,115200

This works better as I can now see that I'm getting a kernel panic:

Bad mode in Error handler detected on CPU1, code 0xbf000000 -- SError

Pastebin Log

Step 3: 

Based on some research I discovered that as it's delivered, the BSP does not configure a write protect pin for the SD card in the device tree. (MIO 44) - however the system will look for the write protect jumper status (SD_WP_N on the carrier board). This prevents a partition from being mounted in RW mode. If you put 'disable-wp;' in the @sdhci0/1 device tree entries in system-user.dtsi, this pin (MIO 44?) will no be referenced and you can mount the filesystems on the card in RW mode.

I was able to verify this works in initramfs, but it did not fix the above kernel panic. 

Question: Do you see that I'm doing something wrong here? Has anyone run into this before? It seems like this should be a simple operation, but I've been working on various iterations of the build for several days and nothing seems to work. I would love some insight on a procedure that works (or a working BSP would be AMAZING) 

Thank you in advance for any help! 

My system-user.dtsi.

My project config.

My u-boot environment.

  • Sign in to reply
  • Cancel

Top Replies

  • micahstevens
    micahstevens over 7 years ago +1 verified
    Boot from SD Card: I started with a project from scratch, instead of the downloaded BSP. I then added this manual kernel bootcmd: earlycon earlyprintk clk_ignore_unused root=/dev/mmcblk1p2 rw rootwait…
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