element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Blog Linux on the RIoTBoard Part 4: MFGTool
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: radiatortwo
  • Date Created: 18 Sep 2014 5:23 PM Date Created
  • Views 2283 views
  • Likes 1 like
  • Comments 9 comments
Related
Recommended

Linux on the RIoTBoard Part 4: MFGTool

radiatortwo
radiatortwo
18 Sep 2014

This series of blog posts contains the following parts:

1. The bootloader U-Boot

2. The Kernel and Device Tree

3. Debian Root File System

4. Flashing with MFGTool in Windows (This part)

5. Creating an SDCard image in Linux

 

Part 4: MFGTool

 

In this part I won´t be talking that much about MFGTool itself.

For that I already have a blog post outside of this series, that you can find here:

Mainline Kernel and U-Boot with MFGTool

 

The script used in that blog is different to the one we will be using here by the way.

So read carefully.

 

I assume that you followed the previous parts of this series.

And with that you now should have four files.

 

- u-boot.imx

- boot.scr

- linux-kernel.tgz

- oneiric.tgz

 

Depending on where you now have these files stored, you have to copy them now to your Windows system you will be using to flash everything with MFGTool.

Easiest way to that would be using WinSCP by the way.

 

What you now also need is MFGTool of course.

 

You can get one here: RIoTboard BSP Images and Tools Download - Android and Linux

Or at the end of this blog, there will also be a download to the image I created.

 

 

Now that we have our files, let´s get started.


Step 1:

Extract MFGTool if not already done.


Step 2:

Inside the folder where you extracted MFGTool, go into the folder "Profiles\MX6DL Linux Update\OS Firmware\files".

Delete all files and folders in there.

Copy your 4 new files (u-boot.imx, linux-kernel.tgz, oneiric.tgz and boot.scr) into the folder.

 

Step 3:

In the folder "Profiles\MX6DL Linux Update\OS Firmware" open the file ucl2.xml with you favourite editor. (I´m using Notepad++)

(If the file´s named ucl2.txt rename it to ucl2.xml. That´s almost a running gag here...)


Go to the End of the file and insert this right after the last </LIST> entry. Then save and close the file.


<LIST name="i.MX6SOLO-DEBIAN-RIOT-eMMC" desc="Choose eMMC as media">
  <CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6solo-RIoTboard.bin" >Loading U-boot</CMD>
  <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
  <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
  <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>


  <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=20">Wipe</CMD>


  <CMD state="Updater" type="push" body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
  <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
  <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk0"> Partitioning...</CMD>


  <CMD state="Updater" type="push" body="send" file="files/u-boot.imx">Sending u-boot</CMD>
  <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2">write u-boot.imx</CMD>
  <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1536 count=16">clean up u-boot parameter</CMD>
  <CMD state="Updater" type="push" body="frf">flush the memory</CMD>


  <CMD state="Updater" type="push" body="$ mkfs.ext4 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>
  <CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/>
  <CMD state="Updater" type="push" body="$ mount -t ext4 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>


  <CMD state="Updater" type="push" body="pipe tar --numeric-owner -zxv -C /mnt/mmcblk0p1" file="files/oneiric.tgz">Sending and writing rootfs</CMD>
  <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>


  <CMD state="Updater" type="push" body="pipe tar --numeric-owner -zxv -C /mnt/mmcblk0p1" file="files/linux-kernel.tgz">Sending and writing Kernel and Modules</CMD>
  <CMD state="Updater" type="push" body="frf">Finishing writing Kernel and Modules</CMD>

  <CMD state="Updater" type="push" body="send" file="files/boot.scr">Sending bootscript</CMD>
  <CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk0p1/boot.scr">Copy bootscript into root</CMD>
  <CMD state="Updater" type="push" body="frf">flush the memory</CMD>


  <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>


  <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>


Step 4:

In the root folder of MFGTool open the file "cfg.ini".

 

Replace the line with "name = ..." with this.

name = i.MX6SOLO-DEBIAN-RIOT-eMMC

Then save the file and close it.

 

Step 5:

Start MFGTool.

If it doesn´t give you any errors now it should have read the script correctly and has found all needed files.

Otherwise look into the file "MfgTool.log" what gives the error.

Most of the time just a file is missing.

 

Step 6:

Time to flash.

Put your RIoTBoard into serial download mode.

(Dip Switches 1 and 5 to Off rest On)

 

Connect it over the USB port right at the ethernet port with your PC and Power on the board.

 

MFGTool should now show an HID Device.

 

Hit "Start" and wait till it´s done.

Then hit "Stop" and close MFGTool.

 

Remove the USB cable and Power it Off.

 

Step 7:

Put the dip Switches back to 2 and 5 Off rest On.

Power the board on.

 

And that´s it.

 

If the kernel loads the second LED should go into hearbeat mode and starts blinking.

Also you can see everything on the serial console and can even login from there.

 

In the next part we will be creating an SDCard image you can flash onto an SDCard and then boot from it with the RIoTBoard.

  • Sign in to reply
  • radiatortwo
    radiatortwo over 11 years ago in reply to Former Member

    Could you send me the config?
    I will check the differences and apply it to my images.

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

    Hi Otto,

     

    Thanks for your response.

     

    For my application, i need an RT kernel so i build from scratch a kernel with RT patch

     

    I configure it with imx_v7_defconfig default file

     

    Now all device works fine

     

    I suppose the problem is in your riot_defconfig file.

     

    Thx

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

    Playing files seems to work fine.

    On recording with the alsa tools I also get an I/O error.

     

    Have to look further into that, but the ALSA device should work though...

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

    Hi Otto,

     

    Very good tutorial !

     

    I flash the RiotBoard with your kernel and the rootfs debian wheezy.

     

    During the boot, all seems OK

     

    But when i wanted to use the ALSA device, i can't

     

    I can see SGTL5000 device registered and one ALSA device listed.

     

    But when i want to record on hw:0,0 input capture i have an error

    pcm_read error.....I/O access error....

     

    What is the problem ?

     

    Thx

    • Cancel
    • Vote Up 0 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 © 2026 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