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 2059 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

    Not really sure if that attachment will work or not, I uploaded a 319KB u-boot.imx and seem to have ended up with a zip file that's a different size 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

    I think the attachment is ok u-boot.imx has 326656 bytes, here is the situation:

     

    • Original u-Boot console on internal eMMC from RIoT-tools: working, with original ubuntu kernel, but I get CRC error when using my own Gentoo kernel.
      Message from u-Boot (with or without uSD put in):
      Board: i.MX6DL/Solo-SABRESD: unknown-board Board: 0x61011 [POR ]
      *** Warning - bad CRC or MMC, using default environment
      MMC read: dev # 3, block #2048, count 8192 ... 8192 blocks read: OK
      ## Booting kernel from Legacy Image at 1080000000 ...
           Image Name:   Linux-3.0.35-02871-ga35ffe
           Image Type:     ARM Linux Kernel Image (uncompressed)
           Date Size:        3901664 Bytes = 3.7 MB
           Load Address: 10008000
           Entry Point:      10008000
           Verifying Checksum ... OK
           Loading Kernel Image ... OK
      OK
      Starting Kernel ...
      Linux version 3.0.35...
    • Your u-boot.imx on external uSD card: no message at all
      Booted ubuntu from eMMC cleared the uSD with dd if=/dev/zero of=/dev/mmcblk1
      Created 4 partitions on uSD with fdisk starting from sector 2048 (uSD hast 4 heads, 16 sectors, 486192 cylinders)
      Installed u-boot.imx with dd if=u-boot.imx of=/dev/mmcblk1 bs=1024 seek=1
      Powered down the system and set the DIP switch for booting from uSD
      Reboot and no reaction on serial console
    • Your u-boot.imx on internal eMMC: no message at all, same as above but used /dev/mmcblk0 instead /dev/mmcblk1
    • Original u-boot-mx6solo-riot.bin on external uSD card: no message at all like above
    • Reflash original u-boot-mx6solo-riot.bin on internal eMMC: works
    • Reflash Android on external SD card: works I can switch between eMMC ubuntu and SD android via DIP switches
    • 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

    Hmm... like I said, I don't have the board here, so it's difficult to check switch settings. I'll do so later this afternoon and let you know. 

     

    file size looks correct, and the exact command I used to write it from the history was dd if=u-boot.imx of=/dev/sdb bs=1024 seek=1 using a usb SD adapter.

     

    Unfortunately uploads here seem to be limited to 50MB, but maybe we just need to find a way to get you a straight copy of my uSD image to try.

    • 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

    I found this log in my terminals history showing what you should see, you should at least get the u-boot part with probably an error about missing /bootscript

     

    U-Boot 2014.04-rc2-00094-g7d72f06-dirty (Mar 30 2014 - 18:20:25)

     

    CPU:  Freescale i.MX6SOLO rev1.1 at 792 MHz
    Reset cause: POR
    Board: RIoTboard
    I2C:   ready
    DRAM:  1 GiB
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
    No panel detected: default to HDMI
    Display: HDMI (1024x768)
    In:   serial
    Out:  serial
    Err:  serial
    Net:  FEC [PRIME]
    Warning: Your board does not use generic board. Please read
    doc/README.generic-board and take action. Boards not
    upgraded by the late 2014 may break or be removed.
    Hit any key to stop autoboot:  0
    start
    MMC: no card present
    mmc0(part 0) is current device
    load..
    MMC: no card present
    ** Bad device mmc 0 **
    mmc1 is current device
    load..
    473 bytes read in 29 ms (15.6 KiB/s)
    import...
    executing
    2836792 bytes read in 192 ms (14.1 MiB/s)
    kernel_loaded
    33044 bytes read in 76 ms (423.8 KiB/s)
    fdt_loaded
    Kernel image @ 0x12000000 [ 0x000000 - 0x2b4938 ]
    ## Flattened Device Tree blob at 11000000
      Booting using the fdt blob at 0x11000000
      Using Device Tree in place at 11000000, end 1100b113

     

    Starting kernel ...

     

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 3.14.0-imx (root@sl1) (gcc version 4.8.2 (GCC) ) #9 SMP Tue Apr 1 14:04:31 UTC 2014
    [    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: RIoTboard i.MX6SDL
    [    0.000000] cma: CMA: reserved 16 MiB at 3e800000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] PERCPU: Embedded 8 pages/cpu @edfce000 s8320 r8192 d16256 u32768
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
    [    0.000000] Kernel command line: console=ttymxc1,115200n8 rootwait root=/dev/mmcblk0p1 enable_wait_mode=off
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 1017160K/1048576K available (3802K kernel code, 169K rwdata, 1280K rodata, 196K init, 353K bss, 31416K reserved, 270336K highme)
    [    0.000000] Virtual kernel memory layout:

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

     

    I think the attachment is ok u-boot.imx has 326656 bytes, here is the situation:

     

    root@fubar01:~/riotboard# ls -l u-boot.imx
    -rw-r--r-- 1 root root 326656 Mar 30 19:23 u-boot.imx
    root@fubar01:~/riotboard# sha256sum u-boot.imx
    36c4d61fa46203b8c4297c94ce5833739674a4bea92ea5766b631b5ab4a5b4ab  u-boot.imx

     

    Hopefully that can confirm the file you have is the same.

    • 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

    Yes the sha256sum is correct. I think the problem is not the u-boot.imx image. Either the dd call failed or the system needs additional information on the boot device, perhaps the u-boot parameters or some checksum. Or something on my board is corrupt.

     

    I tried dd to /dev/mmcblk0 and /dev/mmcblk1 directly from ubuntu on the RIoT-board and dd to /dev/sda from an x86 linux system with USB to SD converter. Same effect with both. I checked the dip switches multiple times. Are there different board revisions with different switch settings?

     

    When I'm using your u-boot in the serial download mode for BootStrap your UBoot-2014.04-rc2...dirty starts, first success 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

    as far as I know, the only requirement is that the u-boot.imx file is written at 1K into the card..  it's obviously important that you don't create a filesystem at sector 63 as that would overwrite u-boot. Hence you create the first partition at 2048 blocks (1MByte) into the card.

    The very same method works on the Wandboard and I've used it sucessfully there too.

     

    Likewise, I've not seen anything to suggest there's more than one revision of the board.  I suppose it's possible that one of the boot settings resistors from p18 of the schematics is missing, but it seems less likely if you're able to get the original images to boot.

     

    If the serial download mode gets you something on the console then it seems it's likely to be switch settings, wrong SD card slot, failed write to the card, or maybe the boot rom is doing something your sd card doesn't like while trying to load u-boot..

    • 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
Reply
  • 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
Children
  • 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
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