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
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Blog My Adventures with SAMA5D4 Xplained
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: crjeder
  • Date Created: 12 May 2015 8:02 PM Date Created
  • Views 783 views
  • Likes 4 likes
  • Comments 3 comments
  • sama5d4
  • atmel_sama
  • smart_key_hooks
  • enchanted_objects
  • xplained
Related
Recommended

My Adventures with SAMA5D4 Xplained

crjeder
crjeder
12 May 2015

I am one of those who took the challenge to use the SAMA5D4 from the kit. My take on it is to boot using nfs mounted root file system. This would have the advantage that I would have as much space in the root file system as I need and that I could easily do changes to the rootfs without flashing the board again and again. This should dramatically speed up the development process.

Obtaining the rootfs Image

 

I'd like to use one of the large standard distributions so I look for a debian port to the arm architecture and fortunately it exists. But from there I can only download iso install images. Not exactly what I want. But to my rescue armhf.com provides a rootfs image without kernel (scroll to the bottom of the page). That's important, because in this way I can use the kernel provided by atmel which includes the correct drivers.


NFS Server

 

I have a synology NAS which provides network storage over several protocols which include nfs. So I only have to unpack the rootfs to /volume1/rootfs/SAMA5D4 and tell the server about it. For the NAS a gui is provided.

If you want to use a generic linux server just add a line to /etc/exports:

/volume1/rootfs/SAMA5D4 all(rw,sync,root_squash,no_subtree_check)

After this restart the nfs server (on synology this happens automatically):

exportfs -a

service nfs-kernel-server restart

Now the rootfs is provided via nfs.

 

Das U-Boot

 

(German for "the submarine")

Das U-Boot, the Universal Boot Loader is the boot loader used by the system image with which the SAMA5D4 Xplained board ships. To change anything in the boot process I have to change the configuration of U-Boot. This is done on it's own command line which is reached by interrupting the boot process:

 

Hit any key to stop autoboot: 0

=>

Now it's time to look at the documentation. To mount the rootfs through nfs the kernel parameters have to point to the nfs server.

The relevant kernel parameters are taken from https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt:

root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>

To set this parameters use:

=> printenv bootargs

bootargs=console=ttyS0 <......>

 

=> setenv bootargs 'root=/dev/nfs nfsroot=192.168.1.1:/volume1/rootfs/SAMA5D4 console=ttyS0 <......> ip=dhcp'

Printing the content of the bootargs variable is necessary to append the old value to the new one with cut and paste.

Changes are made permanent by 'saveenv' but this should be done after testing.

Now boot the board with the 'bootd' command.

creating NFS state directory: done

starting statd: done

NFS daemon support not enabled in kernel

image

The kernel is compiled without nfs support. In order for this to work I would need to compile a new kernel. That's bad since time is allready short. I have to find an other solution. Thanks to Robert Peter Oakes, clem57 and Jan Cumps there is at least a way to use the board. I'll try this route next.

  • Sign in to reply

Top Comments

  • clem57
    clem57 over 10 years ago in reply to Robert Peter Oakes +2
    Das Uboot
  • Workshopshed
    Workshopshed over 10 years ago +1
    I discovered uboot when I messed up flashing the Yún, love that name
  • clem57
    clem57 over 10 years ago in reply to Robert Peter Oakes

    Das Uboot

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to Workshopshed

    UBoot or Yun ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 10 years ago

    I discovered uboot when I messed up flashing the Yún, love that name

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • 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