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 How can i flash using Linux?
  • 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 32 replies
  • Subscribers 24 subscribers
  • Views 2057 views
  • Users 0 members are here
  • flash
  • linux
Related

How can i flash using Linux?

Former Member
Former Member over 11 years ago

Hi,

 

there is no method described in the manual. I guess many (most?) people interested in an open

hardware development device are using linux.

 

I hope there are any tools available and the documentation can be extended.

 

Thanks

 

Steffen

  • Sign in to reply
  • Cancel

Top Replies

  • vandana
    vandana over 11 years ago in reply to Former Member +2
    We will be uploading the actual gerbers very soon - and it will be truly open source. Based on some of the community feedback, we are also looking into CAD library support with other tools. Thanks
  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    community.element14.com/.../contentimage_5F00_176409.html It's on Page 44 of the UM that it mentions that Linux currently only boots from eMMC. Though maybe that means eventually it'll have an SD option…
  • Former Member
    Former Member over 11 years ago in reply to Former Member +1
    anthony_h wrote: It's on Page 44 of the UM that it mentions that Linux currently only boots from eMMC. Unfortunately that's so vague as to be pointless.. From a Linux point of view eMMC and SD are…
Parents
  • Former Member
    0 Former Member over 11 years ago

    Remember that the RIoT board is targeted specifically for Android development, not mainline linux.

     

    It's also not a truly open hardware design as the actual CAD files are not provided. There are Gerbers available now which allow you to produce an exact copy, but the Mentor/KiCad/Eagle/whatever source files are not available so you can't easily modify it.

    There are better choices if you want an open hardware board, for eaxmple the Olimex OLinuXino boards.

     

    However, the user manual has section 5 on how to build linux kernel images and you'll find a linux download on this page RIoTboard

     

    image

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

    Thanks for the reply. You are right - it's maybe not that open.

     

    I have seen the linux image. My problem is, that i don't see a way to upload it to the riotboards eMMc. The mfg tool is not

    running on my linux desktop.

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

    Switch settings:

     

    Fullscreen 6648.contentimage_176412.html Download
    <html><head><title>Jive SBS</title></head>
    <body><font face="arial,helvetica,sans-serif">
    <b>Error</b><br><font size="-1">
    An general error occurred while processing your request.
    </font></font></body></html>
    

     

    or maybe this is better with them highlighted?

    image

     

    uSD Card:

     

    Fullscreen 0447.contentimage_176414.html Download
    <html><head><title>Jive SBS</title></head>
    <body><font face="arial,helvetica,sans-serif">
    <b>Error</b><br><font size="-1">
    An general error occurred while processing your request.
    </font></font></body></html>
    

     

    Card installed here:

    Fullscreen 7384.contentimage_176415.html Download
    <html><head><title>Jive SBS</title></head>
    <body><font face="arial,helvetica,sans-serif">
    <b>Error</b><br><font size="-1">
    An general error occurred while processing your request.
    </font></font></body></html>
    

     

    image

    image

    # fdisk -l /dev/sdc

     

    Disk /dev/sdc: 7948 MB, 7948206080 bytes
    10 heads, 4 sectors/track, 388096 cylinders, total 15523840 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

     

      Device Boot      Start        End      Blocks  Id  System
    /dev/sdc1            2048    2099199    1048576  83  Linux

     

    filesystem is ext2,  but none of that should matter to get output from u-boot itself.

     

    /bootscript sits in that ext2 partition and contains the following

     

    fdt_high=0xffffffff
    initrd_high=0xffffffff
    
    kaddr=0x12000000
    
    loadkernel=load ${dtype} ${disk}:1 ${loadaddr} /boot/zImage
    
    bargs=setenv bootargs console=ttymxc1,115200n8 rootwait root=/dev/mmcblk0p1 enable_wait_mode=off
    
    loadfdt=load ${dtype} ${disk}:1 0x11000000 /boot/${fdt_file}
    
    foobar=run bargs; if run loadkernel; then echo kernel_loaded ; if run loadfdt; then echo fdt_loaded; bootz ${loadaddr} - 0x11000000 ; else echo fail1; bootz ; fi ; fi ; echo failed to boot

     

    and yes, that last line needs to be on a single line..

     

    required kernel files go in /boot and are imx6s-riotboard.dtb & zImage, all three of which are attached..

     

    sha256sums:

    32d4b7d5ecc0b8838c8575e62cb689124fcaee6dc3babf0bbb76e975f9ad8ab8  bootscript
    1e9f7ae6820a2febe71b8591d079995b36c7e07a80cc52dd3bf8c937aefddc5a  imx6s-riotboard.dtb
    5078d1023d49d62146826cd33af67789337aecd32240ff836d25fb9abf275ee4  zImage

     

    Note that the kernel is quite minimal, there may not be enough in it to run a traditional distro like debian or ubuntu, but it's enough to prove booting works.

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

    Matthias Schwartz wrote:

     

    or the system needs additional information on the boot device, perhaps the u-boot parameters or some checksum.

    That doesn't appear to be the case..  Mostly out of curosity to know if my build of u-boot would work on a full sized SD card, I completely zeroed a card, then wrote just that u-boot.imx at 1KB. Took out the uSD, put the full size SD in the other slot, swapped switches 7 & 8, turned it on and the u-boot prompt appears.. Not even a partition table on the card.

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

    Thanks a lot for your detailed information! image

    Especially the kernel file and the dtb will be very useful to try.

    At the moment I don't see what I've done wrong and suspecting some hidden misconfiguration of the board.

     

    Another question. How do u-boot know which serial console and speed it should use for the output before the boot parameter of u-boot are set (setenv console...)? Perhaps everything is working except the console output.

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

    The console used is effectively hard-coded by the board config you build u-boot for. If you look in include/configs/embestmx6boards.h in the u-boot source, you'll find some lines near the top like

    #define CONFIG_MXC_UART_BASE            UART2_BASE   
    #define CONFIG_CONSOLE_DEV              "ttymxc0"
    #define CONFIG_MMCROOT                  "/dev/mmcblk1p2"
    #ifdef CONFIG_RIOTBOARD
    #define CONFIG_DEFAULT_FDT_FILE "imx6s-riotboard.dtb"
    #elif defined CONFIG_MARSBOARD
    #define CONFIG_DEFAULT_FDT_FILE "imx6q-marsboard.dtb"
    #else
    #error Please define a board (RIOTBOARD or MARSBOARD)
    #endif

     

    CONFIG_CONSOLE_DEV gets used later for the default built-in environment, but I expect that it's really CONFIG_MXC_UART_BASE that sets what the console will be.  I'm not 100% sure what gets used where though, or if you can fully override the u-boot console output by setting the var in the environment.

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

    Matthias Schwartz wrote:

     

    • Your u-boot.imx on internal eMMC: no message at all, same as above but used /dev/mmcblk0 instead /dev/mmcblk1

    From my booted uSD, I've wiped the eMMC, created a blank partition, wrote u-boot.imx as follows:

     

    root@riotboard:~# dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=20
    20+0 records in
    20+0 records out
    20971520 bytes (21 MB) copied, 2,27716 s, 9,2 MB/s
    
    root@riotboard:~# fdisk /dev/mmcblk1
    
    Welcome to fdisk (util-linux 2.24).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    
    Device does not contain a recognized partition table.
    
    Created a new DOS disklabel with disk identifier 0x9f52ed0f.
    
    Command (m for help): n
    
    Partition type:
       p   primary (0 primary, 0 extended, 4 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (2048-7503871, default 2048):
    Last sector, +sectors or +size{K,M,G,T,P} (2048-7503871, default 7503871):
    
    Created a new partition 1 of type 'Linux' and of size 3,6 GiB.
    
    Command (m for help): p
    Disk /dev/mmcblk1: 3,6 GiB, 3841982464 bytes, 7503872 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x9f52ed0f
    
    Device         Boot Start       End  Blocks  Id System
    /dev/mmcblk1p1       2048   7503871 3750912  83 Linux
    
    Command (m for help): w
    
    The partition table has been altered.
    Calling ioctl() to re-read partition table.
    Syncing disks.
    
    root@riotboard:~# dd if=u-boot.imx of=/dev/mmcblk1 bs=1024 seek=1
    319+0 records in
    319+0 records out
    326656 bytes (327 kB) copied, 0,0783677 s, 4,2 MB/s

     

    then powered down, reset the switches to the default eMMC boot settings from table 4-2 in the manual, removed all SD cards, powered it back on and I instantly get the U-Boot 2014.04-rc2...  It obviously doesn't boot fully as it's still missing a kernel and filesystem, but it seems there's nothing particularly special needed.

    So possibly your board does have a problem...  Or it'll be something so simple that you can't see it when it's staring you in the face... We've all been there image

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

    I´ve tried your files and could get an SD Card running with it.

    Only thing is there seems no ext3 filesystem in your kernel image?

     

    But I wanted to boot from the internal eMMC.

     

    Did all the same:

    Flashed the u-boot image.

    Created two partitions. One for the bootscript and Kernel files and one for the rootfs.

    Then removed the SD-Card put the switches to 2-Off 5-Off.

    And... nothing.

    No response at all.

    Then I inserted the SDCard again.

    And... it´s booting from the SD-Card although the switches are set to boot from eMMC.

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

    Otto Römmich wrote:

     

    I´ve tried your files and could get an SD Card running with it.

    Only thing is there seems no ext3 filesystem in your kernel image?

    Probably not, I did say it was a very minimal build image 

    I tend not to use ext3 if I can avoid it, but especially not on flash. Data journaling with ext3 increases the number of writes, combine that with Write amplification due to wear levelling and you have a recipe for horribly bad performance.

    Having checked the config, there's ext2 and nfs, that's it.

    Then removed the SD-Card put the switches to 2-Off 5-Off.

    And... nothing.

    No response at all.

    That happens if you have the switches set to boot from a device that doesn't contain the correct data. As far as I can tell, there's no fallback to a different device within the on-chip boot rom (however looking at the boot flow charts in section 8.5.3.2 of the ref manual... well, it's complicated.. easily possible I'm missing something), other than 'Manufacture Mode' which would allow boot from a full size SD card (or, seemingly from the OpenSDA).

     

    Building a full table of what the switches do is complicated by the fact that changing one switch from off to on might change the function of another three switches. Simplistically, with D1 On, D2 Off, you have D4 on for eMMC mode, off for SD mode, then D7 & D8 pick one of four possible SD interfaces.

     

    So, are you using a full size card in J6 on the underside of the board ?  Or a uSD in J7 on the top ?  You'll need to change D7 & D8 to match.

     

    Then I inserted the SDCard again.

    And... it´s booting from the SD-Card although the switches are set to boot from eMMC.

    SD & eMMC are very similar, it's quite possible you can boot from an SD card while D4 is set to eMMC mode, assuming D7 & D8 have picked one of the SD slots. (or you're using a full size SD card and booting in mfg mode)

     

    You're making me wonder if there's a problem with the physical switches themselves.. So even though you've turned a switch on, it's not physically shorted the two pins. Matthias was having similar problems that could probably be explained by this.  If you have a multimeter, it should be easy enough to check if anything like that is happening.

     

    Part of the reason I'd posted the photos was to make sure there wasn't something like some boards having the switches mounted in reverse causing counting from the wrong end or on/off reversals.

     

    As I've said in earlier posts, I'm able to boot exactly the same u-boot image from any of eMMC, a full size SD, or a uSD in the appropriate slots. 

    So we're left with

    1. finger trouble, hopefully dd-ing u-Boot 1KB into the card is easy enough that this isn't an issue
    2. incompatible SD cards, not impossible and has been a problem for Raspberry Pi
    3. switch problems

    I suppose it's also possible that the eFUSEs have been blown on some boards in a way that overrides some switch settings, but hopefully that's something we don't have to worry about.

     

    I should probably add that as I don't have a windows machine, I've never used the MFG Tool. Possibly it can let you do things like blowing eFUSEs that'll never have been done to my board outside whatever the factory did.

     

    One last thing, when you change the switches, are you doing a proper power cycle ?  Or just pushing the reset button ?  I always do a hard power cycle.

    I've not checked the docs in enough detail for i.MX6, but some devices only sample the boot config on power up, not on reset. So I do a hard power cycle to be sure..

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

    I´m using a Full Size SD card on J6. (SanDisk Extreme Class 10 8GB)

    I tested the switches with a multimeter. They all work properly.

    All dip switches are on except for D2 and D5 and it boots from the card. You said when D4 is set to on it´s in eMMC mode and it then can boot from the SD card in mfg mode. That´s the case I suppose.

     

    I only used MFGTool in Windows to get the Debian rootfs with the older Kernel and u-boot image on the Board. Can´t tell if the eFUSEs are alright or not.

    Then I´ve put everything on the card on the board itself. (booted from eMMC and configured the card)

    After that I booted from the card with dip switches D2,D4,D5 and D7 switched to Off. Then I did the same thing with the eMMC as I did with the SD card.

     

    Also when changing dip switches I always power off the board, before switching them. No reset.

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

    Otto Römmich wrote:

     

    All dip switches are on except for D2 and D5 and it boots from the card. You said when D4 is set to on it´s in eMMC mode and it then can boot from the SD card in mfg mode. That´s the case I suppose.

    image

     

    So if you have only D2 & D5 off, then it would seem that as long as what's at 1KB in the eMMC isn't seen as being a valid boot image then it'll try uSDHC1 which is connected to the OpenSDA and uSDHC2 which is your full size SD card.  Using this mode obviously isn't ideal as it's using 1bit rather than 4bit to access the card, so it'll be slower, but presumably u-boot will then use 4bit mode and you're fine from there.

     

    I wonder why you were having problems with the switches set differently then.  Forgetting about actually booting to linux for a moment, it should be simple to get the u-boot prompt on any of eMMC, SD, uSD by just writing a u-boot.imx starting at 1KB, there doesn't appear to be anything special needed other than that. Once you have u-boot loaded it's a relatively simple task to script what you need, even booting from the network.

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

    I've successfully installed the new u-boot boot loader on the eMMC with the MfgTool2.exe image

     

    For this I've modified the ucl2.xml file for the configuration, replaced the u-boot-mx6solo-riot.bin, powered off the board, changed the dip switches to serial download mode, switched the board back on, chekced cfg.ini, started MfgTool2.exe and programmed the boot loader. Than poweroff the board set the dip switches back to boot from eMMC and power on.

     

    I've replaced the file files/u-boot-mx6solo-riot.bin and very important delete the last two parameters skip=2 conv=fsync!

     

    The corresponding line in ucl2.xml should look like this:

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2">write u-boot.bin to sd card</CMD>

    image

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

    I've successfully installed the new u-boot boot loader on the eMMC with the MfgTool2.exe image

     

    For this I've modified the ucl2.xml file for the configuration, replaced the u-boot-mx6solo-riot.bin, powered off the board, changed the dip switches to serial download mode, switched the board back on, chekced cfg.ini, started MfgTool2.exe and programmed the boot loader. Than poweroff the board set the dip switches back to boot from eMMC and power on.

     

    I've replaced the file files/u-boot-mx6solo-riot.bin and very important delete the last two parameters skip=2 conv=fsync!

     

    The corresponding line in ucl2.xml should look like this:

    <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2">write u-boot.bin to sd card</CMD>

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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