element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog Linux on the RIoTBoard Part 4: MFGTool
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
RIoTboard requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: radiatortwo
  • Date Created: 18 Sep 2014 5:23 PM Date Created
  • Views 820 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
  • aristot
    aristot over 6 years ago

    Hi Otto,

     

    I did everything according to the tutorial and when I power ON the riotboard

    everything looks to run properly. On serial terminal I can see how everything is being

    loaded. But from the HDMI display I can really do nothing.

    Just can see small linux penguin on left top corner and no prompt line.

    It doesn't react on the keyboard while on serial terminal I see system detecting it on USB when plugging and unplugging.

    Did I miss some configuration.

     

    Thanks for help

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

    Just FYI.

     

    I updated the Blog Posts about creating the complete Linux image for the RIoTBoard.

     

    I just tested with the newest mainline Kernel (4.0) and it seems to be working with my TV now.
    I get an immediate image when the Kernel loaded.

     

    So if you can apply the RTLinux patch to the mainline kernel, you should give it a try.

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

    Thank you for you reply and note about the HDMI to VGA Adapter. It's my graduation project to make armlinux realtime. I want to use the RTlinux patch which is designed for the "original" Linux Kernel from https://www.kernel.org/. But the offical Linux Kernel has been changed a lot, and I can't patch it successfully. So I need to make the original Linux Kernel work on the RIoTboard. Thank you again.

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

    If the LED has an heartbeat, the kernel has started and you "should" get an image.

     

    I say "should" because I have a TV I also can´t get it to work with.
    Even with the Official BSP Images you can download here: RIoTboard BSP Images and Tools Download - Android and Linux

     

    It´s a somewhat older 37" Philips TV and I can´t get any picture on it.
    But the strange thing is, the Android Image for the RIoTBoard is working with the TV.

     

    I think it´s something in the Kernel. But my knowledge about this isn´t good enough to find something in the display driver.

    Someone who can program drivers should have a look at this.

     

    If you can, try another TV or Monitor to be sure.

    If you´re using an HDMI to VGA Adapter or similar, please note that you need an active one. Passive most likely won´t work.

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

    Hi Otto,

    Thank you for your tutorial that does help me a lot.Follow you instructions, everything goes well, and when finishing the fourth part, the second LED go into hearbeat mode and starts blinking.But I meet a problem, the display can't receive any signal via the HDMI. What need I do to make it?

    Expect for your help.

    Thanks

    • 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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube