i.MX Android R10.3 User Guide Update

来源:互联网 发布:js 给input value赋值 编辑:程序博客网 时间:2024/05/16 06:55

i.MX Android R10.3 User Guide Update

Last Update: Oct 28th, 2011

    1. 1. Setup
      1. 1.1 PC Setup
      2. 1.2 Unpack i.MX Android Release Package
      3. 1.3 Run Android with Prebuilt Image
    2. 2. Build Android for i.MX
      1. 2.1 Get Android Source Code (Android/Kernel/uboot)
      2. 2.2 Patch Code for i.MX
      3. 2.3 Build Uboot Images
      4. 2.4 Build Kernel Image
      5. 2.5 Build Android Image
    3. 3. Download images and Boot-up system
      1. 3.1 Board Dip Switch Setting
        1. 3.1.1 USB serial download settings
        2. i.MX51 BBG
        3. i.MX53 TABLET
        4. i.MX50 RD3
        5. 3.1.2 Boot up settings
        6. i.mx51 BBG MMC/SD Slot1 Boot
        7. i.mx53 TABLET eMMC(SD slot3) Boot
        8. i.mx53 TABLET MMC/SD (slot1) Boot
        9. i.mx50 RD3 SPI nor Boot
      2. 3.2 System on MMC/SD and eMMC
        1. 3.2.1 Storage Partitions
        2. 3.2.2 Download Images with MFG Tool
        3. 3.2.3 Download Images with dd utility
        4. 3.2.4 Download Images with fastboot
      3. 3.3 System on NFS
        1. 3.3.1 Setup the TFTP and NFS root
      4. 3.4 System on NAND Flash
           3.4.1 NAND layout and contents
      5.    3.4.2 Download Images with MFG Tool
      6.    3.4.3 Boot from SPI nor and NAND flash
      7. 3.5 Boot Up configurations
        1. 3.5.1 U-Boot environment
        2. 3.5.2 Kernel command line (bootargs)
    4. 4. Run
      1. 4.1 Multimedia
        1. 4.1.1 Music Play
        2. 4.1.2 Video Play
        3. 4.1.3 Streaming Play
        4. 4.1.4 Camera & Camcorder
        5. 4.1.5 Sound Recording
      2. 4.2 Storage
        1. 4.2.1 USB Mass Storage
        2. 4.2.2 Multi-Storage Access
      3. 4.3 Connection
        1. 4.3.1 Enable WiFi
        2. 4.3.2 Browse Internet using 3G Modem Connection
        3. 4.3.3 Enable the AR6002 WIFI card
      4. 4.4 Display
        1. 4.4.1 TVout (Video Only)
        2. 4.4.2 TVout (Video and UI)
        3. 4.4.3 Dual-Display
        4. 4.4.4 24bpp pixel format support for UI
      5. 4.5 Application & Development
        1. 4.5.1 Key Map
        2. 4.5.2 Adjust Media Volume for Music and Video
        3. 4.5.3 Adjust Brightness of LCD Backlight
        4. 4.5.4 longer Screen Timeout
        5. 4.5.6 App to SD
        6. 4.5.7 Software Update and Wipe Partition using Recovery Mode
        7. 4.5.8 3D Demo
        8. 4.5.9 Fastboot
        9. 4.5.10 2G/2G enable
      6. 5. FAQ
      7. 5.1 Why did the code fail to download from Google when repo init?
      8. 5.2 Why I can't access the internet with browser using ethernet?
      9. 5.3 Can I access Android shell using ethernet instead of a serial port?
      10. 5.4 How do I change Android boot logo?
      11. 5.5 How to use wake_lock to control specific devices?


1. Setup

1.1 PC Setup

To build the Android source files, you will need to use Linux PC. It's suggested that you use the most recent version of Ubuntu which is the mostly tested OS for an Android build.
After installing Linux PC, you need check whether you have all necessary packages installed for an Android build. Refer to"Setting up your machine" on the Android web sitehttp://source.android.com/source/download.html. 

1.2 Unpack i.MX Android Release Package

After you setup a Linux PC, unpack the FSL i.MX Android Release Package using the following commands: 
    $ cd /opt (or any other directory you like)
    $ tar xzvf imx-android-r10.3.tar.gz
    $ cd imx-android-r10.3/code
    $ tar xzvf r10.3.tar.gz

1.3 Run Android with Prebuilt Image

To try Android before building any code, use the prebuilt images under image/ and directly go to "Download Images and Bootup"。

The prebuilt image is under each platform directory that uncompressed from the release package:

i.MX51 BBG board (i.MX53 TABLET board which is known as SMD board have the same directory structure)

System images for MMC/SD and eMMC
  • bootloader: imx51_BBG/u-boot-no-padding.bin or imx51_BBG/u-boot.bin (with padding)
  • kernel: imx51_BBG/uImage
  • Android file system:
    • Initramfs:  imx51_BBG/SD/uramdisk.img
    • System root:  imx51_BBG/SD/system.img
    • Data: imx51_BBG/SD/userdata.img. Not provided as it's empty.

System images for TFTP/NFS

  • bootloader: imx51_BBG/u-boot-no-padding.bin or imx51_BBG/u-boot.bin (with padding)
  • kernel: imx51_BBG/uImage
  • Android file system: imx51_BBG/NFS/android_fs.tar.gz

2. Build Android for i.MX

2.1 Get Android Source Code (Android/Kernel/uboot)

the Android source code is maintained as more than 100gits in an Android repository (Visit GitWeb from browser).
To get the Android source code from Google repo, follow the steps: 

    Assume you had unzipped i.MX Android release package to /opt/imx-android-r10.3/.
    $ cd ~
    $ mkdir myandroid
    $ cd myandroid
    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ./repo
    $ chmod a+x ./repo
    $ ./repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
    $ ./repo sync

    after sync code successfully,do the following:
    $ cd myandroid/external
    $ git clone git://android.git.linaro.org/platform/external/alsa-lib.git
    $ git clone git://android.git.linaro.org/platform/external/alsa-utils.git
    $ git clone git://android.git.linaro.org/platform/external/mtd-utils.git

    $ cd myandroid/hardware
    $ git clone git://android.git.linaro.org/platform/hardware/alsa_sound.git   

    $ cd myandroid/packages/apps
    $ rm -rf CellBroadcastReceiver
Get a clean kernel source code from kernel.org, and checkout the tag of 2.6.35.3

    $ cd myandroid
    $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git kernel_imx
    $ cd kernel_imx
    $ git checkout v2.6.35.3

If you use uboot as your bootloader, then you need get a clean source code base from the original git:

    $ cd myandroid/bootable/bootloader
    $ git clone git://git.denx.de/u-boot.git uboot-imx
      

2.2 Patch Code for i.MX 

Apply all i.MX Android patches using following steps:

    Assume you had unzipped i.MX Android release package to /opt/imx-android-r10.3/.
    $ cd ~/myandroid
    $ . /opt/imx-android-r10.3/code/r10.3/and_patch.sh
    $ help
    Now you should see "c_patch" function is available for you
 
    $ c_patch /opt/imx-android-r10.3/code/r10.3 imx_r10.3
 
    Here "/opt/imx-android-r10.3/code/r10.3" is the location of the patches (i.e. directory created when you unzip release package)
    "imx_r10.3" is the branch which will be created automatically for you to hold all patches (only in those existing Google gits). 
    You can choose any branch name you like instead of "imx_r10.3".
    
    If everything is OK, "c_patch" will generate the following output to indicate successful patch:
    **************************************************************
    Success: Now you can build android code for FSL i.MX platform
    **************************************************************
Note: The patchscript (and_patch.sh) utalizes some basic utilities like awk/sed. If they are not available on yourLinuxPC, install them in advance.

2.3 Build Uboot Images

    $ cd ~/myandroid/bootable/bootloader/uboot-imx
    
    $ export ARCH=arm
    $ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-

    Command to build for i.MX51 BBG board is:
    $ make distclean
    $ make mx51_bbg_android_config
    $ make

    Command to build for i.MX53TABLET board is:
    $ make distclean
    $ make mx53_
smd_android_config
    $ make

    Command to build for i.MX53ARD board is:
    $ make distclean
    $ make mx53_
ard_config (If your board has DDR3, then using mx53_ard_ddr3_config)
    $ make

    Command to build for i.MX50 RD3 board is:
    $ make distclean
    $ make mx50_rd3_android_config
    $ make


    "u-boot.bin" is generated if you have a successful build.

    The above u-boot.bin has 1024KB padding at the head of file,for example first executable instruction is at the offset 1KB. If you want to generate a no-padding image, you need do below dd command in host.
    $ sudo dd if=./u-boot.bin of=./u-boot-no-padding.bin bs=1024 skip=1; sync
     
    Usually this no-padding uboot image is used in the SD card, for example, program this no-padding uboot image into 1KB offset of SD card so that we do not overwrite the MBR (including partition table) within first 512B on the SD card.

    
Note: Any image which must be loaded by uboot must have an unique image head, for example, some data must be added at the head of loaded image to tell uboot about the image (for example, it's a kernel, or ramfs, etc) and how to load the image (for example, load/execute address).
    Therefor before you can load any image into RAM by uboot, you need a tool to add this information to generate a new image which can be recognized by uboot. Fortunately, this tool is delivered together with uboot. After you make uboot using the above steps, you can find the tool (mkimage) under tools/.
    Later the document will describe how to use mkimage to generate the image (for example kernel image, ramfs image) to be loaded by uboot. 

2.4 Build Kernel Image

Kernel image will be built out when building the android root file system. So you can jump to next section if you do not take care how to build kernel image.
To run Android using NFS or from SD, build the kernel with the default configuration now as follows:

      Assume you had already built uboot. mkimage was generated under myandroid/bootable/bootloader/uboot-imx/tools/ and it's in your PATH
    $ export PATH=~/myandroid/bootable/bootloader/uboot-imx/tools:$PATH
    $ cd ~/myandroid/kernel_imx

    $ echo $ARCH && echo $CROSS_COMPILE
    Make sure you have those 2 environment variables set
    If the two variables have not set, please set the as:
    $ export ARCH=arm
    $ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

  

      $ make imx5_android_defconfig
    Generate ".config" according to defaultconfig file under arch/arm/configs.

    $ make uImage

With a successful build in either of the above case, the generated kernel image is ~/myandroid/kernel_imx/arch/arm/boot/uImage.

Generate uImage to be loaded by u-boot

To generate uImage from the built zImage, generate a uImage based on the abovezImage as follows:

    $ cd ~/myandroid/kernel_imx/arch/arm/boot

For i.MX51 BBG Board:
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T kernel -C none -a 0x90008000 -e 0x90008000 -n "Android Linux Kernel" -d ./zImage ./uImage

For i.MX53 TABLET/ARD and i.MX50 RD3 Board:
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T kernel -C none -a 0x70008000 -e 0x70008000 -n "Android Linux Kernel" -d ./zImage ./uImage

    During boot, when uboot try to load above "uImage", it will know to load it (without image head added by mkimage tool) into 0x90008000 or 0x70008000 (specified by "-a"), and then jump to 0x90008000 or 0x70008000 (specified by "-e") to execute it. "-C none" means no compression when generating "uImage". This is because the original zImage is already a compressed one.


2.5 Build Android Image 

After applying all i.MX patches, build the kernel and Android image using following steps:

    $ cd ~/myandroid
    $ export CROSS_COMPILE=~/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- 

    Command to build for i.MX51 BBG3 board is:
    $ source build/envsetup.sh
    $ lunch imx51_bbg-user
    $ make

    "imx51_bbg" is the product names (see ~/myandroid/device/fsl/product)

Command to build for i.MX53 TABLET board is:   
$ source build/envsetup.sh
    $ lunch imx53_smd-user
    $ make

    "imx53_smd" is the product names (see ~/myandroid/device/fsl/product)

    Command to build for i.MX53 ARD board is:    
$ source build/envsetup.sh
    $ lunch imx53_ard-user
    $ make

    "imx53_ard" is the product names (see ~/myandroid/device/fsl/product)

    Command to build for i.MX50 RD3 board is:    
$
source build/envsetup.sh
    $ lunch imx50_rdp-user
    $ make

    "imx50_rdp" is the product names (see ~/myandroid/device/fsl/product)

 
    After build, check build_*_android.log to make sure no build error.

For i.MX50 RD3 build, the following outputs are generated as default under myandroid/out/target/product/imx50_rdp :
root/ : root file system (including init, init.rc, etc). Mounted at/
system/:  Android system binary/libraries. Mounted at /system
data/: Android data area. Mounted at /data
recovery/
: root file system when booting in "recovery" mode. Not directly used.
ramdisk.img
: Ramdisk image generated from "root/". Not directly used.
android_root.img:
UBI raw image generated from "system/", it contains system, data and cache UBI volumes with UBIFS format.
android_recovery.img:
UBI raw image generated from "recovery/". it contains recovery UBI volumes with UBIFS format.

For i.MX51 BBG build, the following outputs are generated as default under myandroid/out/target/product/imx51_bbg: 
For i.MX53 ARD build, the following outputs are generated as default under myandroid/out/target/product/imx53_ard :
For i.MX53 TABLET build, the following outputs are generated as default under myandroid/out/target/product/imx53_smd :
root/ : root file system (including init, init.rc, etc). Mounted at/
system/:  Android system binary/libraries. Mounted at /system

data/: Android data area. Mounted at /data
recovery/
: root file system when booting in "recovery" mode. Not directly used.
ramdisk.img
: Ramdisk image generated from "root/". Not directly used.
system.img: EXT4 image generated from "system/". Can be programmed to "SYSTEM" partition on SD card with "dd"
userdata.img: EXT4 image generated from "data/".
recovery.img: EXT4 image generated from "recovery/". Can be programmed to "RECOVERY" partition on SD card with "dd"

2.5.1 User Build mode

For production and release, you need to build the system as user mode, it have limited access for security, and avoid many of debug tools.
It will install modules tagged with user.
install APK and tools according to product definition files, please check thePRODUCT_PACKAGES in device/fsl/imx5x/imx5x.mk
and set ro.secure=1, and ro.debuggable=0, and adb is disabled by default.

If you need add your customized package, please add the package's MODULES_NAME or PACKAGE_NAME to this list.

change the eng in previous section to user can generate user mode image:
eg:
    $ make PRODUCT-imx51_bbg-user 2>&1 | tee build_imx51_bbg_android.log
Or you can use:

    $ . build/envsetup
    $ lunch imx51_bbg-user
    $ make

Change imx51_bbg to imx5x_xxx board list in previous section.
More android building information please refer: http://source.android.com/source/building.html

NOTE: if you build the system images by user build mode, the ADB is disabled by default. If want to use ADB, you must enable it in the settings application after android startup:Settings->Applicaitons->Development.

Generate uRamdisk to be loaded by uboot
The following steps generate a RAMDISK image recognized by uboot:
     Assume you had already built uboot. mkimage was generated under myandroid/bootable/bootloader/uboot-imx/tools/

    $ cd myandroid/out/target/product/imx50_rdp
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage 
-A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

    $ cd myandroid/out/target/product/imx51_bbg
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage -A arm -O linux -T ramdisk -C none -a 0x90308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img


    $ cd myandroid/out/target/product/imx53_ard
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage 
-A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

    $ cd myandroid/out/target/product/imx53_smd
    $ ~/myandroid/bootable/bootloader/uboot-imx/tools/mkimage
-
A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img



3. Download images and Boot-up system

To boot up the android system, you must first download the bootloader, kernel, ramdisk and rootfs images into the main storage device (MMC/SD or eMMC) or unpack the NFS root filesystem into the NFS server root.
This section describes how to run the system on main storage device or NFS with several methods to download the images into storage device.

3.1 Board Dip Switch Setting

First of all, introduce the hardware board's Dip Switch settings. You may use these dips before download and boot system.
About the details dip switches, you can refer to 
"i.MX50_RDP_Linux_BSP_UserGuide.pdf"
"i.MX51_EVK_Linux_BSP_UserGuide.pdf"
"i.MX53_ARD_Linux_BSP_UserGuide.pdf"
"i.MX53_EVK_Linux_BSP_UserGuide.pdf"
"i.MX53_SABRE_TABLET_Linux_BSP_UserGuide.pdf".

3.1.1 USB serial download settings

You may use this USB serial download settings before using the MFG toolto download image.

i.MX51 BBG

Switch
S-1
S-2
S-3
S-4
S-5
S-6
S-7
S-8
S-9
S-10
S1OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON

i.MX53 TABLET

Switch
D1
D2
D3
D4
D5
D6
D7
D8
SW26
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
SW28
OFF
OFF
ON
ON
OFF
OFF
OFF
OFF

i.MX50 RD3

Switch
D1
D2
S1
ON
ON

3.1.2 Boot up settings

i.mx51 BBG MMC/SD Slot1 Boot


Switch
S-1
S-2
S-3
S-4
S-5
S-6
S-7
S-8
S-9
S-10
S1OFF
OFF
OFF
OFF
OFF
OFF
ON
ON
OFF
OFF

i.mx53 TABLET eMMC(SD slot3) Boot


Switch
D1
D2
D3
D4
D5
D6
D7
D8
SW26
OFF
ON
OFF
OFF
ON
ON
ON
OFF
SW28
OFF
OFF
OFF
OFF
OFF
OFF
OFF
ON

i.mx53 TABLET MMC/SD (slot1) Boot



Switch
D1
D2
D3
D4
D5
D6
D7
D8
SW26
OFF
OFF
OFF
OFF
OFF
OFF
ON
OFF
SW28
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF

i.mx50 RD3 SD boot; others boot mode, refer to"Codex_CPU_Boot_Mode.xls"


Switch
D1
D2
D3
D4
D5
D6
D7
D8
SW5
OFF
ON
OFF
OFF
ON
OFF
OFF
OFF
SW4
OFF
OFFOFF
OFF
OFF
OFF
OFF
OFF
SW3
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF

Switch
D1
D2
S1
OFF
OFF

3.2 System on MMC/SD and eMMC

Android support running on the MMC/SD card, or on board eMMC device.
Currently, i.MX51 BBG only support MMC/SD system, but i.MX53 TABLET also support eMMC device, i.MX50 RD3 support NAND device.

We need images below to create an android system on MMC/SD or eMMC device:
  • u-boot image: u-boot.bin or u-boot-no-padding.bin
  • kernel image: uImage
  • ramdisk image: uramdisk.img
  • Android system root image: system.img
  • Recovery root image: recovery.img
All the images you can get from the release package, or built out by yourself as 2.5 section described.

NOTE: i.MX53 TABLET take eMMC as the default storage for android system, so the default images in the release package only support android boot from on board eMMC device.
If you want to boot it from SD card, please change the init.rc in the uramdisk.img, and modify all the 'mmcblk0px' to 'mmcblk1px', as we take eMMC block device as mmcblk0, but external SD slot as mmcblk1:
    
    # dd if=uramdisk.img of=ramdisk.img.gz skip=64 bs=1
    # gunzip ramdisk.img.gz
    # mkdir ramdisk; cd ramdisk
    # cpio -i < ../ramdisk.img
    # vim init.rc   (modify the init.rc, change the mmcblk0 to mmcblk1)
    # find . | cpio --create --format='newc' | gzip > ../ramdisk.img
    # mkimage-A arm -O linux -T ramdisk -C none -a 0x70308000 -n "Android Root Filesystem" -d ./ramdisk.img ./uramdisk.img

3.2.1 Storage Partitions

The layout of the MMC/SD card or eMMC for Android system is showed in below.
  • [Partition type/index] is which defined in the MBR. 
  • [Name] is only meaningful in android, you can ignore it when creating these partitions.
  • [Start Offset] shows where partition is started, unit in MBytes.

The SYSTEM partition is used to put the built out android system image. The DATA is used to put application's unpacked codes/data, system configurations database, etc. In normal boot mode, the root file system is mounted from uRamdisk. In recovery mode, the root file system is mounted from the REOVERY partition.

Partition Type/IndexNameStart OffsetSizeFile SystemContentN/ABOOT010MBN/Abootloader/kernel/uramdisk imagesPrimary 1 MEDIA10MBUser DefinedVFAT. Mount as /sdcardsMedia file storage
Primary 2 SYSTEMfollow MEDIA>= 200MBEXT4. Mount as /system (with read only)Android system bin/libs (system.img)Logic 5 (Extended 3)DATAfollow SYSTEM> 200MBEXT4. Mount as /dataAndroid data (e.g. installed app)Logic 6 (Extended 3)CACHEfollow DATA> 10MBEXT4. Mount as /cacheAndroid cachePrimary 4 RECOVERYfollow CACHE> 20MBEXT4. Mount as / in recovery mode Root file system for recovery mode (recovery.img)
To create these partitions, you can simply use MFG tool described in next section, or use fdisk utility on Linux PC.
After creating the partitions by fdisk, please format each file systems by the following commands:
    
    # mkfs.vfat /dev/sdx1
    # mkfs.ext4 /dev/sdx2 -O ^extent -L system
    # mkfs.ext4 /dev/sdx4 -O ^extent -L recovery
    # mkfs.ext4 /dev/sdx5 -O ^extent -L data
    # mkfs.ext4 /dev/sdx6 -O ^extent -L cache


NOTE: /dev/sdxN, the x is the disk index from 'a' to 'z', that may be different on each Linux PC.

3.2.2 Download Images with MFG Tool

Take MX53 TABLET with eMMC boot as example:

Before using the MFG tool, please setup the board's Boot Dip switch settings to USB serial download mode.
  • Copy the android images: u-boot.bin, uImage, uramdisk.img, system.img, recovery.img to Profiles/MX53 Linux Updata/OS Firmware/files/android.
  • Run the MFGTool, plug in the usb cable and choose your profile
       Notes: Find a new device and install the driver  (the drivers\ directory)


       
  • Select the profile MX53SMD-Android-eMMC4.4: Option -> Configuration -> Profiles -> Options

EULA.txt

  • Power on the board, install the USB PC driver if needed. You will see the device connected: 'Freescale i.MX53 USB BulkIO Device'
  • If not see this, please check the right port number and devices. (Or press the "reboot" key SW10 on debug board)
                    “Options->Configuration->USB Ports”
          or the Boot dip on the board.
  •  After all preparation done, press the "Start"

Notes: you can connect the serial port to check the download process.

3.2.3 Download Images with dd utility

The linux utility "dd" on Linux PC can be used to download the images into the MMC/SD card. Before downloading, make sure your MMC/SD card's partitions are created.
And all the partitions can be recognized by Linux PC. To download all the images into the card, please use the commands below:

    Download the uboot image:
    # sudo dd if=u-boot.bin of=/dev/sdx bs=1K skip=1 seek=1; sync
Or If you're using no padding uboot image:
    # sudo dd if=u-boot-no-padding.bin of=/dev/sdx bs=1K seek=1; sync
    Download the kernel image:
    # sudo dd if=uImage of=/dev/sdx bs=1M seek=1; sync    
    Download the initramfs image:
    # sudo dd if=uramdisk.img of=/dev/sdx bs=1M seek=6; sync
    Download the android system root image:
    # sudo dd if=system.img of=/dev/sdx2; sync
       Download the android recovery image:
    # sudo dd if=recovery.img of=/dev/sdx4; sync

3.2.4 Download Images with fastboot

The fastboot is a utility which can be used to download images from Windows/Linux PC to the target storage device. This utility is released by google in the Android SDK packages, which can be downloaded from Android's official site. Freescale's android release implements part of the fastboot commands in the uboot, like flash, reboot, getvar. It supports MMC/SD on i.MX51 BBG and MMC/SD, eMMC on i.MX53 TABLET board.

NOTE: MX53 TABLET eMMC fastboot can only support up to 4GB size right now.

Before using the fastboot, Android SDK must be installed on the HOST and the target board can boot up to bootloader. Before using fastboot, the uboot must be downloaded to the MMC/SD or eMMC device with all the partitions created and formatted as 3.2.1. And setup the correct board dip switches to boot up the board with uboot.

Target side:

  • Power on the board with USB otg connected.
  • Press any key to enter the uboot shell.
  • Select the correct device to do fastboot image download by command:
    • SD/MMC card
                U-Boot > setenv fastboot_dev mmc0
    • on board eMMC (only support on MX53 TABLET)
U-Boot > setenv fastboot_dev mmc1
    • SSD (only support on MX53 TABLET)
U-Boot > setenv fastboot_devsata
  • Run the fastboot command, and you can see:
   U-Boot > fastboot
    fastboot is in init......USB Mini b cable Connected!
    fastboot initialized
    USB_SUSPEND
    USB_RESET
    USB_RESET

        NOTE: On HOST PC, It will prompt you that a new device found and need to install the driver. please install it.

Host side:

  • Enter the Android SDK tools directory and find the fastboot utility (it's fastboot.exe on Win, fastboot on Linux)
  • Copy all download images to the "images" folder
  • Run the following commands:
   
    U-Boot> fastboot flash bootloader images\u-boot-no-padding.bin
    U-Boot> fastboot flash kernel images\uImage
    U-Bootfastboot flash uramdisk images\uramdisk.img
    U-Bootfastboot flash system images\system.img
    U-Bootfastboot flash recovery images\recovery.img
    U-Bootfastboot reboot

  
After reboot, you can check the target, and setup the bootloader environments.


3.2.5 Boot from MMC/SD and eMMC

When a MMC/SD or eMMC device ready for Android system boot, you can power on the board to setup the u-boot environment for loading kernel/ramdisk from device
On the u-boot shell:

U-Boot > setenv ethaddr 00:04:9f:00:ea:d3            [setup the MAC address]
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3          [setup the MAC address]
U-Boot > setenv loadaddr <kernel load addr>          [0x90800000 for i.MX51, 0x70800000 for i.MX50/3]
U-Boot > setenv rd_loadaddr <ramdisk load addr>      [0x90D00000 for i.MX51, 0x70D00000 for i.MX50/3]       
U-Boot > setenv bootcmd 'run bootcmd_SD; bootm ${loadaddr} ${rd_loadaddr}'
U-Boot > setenv bootcmd_SD 'mmc read 0 ${loadaddr} 0x800 0x2000; mmc read 0 ${rd_loadaddr} 0x3000 0x300;'  [load kernel and ramdisk from MMC/SD or eMMC]
[About the eMMC boot, please use the "mmc read 1" replace the"mmc read 0"] 
U-Boot > setenv bootargs <SD/MMC bootargs>           [For different platforms, please refer to below table]
U-Boot > saveenv                                     [Save the environments]

Examples for bootargs:
PlatformBootargsi.MX51 BBG with WVGAconsole=ttymxc0 init=/init androidboot.console=ttymxc0 di1_primary gpu_nommu, gpu_memory=32M calibration ip=dhcp
i.MX51 BBG with DVI
console=ttymxc0 init=/init androidboot.console=ttymxc0 di0_primary gpu_nommu, gpu_memory=32Mvideo=mxcdi0fb:RGB24,1024x768M@60
i.MX53 TABLET with LVDSconsole=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary ip=dhcp gpu_nommu, gpu_memory=64M
i.MX53 TABLET with HDMI
console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1280x720M@60 hdmi di0_primary ip=dhcp gpu_nommu, gpu_memory=64M
console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary ip=dhcp gpu_nommu, gpu_memory=64Mdmfc=3
i.MX53 ARD with LVDS
console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB666,XGA ldb=di0 di0_primary ip=dhcp gpu_nommu, gpu_memory=64Mi.MX50 RD3 with E-Ink
console=ttymxc0 init=/init androidboot.console=ttymxc0 keypad video=mxc_el、cdif_fb:off
i.MX50 RD3 with SEIKO LCD (connected on J13)
console=ttymxc0 init=/init androidboot.console=ttymxc0 keypad lcd=1
i.MX50 RD3 with SEIKO LCD (connected on J12)
console=ttymxc0 init=/init androidboot.console=ttymxc0 keypad lcd=1,j12
i.MX50 RD3 with CLAA LCD (connected on J12)
console=ttymxc0 init=/init androidboot.console=ttymxc0 keypad lcd=2
NOTE: each item in the bootargs will be explained in the section 3.4

After these settings configured, reboot the board.
For the first time boot, it takes some time to the Android UI.

3.3 System on NFS

Android support running the system on NFS root filesystem. We can put the total android root system into NFS, but load kernel image from TFTP server.
Therefore you must have a PC which has NFS and TFTP server, with their root directory setup correctly, e.g /opt/tftproot for TFTP root, and /opt/nfsroot for NFS root.

NOTE: due to support LCD display on MX508 RD3 board, the FEC pins has configured for elcd interface. So the FEC can not be used by default kernel images. If you're willing to use the NFS with EPDC display, please remove the CONFIG_FB_MXC_ELCDIF_FB, CONFIG_FB_MXC_CLAA_WVGA_SYNC_PANEL and CONFIG_FB_MXC_SEIKO_WVGA_SYNC_PANEL configure from kernel.

3.3.1 Setup the TFTP and NFS root

After you setup the TFTP/NFS server, please put the kernel image into the tftp server root directory and the Android file system files into the NFS server root directory.

When you setup NFS, please do following step:

 

delete this line:

  RPCMOUNTDOPT=--manage-gids

 

in /etc/default/nfs-kernel-server

To avoid some permission issue when enable wifi on NFS.


For kernel image, use uImage instead of zImage 

  * If you are using a prebuilt image, make sure you pick up the correct uImage (see "Prebuilt image for using uboot")

  * If you are building your own image, make sure you generated a uImage (see "Generate uImage to be loaded by u-boot").


Copy uImage to the TFTP server root directory. For example:

    $ cp your_uImage /opt/tftproot/
Setup the Android file system:
 * If you are using a prebuilt image, unzip the android zip file (see "Prebuilt image for using uboot") to the NFS server root. For example:
     $ cd /opt/imx-android-r10.3/image/imx5x_BOARD/NFS
     $ tar xzvf ./android_fs.tar.gz
     $ cd android_fs
     $ rm -rf /opt/nfsroot/*
     $ cp -r * /opt/nfsroot/*

 * If you built out your own Android image, copy the generated Android files to the NFS root manually. For example:
     $ cd myandroid
     $ rm -rf /opt/nfsroot/*
     $ cp -r out/target/product/imx5x_BOARD/root/* /opt/nfsroot/
     $ cp -r out/target/product/imx5x_BOARD/system/* /opt/nfsroot/system/ 
NOTE: Since the NFS uses system and cache folder under /opt/nfsroot/, comment out the mount system and cache lines in /opt/nfsroot/init.rc.

3.3.2 Boot from TFTP and NFS

Setup the u-boot environment for loading kernel from TFTP and mounting NFS as root filesystem after we got the u-boot shell:

U-Boot > setenv ethaddr 00:04:9f:00:ea:d3            [setup the MAC address]
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3          [setup the MAC address]
U-Boot > setenv loadaddr <kernel load addr>          [0x90800000 for i.MX51, 0x70800000 for i.MX50/3]       
U-Boot > setenv bootfile uImage
U-Boot > setenv serverip <your server ip>            [Your TFTP/NFS server ip]
U-Boot > setenv nfsroot <your rootfs>               [Your rootfs]
U-Boot > setenv bootcmd 'dhcp;bootm'                [load kernel from TFTP and boot]
U-Boot > setenv bootargs <NFS bootargs>             [For different platforms, please refer to below table; do not add '']
U-Boot > saveenv                                     [Save the environments]

Examples for bootargs:
PlatformBootargsi.MX51 BBG with WVGAconsole=ttymxc0 init=/init androidboot.console=ttymxc0 root=/dev/nfs nfsroot=${serverip}:${nfsroot} rw ip=dhcp di1_primary gpu_nommu, gpu_memory=32Mi.MX53 TABLET with LVDSconsole=ttymxc0 init=/init androidboot.console=ttymxc0 root=/dev/nfs nfsroot=${serverip}:${nfsroot} rw ip=dhcp video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary gpu_nommu, gpu_memory=64Mi.MX50 RD3 with E-Ink
console=ttymxc0 init=/init androidboot.console=ttymxc0 root=/dev/nfs nfsroot=${serverip}:${nfsroot} rw ip=dhcp keypad video=mxc_elcdif_fb:off

After done these settings, reboot the board, let u-boot to run the bootcmd environment to load kernel and run.
For the first time boot, it causes some time to finish and finally you can got to the Android UI.

3.4 Boot Up configurations

This section explains the common u-boot environments we used for NFS, MMC/SD boot above, and also kernel command line we may changed for different usage scenarios.

3.4.1 U-Boot environment

  • ethaddr/fec_addr: MAC address of your board
  • serverip: IP address of your TFTP/NFS server
  • loadaddr/rd_loadaddr: the kernel/initramfs image load address in memory. Different platform may have different loadaddr and rd_loadaddr, listed below: 
  •   
    I.MX51 BBG 
    I.MX53 SMD/ARD
    I.MX50 RD3
    loadaddr
    0x90800000
    0x70800000
    0x70800000
    rd_loadaddr 
    0x90D00000
    0x70D00000
    0x70D00000

  • bootfile: the name of image file loaded by "dhcp" command, when you using TFTP to load kernel.
  • bootcmd: the first variable to run after uboot boot
  • bootargs: the kernel command line, bootloader passed to kernel. Described in 3.4.2 section
  • dhcp: get ip address by BOOTP protocol, and load the kernel image ($bootfile env) from TFTP server.
  • bootm: start to run the kernel.

3.4.2 Kernel command line (bootargs)

Depend on different booting/usage scenarios, you may need different kernel boot parameters set for bootargs.

Kernel ParameterDescriptionTypical ValueUsed Whenconsolewhere to output kernel log by printkconsole=ttymxc0All caseandroidboot.consoleindicate Android shell where to put logandroidboot.console=ttymxc0All case for Android (with this parameter, you can use Ctrl-C in Android shell)inittell kernel where is the init fileinit=/initAll case for Android. "init" in Android is located in "/" instead of in "/sbin"iptell kernel how/whether to get IP addressip=none
or 
ip=dhcp
or 
ip=static_ip_address
"ip=dhcp" or "ip=static_ip_address" is mandatory in "boot from TFTP/NFS"nfsrootwhere is NFS server/directoryrootfs=ip_address:/opt/nfsroot,v3,tcpUsed in "boot from tftp/NFS" together with "root=/dev/nfs"rootindicate where is the root file systemroot=/dev/nfs
or
root=/dev/mmcblk0p2
Used in "boot from tftp/NFS" (i.e. root=/dev/nfs);
Used in "boot from SD" (i.e. root=/dev/mmcblk0p2) if no ramdisk is used for root fs
videotell kernel/driver which resolution/depth and refresh rate should be usedvideo=mxcdi0fb:1024x768M-16@60Used when display on DVI (i.MX51 BBG3 board). Please check "Display Settings" table below for detail.di1_primarytell kernel/driver using DI1 displaydi1_primaryUsed to tell kernel which display interface is the default on for UI.calibrationtell kernel/driver to do touch panel calibration when 1st bootcalibrationUsed when touch panel is needed. i.e. when you display everything on DVI or multitouch screen, no need for this.keypad (for i.mx50)
Use the keypad on E-ink panel board
keypad
Use the keypad on E-ink panel board
dmfc
tell ipu driver to use a specific DMFC FIFO size, which is related with display/video performance.
dmfc=3
Used when display/video resolution is close to MX51 or MX53 display bandwidth. For example, for MX53, this option should be added for 1080P60 display/video. Note that adding this option means that you are dropping dual display support.
tve
tell kernel to probe TVE driver to support TVout
tve
When TVout is the primary display device, hot plug-in display devices, like HDMI monitor and DVI monitor are not supported as the secondary display device. This option is valid for TVout only case or TVout video only case.
vga
tell kernel to probe TVE driver to support VGA monitor
vga
When VGA monitor is used

Display settings


MX51

MX53


Display device
InterfaceFormatVideo ModeInterface
Format
Video Mode
DVIdi0RGB24
mxcdi0fb:800x600M-16@60
di0
RGB24
mxcdi0fb:800x600M-16@60
HDMI


di0
RGB24
mxcdi0fb:1280X720M@60 hdmi
LVDS



diX
(X=0 or X=1)

RGB666
mxcdiXfb:RGB666,XGA ldb=diX
WVGA LCD
di1RGB565
mxcdi1fb:CLAA-WVGA
di0
RGB565
mxcdi0fb:CLAA-WVGA
TV Encoder
di1
YUV444
mxcdi1fb:TV-NTSC                                                      mxcdi1fb:TV-PAL
mxcdi1fb:TV-720P60
di1
YUV444
mxcdi1fb:TV-NTSC                                                      mxcdi1fb:TV-PAL
mxcdi1fb:TV-720P60


4. Run

4.1 Multimedia

4.1.1 Music Play

Use the following steps to play music:
  • Insert a SD card with music files (such as mp3) on FAT partition
  • Connect headset/headphone to your board
  • Launch the main menu
    • on the BBG3, use UP/DOWN/LEFT/RIGHT key to highlight the MENU icon at the right side of home screen, press ENTER (or F9)
  • Launch the Music application by selecting  the Music icon 

4.1.2 Video Play

       There are two ways to play video for dual display case.
       The one is to play video on the secondary display device only and UI is displayed on both display devices, which is called single video case.
       The other one is to play video on both display devices and UI is shown on the primary display only, which is called dual video case.
        Note that user need to decide which case he or she wants to use before system boots up. It cannot be changed at run time.
       To use single video case, edit init.freescale.rc to this:
       setprop ro.SIN_VIDEO_DUAL_UI 1
       setprop ro.DUAL_VIDEO_SIN_UI 0
       To use dual video case, edit init.freescale.rc to this:
       setprop ro.SIN_VIDEO_DUAL_UI 0
       setprop ro.DUAL_VIDEO_SIN_UI 1
       Use the following steps to play video:
  • Insert a SD card with video stream files (.3gp, .mp4) on FAT partition
  • Launch the main menu
  • Launch the Gallery application by selecting Gallery icon
  • During play, touching the screen will cause a semi-transient pop-up menu to be displayed. You can select backward/forward/pause/play.

 

4.1.3 Streaming Play

Use the following steps to stream from http:
  • Launch the main menu
  • Launch the Browser application by selecting the Browser icon
  • Open a webpage http link with a rtsp streaming link or a multimedia file http link embedded.
  • Click the rtsp streaming link or multimedia http link.
  • During play, touch the screen displays a semi-transient pop-up menu. You can select backward/forward/pause/play if the streaming server supports those features.

4.1.4 Camera & Camcorder

  1. Configure the sensor in Kernel
  • Enable the on Board sensors(ov3640, ov5640, ov5642, etc), the default sensor is configured toOV5642.
    • change the Board configure in file kernel_imx/arch/arm/mach-mx5/mx53_smd.c (or mx51_babbage.c, which depends on your board) in struct mxc_i2c0_board_info:
                    .type = "ov5642",
                Configure the type to the sensor type on the board.
    • Configure the corresponding sensor driver.
                   Device Drivers  --->
                  <*> Multimedia support  --->
                          [*]   Video capture adapters  --->
                                    MXC Camera/V4L2 PRP Features support  --->
                                          <*> Select Camera/TV Decoder (OmniVision ov5642 camera support)  --->
                                                  (X) OmniVision ov5642 camera support
  
  • Enable the UVC camera
Device Drivers  --->
                  <*> Multimedia support  --->
                          [*]   Video capture adapters  --->
                                  [*]   V4L USB devices  --->
                                          <*>   USB Video Class (UVC)

   2. Configure the Camera sensor in Android platform
Four props is added to configured the front camera and back camera, which can be set in init.freescale.rc or init.rc.

#Define the config for dual camera
    setprop back_camera_name ov
    setprop back_camera_orient 0
    setprop front_camera_name uvc
    setprop front_camera_orient 180

The camera name can just be set the key word of the sensor name since the Camera HAL will query and identify the whole sensor name.
The orientation indicates the rotation of the capture frame.
If only one camera is set, the system will only recognize one camera. At least one camera configure should be required.

  3. Still Image Capture
     Use the following steps to capture a still image:
  • Insert a fat32 formatted SD card into the board
  • Launch the Camera application by selecting the Camera icon
  • Click the button on the right of the preview window to choose the front camera or back camera.
  • Click the button on the right of the preview window to set the parameters for picture, now only support the configuration of the picture size.
  • Click the Shot icon on the preview screen
  • A still image is captured and saved as a JPEG file on the SD card
  • Go to Gallery application to see the captured picture
 
  4. Video capture
    Use the following steps to record video:
  • Insert a fat32 formatted SD card into the board
  • Connect a microphone to the board for imx51 babbage, and for imx53 smd there is a on board microphone.
  • Launch the Camera application, since the Camera and Camcorder are in one application
  • Switch to camecorder by the switch button on the left.
  • Click the button on the right of the preview window to choose the front camera or back camera.
  • Click the button on the left of the preview screen to configure the video recording, the default support the Following qualities:
    • High quality: H.264 & AMR-NB in MP4.
    • Low quality: H.263 & AMR-NB in 3GP.
  • Click the record icon, which changes to stop icon.
  • Show something before camera sensor and say something to the microphone
  • Click the stop icon.
  • Go to Gallery application to see the captured video
  • The Camcorder configure file is in device/fsl/proprietary/codec/conf/media_profiles.xml, in which the Camera id, recorded video properties can be configured.
        Be noted that:
  • For cameraId, 0 is mapped to the front camera if it is available.
  • For default, only one Camera for video recording is enabled. To add another camera, you can add anotherCamcorderProfiles item according to the first one.
  • For video size, it should be the set that the sensor supports.
  • For bitrate, for VGA recording, bitrate is recommended to be 1500000, for 720p recording, bitrate is recommended to be 60000000

4.1.5 Sound Recording

Use the following steps for sound recording:
  • Insert a formated SD card into the board
  • Connect microphone to the board
  • Choose Main Menu > Sound Recorder
  • Press the record button to start the recording
  • Speak into the microphone
  • Press the stop button to pause the recording
  • Press the play to listen what has been recorded
  • Select Use this recording. The application exits and a new file (.3gp with AMR-NB) is saved to the SD card
  • Choose the Main Menu > Music. If you can't see the new .3gp file, try below:
    • Choose the Main Menu > SD card & phone storage > Umount SD card
    • Remove the SD card and insert the SD card again
    • Choose the Main Menu > Music. You should be able to see the recorded sound file

4.2 Storage

4.2.1 USB Mass Storage

    After connecting USB cable to the board, please open the notification status bar, and click the "USB connected" bar.
    It shows a window with "Turn on USB Storage" button, click it.
    This causes vold to umount local storage and then export it to the PC
 
    With either of those methods, you should be able to access on-board storage (for example SD card) from the PC.

4.2.2 Multi-Storage Access

There are total three storages supported in i.MX51 BBG.i.MX51 BBG supports the following storages:
  • SD card inMMC/SD connector P1
  • SD card inMMC/SD connector P2
  • UDISK connected to the board through the USB port
They are mounted to /sdcard, /sdcard/extsd and /sdcard/udisk in Android rootfs.

Since the Android SDK only supports the export of /sdcard as external storage, the Android Application can only access one external storage. freescale extends the Android SDK to multi-storage access from Android Application. This extension can be summarized into two categories:
  • The SDK API Environment.getExternalStorageDirectory()/getExternalStorageState() returns the external stoage directory based on the Storages present on the Board. 
  • The APIs are added into the Android SDK API to support access the external storages as request:

Environment.getExternalSDStorageDirectory()
Environment.getExternalUDiskStorageDirectory()
Environment.getExternalExtSDStorageDirectory()
Environment.getExternalSDStorageState()
Environment.getExternalUDiskStorageState()
Environment.getExternalExtSDStorageState()

Environment.isExternalSDStorageRemovable()

Environment.isExternalExtSDStorageRemovable()

Environment.isExternalUDiskStorageRemovable()

 
Mountservice broadcasts a intent for each external storages state change. This intent had the URL file://sdcard, file://sdcard/udisk, or file://sdcard/extsd in extra data of this intent, to indicate which storage changed.Upon receiving those intent,Android Application should check the extra data of this intent, or count on the SDK APIEnvironment.getExternalStorageDirectory()/getExternalStorageState() or FSL extended storage API to fetch its interested external storage state and directory.
 
    In default, udisk is inserted in usb host port. if you want to use usb otg to insert udisk, please change the vold.fstab
    from
    #used for usb host
    dev_mount udisk /mnt/sdcard/udisk auto /devices/platform/fsl-ehci.1/usb 
    to
    #used for usb otg host
    dev_mount udisk /mnt/sdcard/udisk auto /devices/platform/fsl-ehci.0/usb
 
    note: In our design, only support one udisk. It means you can insert only ONE u disk, through usb host or usb otg.
 

4.3 Connection

4.3.1 Enable WiFi

Use the following steps to enable WiFi:
  • Choose Main Menu > Setting > Wireless control
  • Enable Wi-Fi
  • Enter the WiFi settings, it should automatically search all available APs and display them on screen
  • Select your WiFi AP, and click connect
  • Input password if required
  • To make sure you have a WiFI connection type 
    $ netcfg (you should see a wlan0 interface)
  • Use the browser to access the internet

4.3.2 Browse Internet using 3G Modem Connection

Use the following steps to browse the internet:
  • Make the 3G Modem ready for using.
  • Insert a SIM card into the SIM slot on 3G module or board
  • Wait for a few seconds, you should be able to use Dialer or Message to call others or send SMS
  • Setup APN for packet call:
    • Choose Main Menu > Wireless control > Mobile Networks > Access Point Names
    • Press the MENU key and select New APN
    • Name: ChinaMobile (any name you can choose), APN: cmnet (contact your operator), MCC/MNC:460/00 (country/network code for your operator)
    • Press the MENU key and select Save
    • reboot the board
  • After reboot, make sure you already connect to internet via 3G modem:
     $ netcfg (you should see a ppp interface)
     $ getprop net.dns1 (a meaningful IP address should be displayed)
  • Launch browser 

4.3.3 Enable the AR6102/AR6002 WIFI card

    Notes: the default enabled is AR6003; the AR6102 also can use the same module with AR6002

    if you want to support ar6102, please replace

        cp  /system/bin/wlan_tool_6102  /system/bin/wlan_tool

        chmod 777 /system/bin/wlan_tool

    it will insmod from /system/lib/modules/ar6102.ko

    the script 's source code is under : 

         android/system/wlan/atheros/AR6kSDK/host/tools/wlan_tool

    You can replace the wlan_tool_6102's contents to wlan_too, or change the Android.mk

    Notice: ar6102 don't support AP mode, so all AP mode related function will failed.


 

4.3.4 Enable Ethernet
 
         Use the following steps to enable Ethernet:
  • Make sure "ip=dhcp" is not in the boot command for not nfs boot
  • Choose Main Menu > Setting > Wireless control
  • Enable Ethernet
  • Use the browser to access the internet
4.3.5 About AR3001 Bluetooth BD address
    Notes: the default DB Address(MAC address of Bluetooth) is store in a file under:
        Source: android/external/linux-firmware-imx/firmware/ar3k/30101/ar3kbdaddr.pst
    And will install in your android image:
         /system/lib/firmware/ar3k/30101/ar3kbdaddr.pst
    If you are have more then 1 device with demo image, you should change the MAC address to make sure the MAC address will not conflict with others.
    You can change the MAC address by these commands under debug console:

mount -w -o remount -t ext4 /dev/block/mmcblk0p2 /system
echo 0060417f1234 > /system/lib/firmware/ar3k/30101/ar3kbdaddr.pst
mount -r -o remount -t ext4 /dev/block/mmcblk0p2 /system

This will be the new MAC address(BD addr) of BT chip, change 1234 to what you want to make sure the MAC address will not conflict with others.
If you are using same MAC address with others, and two machine enable BT in same time, unknown error will happens.

4.3.6 About Atheros GPS on MX53_SMD Board.
    
We have enable GPS device on MX53_SMD reference board, but for test, you must use an external antenna to test GPS.
    The GPS antenna inside of SMD board is not work.
    You can connect the external antenna to J123 on the Board(near the 3G mini-PCI-E slot).

4.4 Display

4.4.1 TVout (Video Only)

Use the following steps for video only TV out:
  • On the i.MX51 Babbage board,WVGA and TVOUT cannot both be enabled at the same time, and the output resolution of DVI should be limited to 800x600 for 720P TVout setting. The valid setting in UBOOT are as follows:
    • i.MX51 BBG: setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 gpu_nommu, gpu_memory=32M video=mxcdi0fb:RGB24,640x480M@60 video=mxcdi1fb:YUV444,TV-720P60tve'
  • Connect the board to TV using a composite video cable
  • In the serial console,  type the following:
    • echo D:720x480i-60 > /sys/class/graphics/fb1/mode
      you can change "D:720x480i-60" with below value:
       D:1920x1080p-24
       D:1920x1080p-25
       D:1920x1080p-30
       D:1920x1080i-50
       D:1920x1080i-60
       D:1280x720p-30
       D:1280x720p-60

               D:720x576i-50
               D:720x480i-60

    • echo 0 >/sys/class/graphics/fb1/blank
    • echo 1 >/sys/class/graphics/fb1/blank
    • setprop rw.VIDEO_TVOUT_DISPLAY 1

  • Choose Main Menu > Gallery, to start to play the video. Now the video should be displayed on the TV, but UI is kept on the LCD
  • Note that if TVout is the primary display, we don't support the secondary display. Especially, the secondary display might be a DVI monitor, which will defaultly be enabled when DVI cable is connected(EDID is read). So, add 'ddc=off' to kernel boot-up command line to disable reading EDID for this case. We can support a dumb LCD and a DVI monitor for dual display feature. Of course, if TVout is the secondary display, dual display can also be supported.

4.4.2 TVout (Video and UI)

Use the following steps for video and UI TV out:
  • On the i.MX51 Babbage board, WVGA and TVOUT can not both be enabled at the same time. Thedi1_primary boot parameter should be set to enable 720P setting for TVOUPT. The valid setting in UBOOT are as follows:
    • i.MX51 BBG: setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 di1_primary gpu_nommu, gpu_memory=32M video=mxcdi1fb:YUV444,TV-720P60 dmfc=3 tve'
  • Connect the board to TV using a composite video cable.
  • Boot up the board, you will see all UI on TV

4.4.3 Dual-Display

Two display outputs can be supported simultaneously in i.MX51 BBG3 board and i.MX53 TABLET board. 
In i.MX51 BBG, the primary display output is WVGA LCD, the second display output is DVI output. To enable this feature, there are two valid UBOOT settings needed as below, one for setting the secondary DVI output to 1024x768 resolution, and the other for setting the secondary DVI output to 1280*720 resolution. Caused by clock resource limitation, when using DVI monitor at HD video mode, we need to manually choose CLAA WVGA LCD panel to use internal clock by adding 'int_clk' to video mode.:
  • setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1024x768M@60 video=mxcdi1fb:RGB565,CLAA-WVGA,int_clk di1_primary gpu_nommu, gpu_memory=32M calibration'
  • setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1280x720M@60 video=mxcdi1fb:RGB565,CLAA-WVGA,int_clk di1_primary gpu_nommu, gpu_memory=32M calibration'
In i.MX53 TABLET, the primary display output is LVDS panel, and the other display output is HDMI output. To enable this feature, there is one valid UBOOT setting needed as below:
  • setenv bootargs_android 'setenv bootargs ${bootargs} ip=dhcp init=/init androidboot.console=ttymxc0 di1_primary gpu_nommu, gpu_memory=64M video=mxcdi0fb:RGB24,1024x768M@60 video=mxcdi1fb:RGB666,XGA ldb=di1 calibration'

Dual-Display feature can be enabled dynamically with below steps:
  • Connect i.MX51 BBG board with DVI panel or Connect i.MX53 TABLET board with HDMI TV. We enable ddc(edid reading and cable detection) by default in Android kernel. For MX51 BBG board, if ddc doesn't work for DVI connector, you probably need to rework DVI i2c to support this. As the final video mode to be used on DVI monitor is read from DVI monitor's EDID information, a closest video mode will be found in the video modes supported by monitor according to the video mode option in kernel boot-up command line, so it is possible for user to find that the final video mode on the monitor is different with that is specified in the command line. To force to use the video mode in kernel boot-up command line, the user can add 'ddc=off' to the command to disable reading EDID information.
  • Set the below property in Android's console:
setprop rw.SECOND_DISPLAY_CONNECTED 1

Also this feature can be disabled dynamically by setting the below properties in Android's console:
setprop rw.SECOND_DISPLAY_CONNECTED 0

Notes:
  • UI will be output to both the displays if the secondary is connected withi.MX51 BBG board or i.MX53 TABLET. The image in secondary display is resized from the image in the primary display.
  • Video will be output to the full screen size of the secondary display if the DVI panel is connected with i.MX51 BBG3 board or HDMI TV is connected with i.MX53 TABLET, unless it will output to the primary display.
  • The dynamical switch between mono display and dual display is supported by hot-plug the secondary display, which is not been enabled in this package. It will be enabled with a updated package later.
  • 'dmfc=3' in the kernel boot-up command line can be added if a single display's resolution and refresh rate is close to MX51 or MX53 display bandwidth, e.g., 1080P60 for MX53. Note that adding this option means that you are dropping dual display support feature.

4.4.4 24bpp pixel format support for UI

24bpp pixel format for UI and Display can be supported by the below valid UBOOT setting:
  • setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 gpu_nommu, gpu_memory=64M video=mxcdi0fb:RGB24,1024x768M@60,bpp=32'

4.5 Application & Development

4.5.1 Key Map

DELL USB Keyboard's key mapping (defined in /system/usr/keylayout/Dell_Dell_USB_Keyboard.kl):

KeyAct asESCBACKF1MENUF2SOFT_RIGHTF3CALLF4ENDCALLF5ENDCALLF8HOMEF9DPAD_CENTERUPDPAD_UPDOWNDPAD_DOWNBACKDELENTERENTER
BBG add-on peripheral board key mapping (defined in /system/usr/keylayout/mxckpd.kl):

POWERN/ACALLVOLUME_UP
DPAD_LEFT
MENU



DPAD_DOWNDPAD_CENTERDPAD_UPHOMECAMERAN/AENDCALLVOLUME_DOWN
DPAD_RIGHT
BACK
i.MX508 add-on board keyboard key mapping (defined in /system/usr/keylayout/mxckpd.kl):
KeyAct asPREV(SW2)BACKF1(SW5)MENUF9(SW15)ENTER9(SW24)DPAD_LEFT0(SW25)DPAD_RIGHTO(SW34)DPAD_UPP(SW35)DPAD_DOWNPOWER(SW70)POWERRESET(SW71)RESETNXT1(SW3)/NXT2(SW4)DPAD_CENTER
For imx53_EVK/imx50_PD, the "power key" on board support the suspend/resume operation.

MX53 TABLET Capacitive touch button key mapping:

KEY
Act as
SW30
MENU
SW31
HOME
SW32
BACK
SW29
POWER

MX53 TABLET On board key mapping:

KEY
Act as
SW11
VOLUME_UP
SW12
VOLUME_DOWN
SW5
POWER

4.5.2 Adjust Media Volume for Music and Video

Use the following menu to adjust the volume:
Main Menu > Settings > Sound > Volume

4.5.3 Adjust Brightness of LCD Backlight

Use the following menu to adjust the brightness (the i.mx51 BBG need hardware rework):
Main Menu > Settings > Display > Brightness

4.5.4 longer Screen Timeout

Use the following menu to disable the screen timeout:
Main Menu > Settings > Display > Screen timeout > 30 minutes

4.5.5 App to SD

Now, the App could be installed in the internal device or the external SD card. But not all applications support this feature.
  • adb install test.apk
  • on console: # pm setInstallLocation 2
  • Settings-->Applications-->Manage applications-->Downloaded
       click the application and selection "Move to SD card"
  • you will see the applications move to SD card from the ""On SD card"

4.5.6 Software Update and Wipe Partition using Recovery Mode

It is possible to format the /data and /cache partitions or update software based on a update script using recovery mode as follows:
  • Prepare for all android source code that assumed to be saved in ~/myandroid directory. 
  • Prepare for ADB over USB. make sure that ADB over USB is ok. USB cable is connected. Refer toADB over USB section for more information.
  • Connect the UART to the PC and open a terminal to check for printed messages
  • Enter the recovery by manual
       for imx51_BBG board:
       setenv bootargs_android_recovery 'setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4 di1_primary'
       setenv bootcmd_android_recovery 'run bootargs_android_recovery;mmc read 0 ${loadaddr} 0x800 0x2000;bootm'
       run bootcmd_android_recovery

       For imx53_SMD board:
       setenv bootargs_android_recovery 'setenv bootargs ${bootargs} init=/init root=/dev/mmcblk0p4 rootfs=ext4 video=mxcdi1fb:RGB666,XGA ldb=di1 di1_primary 
       setenv bootcmd_android_recovery 'run bootargs_android_recovery;mmc read 1 ${loadaddr} 0x800 0x2000;bootm'

       run bootcmd_android_recovery

  • When system had complete to bootup,  You will see this screen:


  • You can press "MENU" "HOME" or "F1"(by USB keyboard, for developer)" going to the text menulike this:
  • Select the required option using the direction keys on the keypad or keyboard.
    • Apply sdcard:update.zip, you may update the software from update.zip.
    • Wipe data/factory reset. /data and /cache partitions are formatted.
    • Wipe cache partition. /cache partition is formatted. 
        
  • Reboot the system. 

  • About system upgrade method:
        You upgrade mode can be change per your needs, which is written in your update-script, you should change the script, it's very fixable, here is the flow:   
    • copy file and dirs from package to devices(you can use this method upgrade a few of files/dirs.), below is rough step in script.
      • format the /system partition if needed (option)
      • mount /system partition
      • package_extract_dir command to extract system dir in updater.zip to /system/
      • change the permissions, since signapk will clean up permission of files, you need set the permission by your self, you can refer the update-script, but maybe you need add some permission if needed.
      • umount /system partition.
    • use fake_dd command in update-script to dd whole system.img from update.zip to device (New)
      • use fake_dd command to dd system.img file in your update.zip to your mmc block device.
      • (This is much less script needs to write)
  • About Kernel/uramdisk/U-boot upgrade:
        You can use this function to upgrade your kernel and u-boot, this also need change the update-script.
    • For Nand devices: you can use the write_raw_image() command upgrade your boot.img, like other android system.
    • For SD/eMMC devices: you need use fake_dd command to dd your image to your device(written in updater-script.), eg:
    •     
      ui_print("extract kernel image...");
      package_extract_file("files/uImage", "/tmp/uImage");
      # Write uImage to 1M position.
      ui_print("writting kernel image");
      simple_dd("/tmp/uImage", "/dev/block/mmcblk0", 1048576);

      ui_print("extract uramdisk image...");
      package_extract_file("files/uramdisk.img", "/tmp/uramdisk.img");
      # Write uImage to 1M position.
      ui_print("writting uramdisk image");
      simple_dd("/tmp/uramdisk", "/dev/block/mmcblk0", 6291456);
      show_progress(0.1, 5);

      For uboot upgrade for eMMC storage, since u-boot maybe stored in the "boot partition" of eMMC, you need do some sys file operation before dd, eg:

    •     
      # Write u-boot to 1K position.
      # u-boot binary should be a no padding uboot!
      # For eMMC(iNand) device, needs to unlock boot partition.
      ui_print("writting u-boot...");
      sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "1");
      package_extract_file("files/u-boot-no-padding.bin", "/tmp/u-boot-no-padding.bin");
      simple_dd("/tmp/u-boot-no-padding.bin", "/dev/block/mmcblk0", 1024);
      sysfs_file_write("class/mmc_host/mmc0/mmc0:0001/boot_config", "8");
      show_progress(0.1, 5);

           You can find the detail example in source code:  bootable\recovery\etc\META-INF\com\google\android\updater-script
           Please choose them per your needs.

  • About generate Update.zip.

        This section describe about how to generate a Update.zip package.

       First, you need prepare a dir like this, eg: ~/update-dir :


Directory / FileDescription~/update-dir/META-INF    
Copy from mydroid/bootable/recovery/etc/META-INF/
~/update-dir/META-INF/com/google/android/update-binary  
Copy from ~/mydroid/out/target/product/xxx/system/bin/updater, and rename to update-binary, note:this file only can be find here in eng build, can't find in user build.
~/update-dir/res/
empty dir, file will be generate by make_update_zip.sh script.
~/update-dir/files/ 
empty is fine, or put some files you want to update, (need add related operation in  updater-script)
 ~/update-dir/system/ 
empty is fine, or put some files you want to update.

     

       Second, you will find make_update_zip.sh in mydroid/bootable/recovery/ dir, you can use this script to generate update.zip

       it take two parameter, first is Meyour android source code path(eg. ~/mydroid) , the second is the your update package dir, like "~/update-dir" in this example.

        run script:

               $ make_update_zip.sh ~/mydroid ~/update-dir

        If success, you will see this message: 

            "Done"

            "Your update.zip is under XXX/update.zip"

        if meets any error: it will print some message like: 

            Error: Your package don't have this file:

                    META-INF/com/google/android/updater-script

        Just follow the Error message to correct your ~/update-dir.

4.5.8 3D Demo

   Android has an API demo application that includes a test function for OpenGL/ES. However by default it's not built. You can build it as follows:
   $ cd myandroid
   $ make ApiDemos

   The generated API demo application will be out/target/product/YOUR_PRODUCT/system/app/ApiDemos.apk. Copy it into your Android file system (/system/app/) and then reboot the board.

   Main menu > ApiDemo > Graphic > OpenGLES > ...

 
  
  Note: 
  • The image distortion in the 3D screen shown above is caused by screen capture.
  • To disable hardware 2D for UI frameworks (surfaceflinger), use this command:

  $ setprop debug.sf.enable_hgl 0

  • To disable hardware 2D/3D (use Android software 2D/3D implementation), use this command:

  $ setprop debug.egl.hw 0

  • To show FPS(frame per second) in LOGCAT, use this command:

  $ setprop debug.sf.showfps 1

5. FAQ

5.1Why did the code fail to download from android.git.linaro.org?

        Perhaps because you are behind the firewall. If you have http proxy and your firewall support socks, then take the following steps:
 
   * Install Dante - a socks client   
    $ sudo apt-get install dante-client
    * Configure Dante by adding below lines into /etc/dante.conf      
    route {        
        from: 0.0.0.0/0 to: .  via: DNS_OR_IP_OF_YOUR_SOCKS_SERVER port = PORT_OF_YOUR_SOCKS_SERVER        
        proxyprotocol: socks_v5      
              }       resolveprotocol: fake  
    * Set environment variable for http proxy and socks  
    $ export http_proxy=...   
    $ export SOCKS_USER=...   
    $ export SOCKS_PASSWD=...  
    * Download Android code from linaro   
    $ cd myandroid/external
    $ socksify git clone git://android.git.linaro.org/platform/external/alsa-lib.git
    $ socksify git clone git://android.git.linaro.org/platform/external/alsa-utils.git
    $ socksify git clone git://android.git.linaro.org/platform/external/mtd-utils.git
    $ cd myandroid/hardware
    $ socksify git clone git://android.git.linaro.org/platform/hardware/alsa_sound.git

    $ cd myandroid
    $ socksify git clonegit://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitkernel_imx    
    $ cd kernel_imx
    $ git checkout v2.6.35.3

    $ cd myandroid/bootable/bootloader
    $ socksify git clone git://git.denx.de/u-boot.git uboot-imx 


5.2 Why I can't access the internet with browser using ethernet?

        It always reports "Web page not available" even if I have directly internet access (not behind a proxy/firewall. Note: Android browser seems not support proxy setup)?

DNS setup. For ethernet, the Android does not setup DNS automatically. So DNS must be manually setup. This is not an issue for WiFi since dhcpcd is explicitly called after WiFi access is available.

How to solve/workaround this issue:
In console, input setprop net.dns1 IP_OF_YOUR_PRIMARY_DNS_SERVER. Ping any host with DNS name. If successful, you should be able to use Browser to access any web site now.

5.3 Can I access Android shell using ethernet instead of a serial port?

        Yes. On the Linux PC (assume you had built Android code or install Android SDK), complete the following actions:
    $ ping IP_OF_YOUR_BOARD (run "netcfg" on board to get IP address)
    $ export ADBHOST=IP_OF_YOUR_BOARD
    "adb" is a host tool created during Android build.It's under out/host/linux-x86/bin/. Make sure you set path properly.
    $ adb kill-server (not sure why need this step. Just re-start adb daemon on board)
    $ adb shell
    # NOW YOU ARE IN ANDROID SHELL ON BOARD

5.4 How do I change Android boot logo?

        If there is a file called initlogo.rle under the root folder, Android displays it while booting. Complete following steps to create a rle compressed picture from a png file.

             1. Find an image you like
             2. Edit it with your favorite editing suite and scale it to 480x640
             3. After scaling it, convert the colorspace to 256 colors (8-bit)
             4. Save it as a PNG without alpha channel/transparency.
             5. Use the convert tool from the ImageMagick toolkit: convert -depth 8 splash.png rgb:splash.raw
             6. Compile the Android tool in mydroid/build/tools/rgb2565(gcc -O2 -Wall -Wno-unused-parameter -o rgb2565 to565.c)
             7. Run the conversion command: rgb2565 < splash.raw > splash.raw565
             8. Copy splash.raw565 to mydroid/out/target/product/imx51_BBG/root/initlogo.rle. make it to zImage ramdisk for nand boot

5.5 How to use wake_lock to control specific devices?

        If an application hold a wake_lock, the system will not enter suspend mode. Except turn off LCD, you may want to do more things to control device during the time of holding a wake_lock. For instance, if mp3 player holds the wake_lock called “audioplay”, device drivers can also call register_lock_handle() with the same lock name as parameter, to register one or more device handles dealing with power related operation during early suspend.This is an extension to refine devices control during early suspend.

5.6 How to enable Android running on SSD for MX53 TABLET?
MX53 TABLET board supports boot from SSD which connected to SATA interface, and we can run android system on it. The benefits to run from SSD device is that it has fast access speed, which is 10x faster than SD/MMC. Here give a brief guide of how to enable android boot from SSD device based on R10.3 release.
  • Code changes
    • In device/fsl/imx5x/init.rc, change the mmcblk0px strings below the "on fs" lines to sdax.
  • Rebuild the ramdisk.img
  • Prepare the SSD with images ready
    • Using MFG tool
      • MFG tool supports TABLET SSD profile to format the SSD device, and flash all the images into it.
    • Using fastboot
      • Power up the board, and press any key to get into uboot shell
      • Set the sata as default fastboot device:
U-Boot > setenv fastboot_dev sata
      • Run the fastboot mode:
        U-Boot > fastboot
      • Download image on host side:
      •  
            U-Boot> fastboot flash bootloader images\u-boot-no-padding.bin
            U-Boot> fastboot flash kernel images\uImage
            U-Bootfastboot flash uramdisk images\uramdisk.img
            U-Bootfastboot flash system images\system.img
            U-Bootfastboot flash recovery images\recovery.img
            U-Bootfastboot reboot

         
    • Using dd utility
      • Export SSD block device to the Linux host
        • Use SATA device USB reader to connect SSD to PC
        • Or boot the TABLET board with linux, and export the /dev/block/sda device by UMS: echo "dev/block/sda" into /sys/devices/platform/usb_mass_storage/lun0/file
      • Create partitions
        • Use fdisk to do partition, the same layout as SD/MMC card. And format the /data, /cache partition.
      • Write images
        • Use dd to download uboot/uImage/uramdisk and system.img, same as what been done on SD/MMC card.
  • Board boot Dip switch
    • SW26, 4/6 on, others off. SW28 all off.
  • Bootup the board with SSD connected.

5.7 Why UMS(USB Mass Storage) write Speed downgrade in 2.6.35 kernel when using Windows as Host?

We have been asked why UMS's write speed, eg, copy video from PC to mx5x devices after upgrade kernel version from 2.6.31 to 2.6.35 on WinXP, we have inspect this issue.
It's really not a issue.
It's because of Windows's default U-disk policy is "Optimize for quick remove", this means it will sync every write command to device to ensure in case user unplug the u-disk to avoid damage the U-disk's file system. The sync write operation will cause device side sync it's write operation to SD/eMMC card.
However, Windows also have a policy named "Optmize for performance", it's will faster than previous policy when write. It let device side use memory as cache the write data, it will archive higher write speed, but it will not safe if user un-plug the SD card accidentally.
About how to change the Host(Windows) side policy, please reference this link: http://www.ehow.com/how_4698350_flash-drive-quick-safe-removal.html
However, If you are using a eMMC or other internal storage, You may want to remove this protection, you can edit :kernel_imx/drivers/usb/gadget/f_mass_storage.c
remove this line:
 f_mass_storage.c: 890
    curlun->filp->f_flags |= O_SYNC;
to disable sync write to storage.

5.8 How to workaround the video quality issue on MX53 TO2.0 silicon

MX53 TO2.0 silicon has issue that causes video quality poor with yellow blocks on the screen when playback some Videos.And we have a Software Workaround which is little dangerous to the silicon. This workaround increases the VPU voltage by increasing the VCC to 1.35V. We did not include this workaround code in the release, and suggest that you wait for TO2.1. Because It will shorten your silicon's life cycle, so please pay attention to this before you decided to do so:
  • Increase VCC to 1.35V. Type command into uboot console:
    • U-Boot> i2c mw 0x48 0x2f 0x62
    • U-Boot> i2c mw 0x48 0x3c 0x62
  • Reduce peripheral clocks:
    • U-Boot > clk periph 380
  • To monitor the impact of chip temperature to this issue, you can check temperature via SATA temperature sensor:
    • $ cat /sys/devices/platform/ahci.0/temperature
                SATA AHCI current temperature:59


5.9 How to setup PC (Windows) to support ADB/RNDIS


Before this release, we used HTC's vendor id and product id for all the android gadget functions. It's bad case, so we changed the default android USB gadget functions's VendorID to freescale's 0x15a2, and ProductID to fake ones(after acquiring the offical product id, we will replace them). Due to this change, we must update the PC's USB driver and ADB configuration to enable the android gadget functions:

For Windows PC:

  • ADB function
    • Download the Android SDK.
    • Update the adb configuration to scan for freescale's pid:
      • Run the SDK's tools to generate a configure file:
android-sdk-windows\tools\android.bat update adb
      • Modify the files:
X:\Profile\<your account>\.android\adb_usb.ini, to add freescale vendor id:
      • # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
        # USE 'android update adb' TO GENERATE.
        # 1 USB VENDOR ID PER LINE.
        0x15a2

    • Unpack the freescale Android USB win driver in the release package tool\android_usb_fsl.zip.
    • Connect the Android Device into PC, uninstall your old driver named "Android Phone" in the device manager, then reinstall driver by scanning .inf file under the directory you unpack the android_usb_fsl.zip.
    • Restart the adb server
      • adb kill-server
      • adb start-server

  • RNDIS function (USB Tethering)
    • Connect your device to PC
    • Enable USB tethering in the Android UI
      • Settings-> Wireless settings -> Tethering -> USB Tethering
    • Install the PC driver by scanning the freescale Android USB driver .inf file in the adb driver directory mentioned above.
    • If the Android RNDIS Network driver is ready, you can start to use tether by 3G or WIFI.

For Linux PC:

  • ADB function
    • Download the Android SDK.
    • Update the adb configuration to scan for freescale's pid:
      • Run the SDK's tools to generate a configure file:
android-sdk-linux_86/tools/android update adb
      • Modify the files:~/.android/adb_usb.ini, to add freescale vendor id:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x15a2

    • Create a new udev rule file under the PC's /etc/udev/rules.d/ named: imx-android.rules. And fill in the following line into the file:
SUBSYSTEM=="usb", SYSFS{idVendor}=="15a2", MODE="0666"

    • Change the new udev rule file's permission:
chmod a+r /etc/udev/rules.d/imx-android.rules
    • Connect the Android Device
    • Restart the adb server
      • adb kill-server
      • adb start-server



5.10 How to enable XEC feature

In this release, we introduced a new power management feature called eXreme Energy Conservation (XEC). Freescale's XEC is a auto LCD brightness adjuster based on the current display content. It supports to do the LCD brightness adjustment for full screen video playback case and help to reduce the power consumption during such case. If you want to try it, please launch the Settings application, and pop up the dialog by: Settings -> Display -> XEC DLS Control.
  • To select [Xec Enabled with Log on Screen] you can enable XEC, and see the current XEC's power result status on the screen.
  • To select [Xec Enabled without Log] you can enable XEC without log.
  • To select [Xec Disabled] you can disable XEC feature.

We also enable the auto brightness adjustment based on the Ambient light sensor. It's a default function of android, and be supported after Ambient light sensor driver/hal ready.
If you want to try it, please launch the Settings application, and select the auto adjustment checkbox in the brightness option.

NOTE: when you enabled the XEC, please turn off the Ambient light sensor based auto brightness adjustment. Otherwise, they will have conflict to adjust the brightness at the same time.

5.11 How to Change MFGTools partition script for SD/eMMC:

In MFGTool, It will use a script to Partition your SD/eMMC storage, you can find the script under "Profiles\MX5X Linux Update\OS Firmware\mksdcard-android.sh.tar",

the default partition is

    BOOT_ROM_SIZE=10 -- for uBoot, Kernel, Ramdisk
    SYSTEM_ROM_SIZE=150  -- for /system
    DATA_SIZE=100                -- for /data/
    CACHE_SIZE=100              -- for /cache
    RECOVERY_ROM_SIZE=20   -- for recovery partition.
The other size will be VFAT's (for multimedia), you can change them if you need to change the partition size.
After change the mksdcard-android.sh in inside tar package, you need use
tar cf mksdcard-android.sh.tar mksdcard-android.sh
to generate this package.

Make sure you edit this file under Linux, if you edit it under Windows, it will cause partition failed.

Since UBIFS/NAND use a different partition method, so this guide only for SD/eMMC users.



0 0