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
WaRP7
  • Products
  • Dev Tools
  • Single-Board Computers
  • WaRP7
  • More
  • Cancel
WaRP7
Blog Warp7 Yocto : Part2 : Flashing Warp7 binaries
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join WaRP7 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tusharp
  • Date Created: 20 Sep 2016 6:56 AM Date Created
  • Views 4115 views
  • Likes 3 likes
  • Comments 32 comments
  • tusharp
  • warp7-bsp
  • yocto
  • image
  • flashing
  • imx7s
  • embedded
  • linux
Related
Recommended

Warp7 Yocto : Part2 : Flashing Warp7 binaries

tusharp
tusharp
20 Sep 2016

Contents

1. Warp7 Yocto Part1

2. Warp7 Yocto Part2 <-- You are here

3. Warp7 Sensors demo - mpl3115a2

4. Warp7 Sensors demo - fxos8700cq

5. Warp7 IoT demo

 

In previous blog we compiled the yocto source and build binaries using yocto.

Next we shall flash the yocto images to warp.

 

Step1:

Download the imx_usb_loader zip bundle from github.

Unzip the bundle.

unzip  imx_usb_loader-master.zip

voqydv.jpg

 

 

 

Step2:

Compile the downloaded source.

cd imx_usb_loader-master
make

2mc7gip.jpg

if you get errors as below, it means libusb is missing.

655tom.jpg

install lib usb :

 

sudo apt-get install libusb-1.0-0-dev

 

 

 

Step3:

Above compilation process will create imx_uart and imx_usb binaries.

We will use the imx_usb binary, the imx_usb loader detects the Freescale devices and flashes the u-boot to ram.

 

Make sure the warp7 is plugged in before proceeding.

29z8l5z.jpg

Open a serial terminal (ex: minicom) and configure the serial device, in my case its ttyUSB0

if5ojr.jpg

 

 

 

Step4:

Setup warp7 hardware, Flash uboot and mount the emmc.

 

1. Remove the CPU board from the base board.

2. Put the dip switch2 in the upper position.

2d9pikx.jpg

3. Reconnect the CPU board to the base board

4. Connect USB serial cable between the  base board and PC.

5. Connect USB power cable between the cpu board and PC.

 

 

Now copy the uboot binary to home directory, so that its easier to locate while flashing.

cd ~
cp ~/warp7_yocto/build/tmp/deploy/images/imx7s-warp/u-boot.imx .

 

Now run the imx_usb with the u-boot.imx in path as argument.

ju8qbk.jpg

 

You will see the below as output in minicom terminal once flashing completes.

2hx5bvc.jpg

 

The uboot halts the booting process as it finds no partition table to load kernel.

This confirms the uboot is loaded to RAM.

 

Use the default environment variables and save the environment.

=> env default -f -a
=> saveenv

 

9av195.jpg

Next we will use the Device Firmware Upgrade Mode (DFU mode) to burn the uboot to warp7 emmc, so that uboot is available after board reboot.

=> dfu 0 mmc 0

 

Flash the uboot to warp7 emmc:

sudo dfu-util -D u-boot.imx -a boot

 

nbx3jo.jpg

 

Once flashed the sucess status can be checked on minicom.

54acn6.jpg

 

Press Ctrl+C to exit.

Power down the warp7 board.

Remove the CPU board from the base board.

Put dip switch2 in the lower position.

Power up the board and warp7 uboot will boot from eMMC.

 

For flashing kernel and rootfs, the eMMC space needs to be mounted, we will use uboot ums command for that.

=> ums 0 mmc 0

2lbopp4.jpg

 

Checking the emmc device...

In most cases the emmc device will be sdb unless you have multiple mass storage device connected to your PC.

$ ls /dev/sd*

mjwgle.jpg

 

 

 

Step5:

We already have the yocto generated images to be flashed.

path: /home/tushar/warp7_yocto/build/tmp/deploy/images/imx7s-warp

n4zhg8.jpg

 

Burn bundled sdcard image to emmc.

$ sudo cp /home/tushar/warp7_yocto/build/tmp/deploy/images/imx7s-warp/*sdcard.gz .
$ gunzip core-image-minimal-imx7s-warp-20160919105625.rootfs.sdcard.gz
$ sudo dd if=core-image-minimal-imx7s-warp-20160919105625.rootfs.sdcard of=/dev/sdb

 

2ms0y37.jpg

 

 

Reboot your warp7. You will get boot logs as below

 

U-Boot 2016.07-00124-g7a8868e (Sep 20 2016 - 18:22:50 +0530)

 

CPU:   Freescale i.MX7S rev1.0 at 792MHz

CPU:   Commercial temperature grade (0C to 95C) at 49C

Reset cause: POR

Board: WARP7

I2C:   ready

DRAM:  512 MiB

PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11

MMC:   FSL_SDHC: 0

*** Warning - bad CRC, using default environment

 

In:    serial

Out:   serial

Err:   serial

Net:   CPU Net Initialization Failed

No ethernet found.

Hit any key to stop autoboot:  0

switch to partitions #0, OK

mmc0(part 0) is current device

switch to partitions #0, OK

mmc0(part 0) is current device

reading boot.scr

** Unable to read file boot.scr **

reading zImage

6382896 bytes read in 121 ms (50.3 MiB/s)

Booting from mmc ...

reading imx7s-warp.dtb

37417 bytes read in 12 ms (3 MiB/s)

Kernel image @ 0x80800000 [ 0x000000 - 0x616530 ]

## Flattened Device Tree blob at 83000000

   Booting using the fdt blob at 0x83000000

   Using Device Tree in place at 83000000, end 8300c228

 

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.1.29+gfa57131 (tushar@tushar-p500) (gcc version 5.3.0 (GCC) ) #3 SMP PREEMPT Mon Sep 19 16:26:47 IST 2016

[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] Machine model: Warp i.MX7S Board

[    0.000000] Reserved memory: created CMA memory pool at 0x8c000000, size 320 MiB

 

till you reach login image...

2a6nr4z.jpg

 

If you accidently brick the board check this to recover.

 

Happy WaRPing.

Attachments:
warp7_boot_log.zip
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 8 years ago in reply to bwelsby +1
    > to put it in dfu mode works sudo dfu-util -D u-boot.imx -a boot didn't work initially: dfu-util: No DFU capable USB device available I checked the VirtualBox USB settings, seems that after you put the…
  • Jan Cumps
    Jan Cumps over 8 years ago in reply to Jan Cumps +1
    and a last yay - I'm in : uname -a Linux imx7s-warp 4.1.32-4.1-1.0.x-imx-warp7+g511f37a #1 SMP PREEMPT Tue Feb 21 x Thank you bwelsby !!
  • marcocavallini
    marcocavallini over 8 years ago in reply to ba243 +1
    Download the imx_usb_loader zip bundle from github and build it $ wget https://github.com/boundarydevices/imx_usb_loader/archive/master.zip $ cd imx_usb_loader $ make
  • texierp
    texierp over 7 years ago in reply to adnanc

    Hi,

     

    Oh, sory for the delayed response.

    It seems you are working on Android, right ?

     

    Can you share the boot sequence (run bootcmd) ?

    I am not sure to understand your problem

     

    /PJ

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • adnanc
    adnanc over 7 years ago in reply to texierp

    Hi,

     

    Did you have chance to look into my response ?

     

    A

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

    This is from PC side : image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • adnanc
    adnanc over 7 years ago in reply to texierp

    Hi PJ,

    Following are the outputs (I can see the imx7s-warp.dtb file) : image

    imageimageimage

    What do you think ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • texierp
    texierp over 7 years ago in reply to adnanc

    Hi Adnan,

     

    Seems strange.

    Have you the u-boot prompt (=> )?

    If yes, can you share the result of "ums 0 mmc 0" ?

     

    Otherwise, some docs here: https://github.com/WaRP7/WaRP7-User-Guide

     

    Regards,

     

    PJ

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