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

2a6nr4z.jpg

 

If you accidently brick the board check this to recover.

 

Happy WaRPing.