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 Problems flashing new Image (Yocto or Ubuntu)
  • 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 Verified Answer
  • Replies 10 replies
  • Subscribers 24 subscribers
  • Views 1475 views
  • Users 0 members are here
  • image
  • riotboard
  • linux
Related

Problems flashing new Image (Yocto or Ubuntu)

Former Member
Former Member over 10 years ago

Hey everyone,

 

haven't used my RIoTboard for a while, I wanted to get back to it to use it for some home automation. Unfortunately, I have quite some trouble getting a new image to work.

 

Starting out with flashing the provided Ubuntu 11.10 image to a SDcard worked well - no problems there. I then tried to get my WiFi USB dongle to work (EDIMAX EW-7811UN) and hit some errors - it could not load the modules required. Googling I found this thread (Linux header unmatched) so I went over to compile my own boot image and kernel as described in the mentioned thread as well as in this really great series: Linux on the RIoTBoard Part 2: Kernel. After having some trouble and struggling, I got it to work and was able to use my WiFi dongle with the provided Ubuntu 11.10 with my custom kernel (yay! image).

 

I continued to try updating it by changing the APT sources, but no luck - it always stopped and said to me when running sudo do-release-upgrade that no upgrade was available. Next step: get a Ubuntu 14.04 rootfs and try that one........ Seemed to work, however I was not able after searching for ours to get the root console working over serial after boot... another dead end.

 

Therefore I thought: let's try Yocto. Downloading the Yocto SDcard BSP image provided by Element14 yielded no luck - the kernel does not start as mentioned in my comment there: RIoTboard - Getting Started (I have also tried the SVN3000 version...).

 

So my question is: Is there _any_ Yocto image out there that does work? Is there already a working Ubuntu 14.04 image? Or at least a working rootfs? Or can someone tell me how to get a root console over serial after boot? (I tried putting a script in /etc/init/ starting a getty on ttymxc1, but no luck)

 

I would really like to get it up and running but am utterly failing again and again image Your help is really appreciated!

 

Thank you everyone

Michael

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

    Try to update the repos with apt-get before trying to upgrade if not already done.

    sudo apt-get update
    sudo do-release-upgrade

     

    About the console.
    Normally if you write the getty at the end of "/etc/inittab" you should get a console after boot.

     

    The line has to look like this:

    T0:2345:respawn:/sbin/getty -L ttymxc1 115200 vt100

    This is the method I use to get the console in my Debian rootfs I create from scratch.

     

    Can´t speak for the official images you get here though.
    I don´t use them...

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

    Strange, the images I worked with could boot properly and the only reason I switched to the SVN3000 image was to get the Wifi to work.

     

    Are you properly unmounting the SD card before doing the dd command ? Do you have the full output ?

     

    * sudo diskUtil list

    * sudo diskUtil unmountDisk /dev/sdX
    * sudo dd if=/path/to/image of=/dev/sdX

     

    How are the DIP switches configured on the RIoTboard ?

    • 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 fvan

    I executed exactly those commands to do the flash, once I get home I'll try it again (in 6 hours roughly) and do show the full output if it fails again. Switches are set to SD boot as shown in the User Manual. I will flash using a Ubuntu VM next time - using my Mac OS X host it took 5-10 minutes instead of just 2 over Ubuntu...

     

    One question: Did you have your HDMI cable attached while booting?

    • 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 radiatortwo

    Thanks for your reply Otto, executing an apt-get update always failed to complete - it was horribly slow and stalled indefinitely at one repo... Will try the inittab version, this "legacy" init style should still be supported by Ubuntu 14...

    Do you by chance have a Debian image publicly available? image

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

    No sorry. Only if you create the rootfs yourself like I described in my blog posts.
    I had to remove the downloads, since I lost the server and all data on it.

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

    So I just went back on trying out my Ubuntu 14.04 rootfs and getting the serial console running... I am now using the following upstart configuration file located as /etc/init/ttymxc1.conf◊

    # ttymxc1 - getty

    #

    # This service maintains a getty on ttymxc1 from the point the system is

    # started until it is shut down again.

     

     

    start on stopped rc RUNLEVEL=[12345]

    stop on runlevel [!12345]

     

     

    respawn

    exec /sbin/getty -L 115200 ttymxc1 vt102

    But no luck - I only get a tty1 over HDMI. I appended the boot log (which I get over the serial port)...

     

    Do you have any clues?

    Attachments:
    log.txt.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    More stuff I tried today... I followed your x part tutorial on creating the debian rootfs + kernel etc. Downloaded the latest u-boot, compiled it, downloaded the latest 3.18. kernel (didn't want to go with 4.x) and also compiled it.

    Got debootstrap to make an Jessie rootfs. Flashed it to an SDcard - didn't work at first. The boot script was wrong for me - I needed to use mmc 0 instead of mmc 2, but got that figured out.

    The kernel then loads - but loading just stops at some point, see the attached log once again.

     

    It's getting really frustrating as I can't figure out what's the issue. Any suggestions from anyone what's going on?!

    Attachments:
    log_deb.txt.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • radiatortwo
    0 radiatortwo over 10 years ago in reply to Former Member

    The Log says almost at the end "Waiting for root device ..."
    It seems he can´t find your root filesystem.

     

    What does your bootscript look like?
    Specifically the setenv line.

     

    The parameter rootwait tells the kernel to wait for the root file system. But if he can´t find any he won´t boot.

    You have to change the "root=/dev/mmcblk0p1" parameter to your device and partition.

    /dev/mmcblk0p1 is the first partition on internal eMMC Flash.


    If you want to boot from SD Card you´ll need /dev/mmcblk1p1 or /dev/mmcblk2p1. Depending on normal SDCard or Micro SDCard.

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

    Ah okay, that sounds very much like the problem... sorry I didn't understand it that way.

    I assume that currently it points to the wrong device - as mentioned before, I needed to change some lines in the bootscript to be able to load kernel and dtb. I did not change the root FS in the env line because in u-boot, mmc reports mmc 0 to be the SDcard and mmc 2 to be the internal eMMC. But I will play around once I get back to the board (probably tomorrow evening or friday). Thanks for your help, I will let you know!

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

    So update for all - it finally works! Thanks for your help!

     

    There were a few caveats I came across, also while following Otto's tutorial, so I will write it up here. The essential changes for me were required in the bootscript.

    It now looks as follows:

    setenv bootargs console=ttymxc1,115200 root=/dev/mmcblk0p1 rw nosmp video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32 video=mxcfb1:off fbmem=10M vmalloc=400M rootwait //this is one large line!

    mmc dev 0

    ext4load mmc 0 10800000 /boot/zImage

    ext4load mmc 0 16800000 /boot/imx6dl-riotboard.dtb

    bootz 10800000 - 16800000

    I mounted the rootfs as RW in order to be able to edit everything over the serial console. Also I needed to use mmc 0, as this was the SDcard on my board (don't ask me why...).

     

    When you want to use WiFi on your board, install at least wpasupplicant while constructing the rootfs to be able to set it up properly. Do not forget to add kernel support for your WiFi device if you wish to (mine was for Realtek, RTL) and furthermore install the appropriate firmware (search for a firmware-xxx package, e.g. firmware-realtek). Look on how to configure your interface in /etc/network/interfaces and you should be good to go!

    • 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