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
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Forum Write an uImage from a SD card to the eMMC memory
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 10 replies
  • Subscribers 24 subscribers
  • Views 1799 views
  • Users 0 members are here
Related

Write an uImage from a SD card to the eMMC memory

Former Member
Former Member over 10 years ago

I'm wanting to flash a new uImage to replace the old uImage in the MMC.

I thought I could load this from the sd card (mmc 1:1), but I don't know yet how.

I can perform an fatload from the sd card, but how can I load this into the eMMC memory?

  • Sign in to reply
  • Cancel
  • tusharp
    0 tusharp over 10 years ago

    which os image are you using for your uImage ?

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

    I'm using Android 4.3 for the Riotboard.

    And I want to upgrade the uImage while running the device.

    http://boundarydevices.com/u-boot-on-i-mx6/

    In that link is explained what I want to, but I want to load the uImage into the eMMC and not into the SD card,

    because I'm running Android from the eMMC.

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

    can you try this android tools : http://downloads.element14.com/downloads/riotboard/Android/Tools.zip

    its the official Android 4.3 release .

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tusharp
    0 tusharp over 10 years ago

    you can find more images here :RIoTboard BSP Images and Tools Download - Android and Linux

    let us know if you have challenges in flashing .

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

    I use that tools to flash complete images to the emmc.

    But I would like to flash just the uImage to the eMMC, while the u-boot is running.

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

    Have you tried booting from SD and copying the uImage over to the eMMC?  That is what I do.  I use an SD that I dd the yocto linux sdcard image onto (fsl-image-fb-riotboard.sdcard) provided on this site.  It will mount all the mmcblk0 partitions in /media. 

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

    Hi Carlos

    I read with attention your answer as somebody asked me recently if it was possible to copy a Linux BSP image *.img into the eMMC rather than an SD-Card.

    If I understand well, I should be able to do that just connecting my RiOTboard with a mini-usb cable to my computer and select the drive corresponding to the eMMC storage using the dd command or the Win32DiskImager tool, right ?

    Thanks in advance

    Greg

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

    Hi Greg,

    Sorry, I don't know if that will work.  I do not use the mini-usb connection.  I created an SD I could boot from using the yocto linux sdcard image provided by the riot folks.  I boot from it in order to write to the eMMC.  I did look at the instructions in the xml from the mfrtool in order to know how to partition the eMMC for linux and setup the eMMC.  These are to commands I do to partition the eMMC after booting from the SD card:

     

    IMPORTANT: this is for kernel/u-boot 3.10 that uses the dtb files.  For 3.0 it is different.

    #First unmount the eMMC flash partitions:

    umount /media/mmcblk0p*

    #Destroy partition table:

    dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1

    #Create 2 partitions:

    echo -e "o\nn\np\n1\n129\n384\nt\nc\nn\np\n2\n385\n\np\nw" | fdisk /dev/mmcblk0

    #OS will remount so unmount again

    sync; sleep 5

    umount /media/mmcblk0p*

     

    IMPORTANT: the fdisk commands above assume you are using cylinder units which is the default for the fdisk on the linux sdcard image mentioned above.

    Then to copy the u-boot:

    #Write uboot and clean up u-boot parameters:

    dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync

    dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1024 count=16

    Then the kernel:

    #Format and mount boot partition:

    mkfs.msdos -F 32 /dev/mmcblk0p1

    mount -t vfat /dev/mmcblk0p1 /media/mmcblk0p1

    #Copy kernel and dtb to boot partition:

    cp uImage imx6solo_RIoTboard.dtb /media/mmcblk0p1/.

    Then the root filesystem.  Please note I am using the rootfs file (no kernel ones) I got from armhf.com (I did uncompress the tar.xz on my machine before putting it on the SD card because the linux on the sdcard does not have xz-utils):

    #Format and mount root file system (rootfs) partition:

    mkfs.ext4 /dev/mmcblk0p2

    mount /dev/mmcblk0p2 /media/mmcblk0p2

    #Copy rootfs to it:

    tar xvf ubuntu-trusty-14.04-armhf.com-20140603.tar -C /media/mmcblk0p2

    #Sync pending disk writes for good measure:

    sync

     

    After that, whenever I have a new kernel to try, I just boot from the SD card, mount mmcblk0p1 and overwrite the uImage and dtb files.

     

    Once you have a board setup the way you like it you can use dd to copy the entire eMMC to a file which you can dd back to other boards.  I have done that too and works well.

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

    this is for kernel/u-boot 3.10 that uses the dtb files.  For 3.0 it is different.

    the uboot 2009.08 used with 3.0 kernel or Ubuntu distro expects kernel at a particular location rather than a partition.

    the uboot 2014 used with  3.10.17 uses dts & expects uImage in /boot directory.

     

    so there goes the difference.

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

    Once you have a board setup the way you like it you can use dd to copy the entire eMMC to a file which you can dd back to other boards.

    a query based on above was asked before here

     

    I have done that too and works well.

    It would be nice if you copy the headers and  modules also.

    • 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