pico-i.mx6ul development platform for brillo quick start guide · 1. overview this tutorial helps...
TRANSCRIPT
PICO-i.MX6UL Development Platform for Brillo
Quick Start Guide
1
Contents
1. Overview ................................................................................................................................................... 2
2. Hardware Requirement ............................................................................................................................ 2
3. Getting Familiar with the Development Platform .................................................................................... 2
4. Connect the board and host computer..................................................................................................... 4
5. Instructions to set up the serial console terminal .................................................................................... 5
6. Download Mode and Boot Mode ............................................................................................................. 6
7. Prepare Brillo Images ................................................................................................................................ 8
7.1 Brillo Image Introduction .................................................................................................................... 8
7.2 Prebuilt Brillo Images .......................................................................................................................... 9
7.3 Self-Built Brillo Images ........................................................................................................................ 9
7.3.1 Build Environment Setup ............................................................................................................. 9
7.3.2 Get Brillo Source Code ................................................................................................................. 9
7.3.3 Build Brillo Images ........................................................................................................................ 9
8. Testing and Debugging Tools .................................................................................................................. 10
9. Flash Brillo Images .................................................................................................................................. 10
9.1 Flash Brillo Images with MFG Tools .................................................................................................. 10
9.2 Provision images with FASTBOOT mode ........................................................................................... 12
10. Boot Brillo ............................................................................................................................................. 12
10.1 Change boot arguments.................................................................................................................. 12
11. Instructions to make board into FASTBOOT mode ............................................................................... 12
12. Useful Links ........................................................................................................................................... 13
2
1. Overview
This tutorial helps new developers get started with NXP’s development platform for Brillo – PICO-
i.MX6UL board, and software support. Specifically, it walks through the hardware setup, Brillo image
build and board booting process.
All code development, build, and unit testing take place on the developer’s host computer. The
resulting image is flashed to the target hardware for further integration testing and debugging over
USB or Ethernet. Just as Brillo is Android-based, the software development leverages Android
development tools including ADB (Android Development Bridge) and FASTBOOT mode to interact
with the target.
This development platform together with the Board Support Package software aim to enable faster
development of IoT devices based on Brillo, and flexible hardware/software customization needed
for the particular device.
2. Hardware Requirement
The development kit contains:
PICO-i.MX6UL-eMMC System-On-Module (SOM)
• PICO-Hobbit I/O carrier board (pre-assembled with the SOM)
• DC power supply
The power adapter specification is rated as follows:
DC output voltage: 5V
DC output Current: 2A
DC plug dimensions (mm): 5.5 +/- 0.05 (OD) x 2.1 +/- 0.05 (ID) x 10 +/- 0.3 (L)
Other required materials include:
• Cables:
For ADB/FASTBOOT/MFGTool
o USB type-A to USB type-C cable
Serial console:
o FTDI branded USB to Serial cable such as the FTDI TTL-232R-3V3-WE
o WiFi antenna (IPEX interface)
3. Getting Familiar with the Development Platform
If you just got your board, please familiarize yourself with the key components of the System-on-Module
(PICO-i.MX6UL-eMMC System-On-Module)
3
Figure 1. PICO-i.MX6UL-eMMC SOM Components
The key interfaces of the board are shown in Figure 2 and 3:
5V power input jack (number 6 in Figure 2).
Microphone + headphone jack (number 4 in Figure 2)
WiFi + Bluetooth antenna connector (number 5 in Figure 2)
6-pin header for UART console interface (number 2 in Figure 2). This interface is used for serial
console interface.
Figure 2. Top view of the PICO-i.MX6UL board
USB OTG type-C connector (number 11 in Figure 3). This connector is used for ADB and
FASTBOOT interface.
4
Figure 3. Front view of the PICO-i.MX6UL board
Take a close look at the jumpers on the top view of the board. There are two different setup for
download mode and boot mode. Continue reading for further details.
4. Connect the board and host computer
1. The UART serial debug interface can be easily connected with an FTDI branded USB to Serial cable
such as the FTDI TTL-232R-3V3-WE. The cable can be found on
http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
2. Get a USB type A to USB type C cable. Plug the USB type C end into the USB OTG type C connector
(number 11 in Figure 3) for ADB and FASTBOOT interface. Plug the other end of the USB cable into
your computer.
Note: the connector is reversible but only one side is connected to the device. If you don’t have
ADB or FASTBOOT access, try plugging the USB cable with the other side up.
3. Connect the WiFi antenna to connector (number 5 in Figure 2)
4. Plug in the power supply. (The serial RS232 connector with UART pin out is not included in the kit.
Please use the FTDI branded USB to Serial cable)
5
Figure 4. PICO-i.MX6UL board with serial console and Wi-Fi antenna connected
5. Instructions to set up the serial console terminal
1. Make sure you connect to the UART serial console as shown in step 3 in “Connect the board and
host computer” section
2. Start the serial communication software
3. Choose operating system of host computer– Window
a. Once the PC recognizes the virtual USB to UART device, it can be seen it in your PC Device
Manager list. You can determine the port number of the virtual COM port by looking under the
"Ports" group.
b. With the serial port driver installed, run your favorite terminal application to view the serial
output from i.MX6UL microprocessor's UART.
Recommended tools for serial communication terminal are: Putty and Minicom
Serial port configuration: 115200 baud, 8 data bits, 1 stop bit, no parity.
Note: The PC needs a driver to enable a virtual COM port through the PC USB port. Please
consult www.ftdichip.com/Documents/InstallGuides.htm to download the correct driver.
Set up serial communication terminal in Putty as below:
6
Figure 5a. Screenshot of Putty
4. Choose operating system of host computer – Ubuntu
Install Minicom on host computer with below commands:
Set up serial communication terminal in Minicom as below:
Figure 5b. Screenshot of Minicom
6. Download Mode and Boot Mode
The board is designed as booting from the internal eMMC. There are two modes for the PICO-i.MX6UL
board. One is the download mode in which the board will receive the instructions from MFG Tools to
flash images to boot storage such as eMMC. The other one is boot mode in which the board will load the
image from the boot storage and boot from the image.
Only J1 and J4 need adjustments.
To make the board in download mode, please set the jumpers J1:12 and J4:23 as shown:
$ sudo apt-get install minicom
7
Figure 6a. PICO-i.MX6UL Board Jumper Setup (Download Mode)
To make the board in boot mode, please set the jumpers J1:23 and J4:12 as shown:
Figure 6b. PICO-i.MX6UL Board Jumper Setup (Boot Mode)
The board comes with a working image burned in eMMC. To boot the board from that image, you can
boot the board directly with the power supply connected. Please make sure the board is in Boot Mode
with the jumper setting as above.
8
7. Prepare Brillo Images
The next section shows how to use the NXP provided Brillo source code to build an operating system
image for Brillo, using uboot (universal bootloader) and how to use NXP provided MFGtool
(Manufacturing tool) to flash the board.
7.1 Brillo Image Introduction
The table describes Brillo images and the targeted eMMC partition where the Brillo images to be flashed
into:
Image Name Image Description Target Parition
u-boot.imx The u-boot bootloader image, which is
the first code run after the PICO-i.MX6UL
board hardware reset. It will load and
jump to the boot.img either from Slot a’s
boot partition or Slot b’s boot partition,
based on the meta data stored in misc
partition
The first 8MB section
boot.img The Brillo boot image which is composed
by linux kernel zImage, linux kernel
dtb(Device Tree Binary) file, Brillo
ramdisk image, and linux kernel boot
arguments. The code in boot.img will
mount the related system.img based on
the meta data stored in misc partition.
1st partition(Slot a’s boot partition) for
picoimx-emmc, named as boot_a
7st partition(Slot b’s boot partition) for
picoimx-emmc, named as boot_b
userdata.img The Brillo user data image which includes
Brillo and Weave test binary
4th partition for picoimx-emmc
system.img The Brillo system image which includes
all Brillo and Weave related binarys,
librarys, and system configuration files.
5th partition(Slot a’s system partition)
for picoimx-emmc, named as system_a
8th partition(Slot b’s system partition)
for picoimx-emmc, named as system_b
misc.img The Brillo misc image which is used to
store the Bootctrl meta data. The
Bootctrl is an implementation to switch
between the two Brillo images(Slot a, and
Slot b)
9th partition for picoimx-emmc
9
7.2 Prebuilt Brillo Images
The prebuilt Brillo images can be downloaded at NXP Brillo landing page: www.nxp.com/IMXBRILLO.
7.3 Self-Built Brillo Images
7.3.1 Build Environment Setup Refer to the link https://source.android.com/source/initializing.html for establishing a Build
Environment.
7.3.2 Get Brillo Source Code To get the Brillo source, follow below steps:
$ cd ~
$ mkdir mybrillo
$ mkdir bin
$ cd mybrillo
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo >
~/bin/repo
$ chmod a+x ~/bin/repo
$ ~/bin/repo init -u https://android.googlesource.com/brillo/manifest -b
master
$ repo sync
To get the uboot source code, follow below steps:
7.3.3 Build Brillo Images To build boot.img, userdata.img, system.img and misc.img, run as below:
Will generate images under ~/mybrillo/out/target/product/picoimx
To build u-boot.imx, run as below:
$ cd ~/mybrillo
$ mkdir –p bootable/bootloader
$ cd bootable/bootloader
$ git clone http://sw-stash.freescale.net/scm/imx/uboot-imx.git -b
imx_v2015.04_brillo
$ cd ~/mybrillo/
$ lunch picoimx-eng
$ make
10
Will generate u-boot.imx under ~/mybrillo/bootable/bootloader/uboot-imx.
8. Testing and Debugging Tools
Unit tests run locally on the developer’s host computer and integration tests interact with the target
device via ADB. The PICO-i.MX6UL board is Brillo compatible and provides full support for ADB and
FASTBOOT over USB for debugging.
ADB and FASTBOOT are housed tools in the Android SDK. Please refer to the link
http://developer.android.com/sdk/index.html#Other to download the latest version of Android SDK
9. Flash Brillo Images
9.1 Flash Brillo Images with MFG Tools
The generated images built in Section “Build Brillo Images” can be downloaded to the target board using
the MFGTool. The MFGTool is mfgtools.tar.gz.
Note: The MFGTool can work both in the Windows and Linux environment.
Perform the following steps to download the board images:
1. Unzip the mfgtools.tar.gz file to a selected location. The directory is named MFGTool-Dir in this
example.
2. Copy the following files from brillo_image_picoimx-emmc.tar.gz or to the directory: MFGTool-
Dir/Profiles/Linux/OS Firmware/files/brillo/pico
○ u-boot.imx
○ boot.img
○ system.img
○ userdata.img
○ misc.img
3. Make your board into download mode by setting the board’s jumper J1:12 and J4:23 (refer to
Figure 6a).
4. Program images in Windows OS:
a. Power on the board. Using USB cable on the OTG port, connect your Windows PC with PICO-
i.MX6UL board.
$ cd ~/ mybrillo/bootable/bootloader/uboot-imx
$ export ARCH=arm
$ export CROSS_COMPILE=~/mybrillo/prebuilts/gcc/linux-x86/arm/arm-linux-
androideabi-4.9/bin/arm-linux-androideabi-
$ make picosom-imx6ul_defconfig
$ make
11
b. Double click the file mfgtool2-brillo-mx6ul-pico-emmc.vbs according to the target device as
shown in the below table.
c. Click Start to start image downloading.
Figure 7a. MFGTool screenshot for Start
d. The figure below shows the downloading in progress where the status bar shows the download
status. The download may take one to two minutes depending on the host machine.
Figure 7b. MFGTool screenshot In Process
e. The image below shows what the tool will become once the download is complete.
Figure 7c. MFGTool screenshot Complete
12
f. Click “Stop” and disconnect the USB cable.
5. Program images in Linux OS:
a. In Linux, run below command:
b. Power on the board. Using USB cable on the OTG port, connect your Linux with PICO-i.MX6UL-
emmc board.
9.2 Provision images with FASTBOOT mode
All Brillo images except the uboot.imx can be flashed with provision-device script if the board already
been flashed with a valid Brillo. The process shows as below:
1. Refer “11. Instructions to make board into FASTBOOT mode” to make the board into FASTBOOT
mode.
2. Run below commands in Linux PC
$ cd ~/mybrillo/out/target/product/picoimx/
$ ./provision-device
$ fastboot reboot
10. Boot Brillo
After flashing the images, you can boot the board directly with the power supply connected. Please
make sure the board is in Boot Mode with the jumper setting as J1:23 and J4:12.
10.1 Change boot arguments
By default, the u-boot will take the boot arguments stored in Brillo’s boot.img. Below is an example in
case you need to change the default boot arguments used by u-boot.
11. Instructions to make board into FASTBOOT mode
FASTBOOT mode is a state in which the board will respond the commands from host PC FASTBOOT
commands to flash Brillo images or query board information. You can set the device into FASTBOOT
mode with either of the two ways below:
$ sudo ./linux-runvbs.sh mfgtool2-brillo-mx6ul-pico-emmc.vbs
U-Boot > setenv bootcmd boota mmc0
U-Boot > setenv bootargs console=ttymxc5,115200 init=/init
androidboot.console=ttymxc5 androidboot.hardware=freescale cma=96M
U-Boot > saveenv
U-Boot > boot
13
1. Via ADB command line
o Once you confirm that you have access the device through ADB on your PC, run command
2. Via serial console
o Once the board completed booting-up, type the following commands in your serial console
window:
o Once the device is in FASTBOOT mode, your serial console will look similar to the screen shown
below:
Figure 8. Screenshot of serial console in FASTBOOT mode
o To get the device out of FASTBOOT mode, run command:
12. Useful Links
http://developer.android.com/tools/help/adb.html
https://www.kingoapp.com/help/fastboot-mode.htm
$ adb reboot bootloader
$ su
$ reboot bootloader
$ fast reboot
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, COOLFLUX,EMBRACE,GREENCHIP, HITAG, I2C BUS, ICODE, JCOP, LIFE VIBES, MIFARE, MIFARE CLASSIC, MIFARE DESFire, MIFARE PLUS, MIFARE FLEX, MANTIS, MIFARE ULTRALIGHT, MIFARE4MOBILE, MIGLO, NTAG, ROADLINK, SMARTLX, SMARTMX, STARPLUG, TOPFET, TRENCHMOS, UCODE, Freescale, the Freescale logo, AltiVec, C_5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C_Ware, the Energy Efficient Solutions logo, Kinetis, Layerscape, MagniV, mobileGT, PEG, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, Ready Play, SafeAssure, the SafeAssure logo, StarCore, Symphony, VortiQa, Vybrid, Airfast, BeeKit, BeeStack, CoreNet, Flexis, Layerscape, MXC, Platform in a Package, QUICC Engine, SMARTMOS, Tower, TurboLink, and UMEMS are trademarks of NXP B.V. All other product or service names are the property of their respective owners. ARM, AMBA, ARM Powered, Artisan, Cortex, Jazelle, Keil, SecurCore, Thumb, TrustZone, and μVision are registered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. ARM7, ARM9, ARM11, big.LITTLE, CoreLink, CoreSight, DesignStart, Mali, mbed, NEON, POP, Sensinode, Socrates, ULINK and Versatile are trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. The Power Architecture and Power.org word marks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. © 2014–2015 NXP B.V.
How to Reach Us
Home Page: www.nxp.com
Web Support: www.nxp.com/support
USA/Europe or Locations Not Listed: NXP Semiconductors Technical Information Center, EL516 2100 East Elliot Road Tempe, Arizona 85284 +1-800-521-6274 or +1-480-768-2130 www.nxp.com/support
Europe, Middle East and Africa: NXP Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) www.nxp.com/support
Japan: NXP Semiconductors Japan Ltd.. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064, Japan 0120 191014 +81 3 5437 9125 [email protected]
Asia/Pacific: NXP Semiconductors Hong Kong Ltd Technical Information Center 2 Dai King Street Tai Po Industrial Estate, Tai Po, N.T., Hong Kong +800 2666 8080 [email protected]
Information in this document is provided solely to enable system and software implementers to use NXP products. There are no express or implied copyright license granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document.
NXP Semiconductors reserves the right to make changes without further notice to any products herein. NXP Semiconductors makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does NXP Semiconductors assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters which may be provided in NXP Semiconductors data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. NXP Semiconductors does not convey any license under its patent rights nor the rights of others. NXP Semiconductors products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the NXP Semiconductors product could create a situation where personal injury or death may occur. Should Buyer purchase or use NXP Semiconductors products for any such unintended or unauthorized application, Buyer shall indemnify and hold NXP Semiconductors and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that NXP Semiconductors was negligent regarding the design or manufacture of the part.