View
217
Download
2
Category
Preview:
Citation preview
i.MX6 - Android 1-day training design
Adeneo EmbeddedApril 2012
2 | Internal use only
Document objectives
• Define the overall objectives and prerequisites of the
training
• Define the outline of the training:● Lecture● Labs● Demos
• Estimate the duration of the different modules
3 | Internal use only
Training objectives
• Awareness training
• Which tools do we want to use?
• How can we get our board up and running?
• How to build the different software components?
• How to write applications for our system?
• How to work efficiently with the i.MX6 processor?
• How do I design a custom platform based on the i.MX6?
• There will be a strong focus on hands-on labs, preceded by
explanatory slides.
4 | Internal use only
Training agenda
• Morning● Introduction to the i.MX6 platform (20 mins)● Introduction to Android (60 mins)● Community and licensing (30 mins)● Development environment (60 mins)
5 | Internal use only
Training agenda
• Afternoon● Android internals (30 mins)● Application development (90 mins)● Native Development using the NDK (20 mins)● Building Android for the i.MX6 (20 mins)● Adapting Android for a custom i.MX6 design (20 mins)● Going further (10 mins)
6 | Internal use only
Hardware requirements
• Use cheap equipment (easily purchased by trainees)
• Development laptop● + Power supply● VMWare Workstation installed
• i.MX6 Evaluation board● + Power supply● + LCD screen
• Cables and peripherals● USB to serial port (FTDI chip recommended)● USB SD Card reader● Network cable (to connect the PC directly to the board)● Several SD Cards (Sandisk is preferred as they are faster)
7 | Internal use only
Prerequisites
• Knowledge of embedded systems
• Basic knowledge of C (Java is not necessary but can be
useful)
• Basic understanding of operating systems in the context of
embedded systems (Linux knowledge is helpful)
8 | Internal use only
Introducing the i.MX6
9 | Internal use only
i.MX6 Intro - Module description
• Duration: 20 minutes
• Objectives:● Describe the i.MX family● Describe the i.MX6 line of processors● Introduce software support for different operating
systems
• Notes:● This section is common to all the trainings
10 | Internal use only
i.MX6 Intro - Module outline
• The i.MX family
• The i.MX6● Hardware highlights: ARM micro-architecture, multi-core,
compatibility, multimedia and graphics acceleration,
capture and display, networking, power management, ...● Reference platforms: SABRE Lite, QSB, ... (to be
updated when finalized)● Software support: Linux, Android, Windows Embedded
Compact, QNX
11 | Internal use only
Introduction to Android
12 | Internal use only
Android Intro - Module description
• Duration: 30 minutes (lecture) + 30 minutes (lab)
• Objectives:● Give an idea of the big picture: what are the main
components that make an Android system? What
happens when we boot?● Give an idea of how the different pieces fit together
before describing them in detail● Start using the board
13 | Internal use only
Android Intro - Module outline
• General Introduction● History● Facts and figures● Version history● The advantages of using Android
• Overview of an Android system:● Android architecture: introduction● Components: bootloader, kernel, root filesystem (and how
the files are organized)
• Description of the boot process (introduction)
14 | Internal use only
Android Intro - Module outline
• Lab: Flashing prebuilt Android images on the
development board.● Getting familiar with the development environment,
basic shell usage● Plugging the equipment● Configuring the boards● Flashing a prebuilt image● Booting the board● Understanding the layout of the SD Card
15 | Internal use only
Community and Licensing
16 | Internal use only
Community - Module description
• Duration: 30 minutes (lecture)
• Objectives:● Describe the Android ecosystem, understand where
the different pieces come from● Know where to find support and what to expect● Understanding the Android release cycle● Understanding the concept of “mainline”● Understanding the rights and obligations of free
software. Dispel some misconceptions
17 | Internal use only
Community - Module outline
• Android ecosystem: players and interactions● Google● Freescale● Linaro (and how they are not equivalent to Freescale)● Community projects (e.g. Cyanogenmod, Linux kernel)
• Freescale BSPs● Downloading the BSP● Where to find documentation● iMXCommunity, support
18 | Internal use only
Community - Module outline
• Android release cycle
• Licensing:● Rights and obligations of open-source software● Licenses primer: GPL, LGPL, Apache, BSD,
proprietary● How to keep your intellectual property● Differences with Linux● More resources
19 | Internal use only
Community - Module outline
• The Android Market● Getting access to the Android Market● Alternative marketplaces
20 | Internal use only
Development Environment
21 | Internal use only
Dev Env - Module description
• Duration: 60 minutes (lecture + lab)
• Objectives:● How to use a virtual machine● Introduce useful hardware and software tools for:
• Coding
• Debugging
• Managing the code
22 | Internal use only
Dev Env - Module outline
• Choosing a Linux distribution
• Using a Virtual Machine: benefits, recommendations and
pitfalls
• Hardware and software tools:● Serial connection● TFTP and NFS (how they can dramatically increase
your productivity)● JTAG: major vendors (Lauterbach, BDI3000,
ARM, ...), OpenOCD
23 | Internal use only
Dev Env - Module outline
Android tools:● Getting the development tools● SDK● NDK● Eclipse● ADT● ADB● Emulator● DDMS
24 | Internal use only
Dev Env - Module outline
• Lab: Creating and deploying a Hello World application
on the emulator
• Lab: Deploying Hello World on the device
• Lab: Using the adb to connect to the device
25 | Internal use only
Android internals
26 | Internal use only
Internals - Module description
• Duration: 30 minutes (lecture)
• Objectives:● Understand the Android architecture and how it differs
from a standard embedded Linux system● Describe the boot process (quick introduction)● Introduce the security model and how it impacts
application and system development
27 | Internal use only
Internals - Module outline
• Android architecture
• Booting Android● Bootloader● Kernel● Init● Zygote, Android server
• Security model
• Main differences and common points with Linux
• Toolchain
28 | Internal use only
Application development
29 | Internal use only
Application - Module description
• Duration: 30 minutes (lecture) + 60 minutes (lab)
• Objectives:● Get to know the building blocks of applications● Understand the philosophy of Android application
development● Learn how to use threads● See how Android can be used with Web applications
30 | Internal use only
Application - Module outline
• Languages and tools:● Java vs native (C/C++)● SDK vs NDK
• Documentation
• Philosophy of Android application development● How it differs from Linux
• Application manifest
• Permissions
31 | Internal use only
Application - Module outline
• Application components:● Activities● Services● Content providers● Broadcast receivers
• Lifecycle of applications
• Logging● Lab: Adding logging to an application
32 | Internal use only
Application - Module outline
• Intents
• Threads● Lab: Using threads in applications
• Application resources● Creating layouts● Lab: Modifying the layout of your application.
Adding and managing controls.
• Web application development● HTML5
33 | Internal use only
Native Development using the NDK
34 | Internal use only
NDK - Module description
• Duration: 20 minutes (lecture)
• Objectives:● Quick introduction to native development● Understand when and why using native code
35 | Internal use only
NDK - Module outline
• Using the JNI interface
• Compiling native code
• Debugging using GDB
• Guidelines
• Documentation
• Lab (optional): Adding a native method to your
application
36 | Internal use only
Building Android for the i.MX6
37 | Internal use only
Building - Module description
• Duration: 20 minutes (lecture)
• Objectives:● Learn how to get the sources for the i.MX6● See how to build Android and be efficient with the
build system
• Notes:● Adeneo's helper scripts will be provided to the
trainees
38 | Internal use only
Building - Module outline
• Documentation
• Getting the sources for the i.MX6 platform● Git and repo● Main repo commands● BSP manifest● Navigating through the sources
• Building Android● Software requirements● Build procedure● Working efficiently with the Android build system: tips and tricks
39 | Internal use only
Adapting Android for a custom i.MX6 design
40 | Internal use only
Adapting - Module description
• Duration: 20 minutes (lecture)
• Objectives:● Identify the areas of interest when porting Android to a
custom i.MX6 design● Provide recipes to customize Android● Leverage Freescale/Adeneo's experience of porting
Android. Lessons learned
41 | Internal use only
Adapting - Module outline
• Porting to the i.MX6 (quick introduction)
• Customization recipes● Boot sequence● Kernel● Network settings● Home application● Adding a Java application● Adding a native application● Adding a native library● Adding a product● Adding an overlay
42 | Internal use only
Going further
43 | Internal use only
Going further - Module description
• Duration: 10 minutes (lecture)
• Objectives:● Provide more resources (books, websites) for
additional information● Highlight Freescale's documentation and community
website
44 | Internal use only
Quizz (TBD)
Recommended