2014年11月2日星期日

imx6 user guide

Freescale Semiconductor
Document Number: AUG
Rev kk4.4.2_1.0.0-ga, 07/2014
Android User's Guide
Contents
1 Overview 1 Overview....................................................................1
This document explains how to use the Android release
package. 2 Preparation................................ ................................ 1
3 Building Android for i.MX................ ....................... 5
It describes how to set up the environment, how to apply i.MX
Android patches, and how to build the Android system. It also
describes how to download prebuilt images to a target storage
device and set up the correct hardware/software boot
configurations to boot the system. In addition, it provides the
information on how to get Android source from Google, and
what the device storage usage and boot options are. For more
information, see source.android.com/source/building.html. 4 Downloading Images..................... ......................... 12
5 Booting................................ ................................... 16
2 Preparation
2.1 Setting up your computer
To build the Android source files, you will need to use a Linux
computer.
You also need to use the 10.10 or 11.04 64 bit version of
Ubuntu which are the most tested OS for the Android kk4.4.2
build.
© 2014 Freescale Semiconductor, Inc.Preparation
After installing the Linux computer, you need to check whether you have all the necessary packages installed for an Android
build. See "Setting up your machine" on the Android website source.android.com/source/initializing.html.
In addition to the packages requested on the Android website, the following packages are also needed:
$
$
$
$
$
$
$
sudo
sudo
sudo
sudo
sudo
sudo
sudo
apt-get install uuid uuid-dev
apt-get install zlib1g-dev liblz-dev
apt-get install liblzo2-2 liblzo2-dev
add-apt-repository ppa:git-core/ppa
apt-get update
apt-get install git-core curl
apt-get install uboot-mkimage
NOTE
If you have trouble in installing the Sun's JDK in Ubuntu, refer to
2.2 Unpacking Android release package
After you have set up a Linux computer, unpack the Android release package.
After you have setup a Linux computer, unpack the Android release package by using the following commands:
# cd /opt (or any other directory where you placed the android_kk4.4.2_1.0.0-
ga_core_source.tar.gz file)
$ tar xzvf android_kk4.4.2_1.0.0-ga_source.tar.gz
$ cd android_kk4.4.2_1.0.0-ga_core_source/code/
$ tar xzvf kk4.4.2_1.0.0-ga.tar.gz
2.3 Running Android with a prebuilt image
To test Android before building any code, use the prebuilt images from the following packages and go to "Download Images"
and "Boot".
Table 1. Image packages
Image package
Description
android_kk4.4.2_1.0.0-ga_core_image_6qsabresd.tar.gz The table below shows the prebuilt image for i.MX 6Dual/
6Quad SABRE-SD board and platform and i.MX 6Solo/
6DualLite SABRE-SD platform, which has basic Android
features.
android_kk4.4.2_1.0.0-ga_core_image_6qsabreauto.tar.gz The table below shows the prebuilt image for i.MX 6Dual/
6Quad and i.MX 6Solo/6DualLite SABRE-AI platform, which
has basic Android features.
android_kk4.4.2_1.0.0-ga_core_image_6slevk.tar.gz The table below shows the prebuilt image for the i.MX
6SoloLite EVK board, which has basic Android features.
android_kk4.4.2_1.0.0-ga_full_image_6qsabresd.tar.gz The table below shows the prebuilt image for i.MX 6Dual/
Quad and i.MX 6DualLite SABRE-SD board, which includes
Freescale extended features.
For more information and details about the Freescale
Extended Multimedia Feature Package available for this
release, refer to the Android Release Notes.
Table continues on the next page...
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
2
Freescale Semiconductor, Inc.Preparation
Table 1. Image packages (continued)
android_kk4.4.2_1.0.0-ga_full_image_6qsabreauto.tar.gz
The table below shows the prebuilt image for i.MX 6Dual/
Quad and i.MX 6DualLite/Solo SabreAI board, which includes
Freescale extended features.
For more information and details about the Freescale
Extended Multimedia Feature Package available for this
release, refer to the Android Release Notes.
The following tables list the detailed contents of android_kk4.4.2_1.0.0-ga_core_image_6qsabresd.tar.gz and
android_kk4.4.2_1.0.0-ga_full_image_6qsabresd.tar.gz image packages.
The table below shows the prebuilt images to support the system boot from eMMC on i.MX 6Dual/6Quad SABRE-SD board
and platform and i.MX 6Solo/6DualLite SABRE-SD platform.
Table 2. Images for SABRE-SD board and platform eMMC boot
SABRE-SD eMMC image
Description
u-boot-6q.bin The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
SD board and platform
u-boot-6dl.bin The bootloader (with padding) for i.MX 6Solo/6DualLite
SABRE-SD platform
eMMC/boot.img Boot Image for eMMC
eMMC/system.img System Boot Image
eMMC/recovery.img Recovery Image
The table below shows the prebuilt images to support the system boot from SD on i.MX 6Dual/6Quad and i.MX 6Solo/
6DualLite SABRE-SD boards.
Table 3. Images for SABRE-SD SD
SABRE-SD SD image
Description
u-boot-6q.bin The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
SD board and platform
u-boot-6dl.bin The bootloader (with padding) for i.MX 6Solo/6DualLite
SABRE-SD platform
SD/boot.img Boot Image for SD
SD/system.img System Boot Image
SD/recovery.img Recovery Image
The table below shows the prebuilt images to support the system boot from TFTP server and NFS rootfs on i.MX 6Dual/
6Quad and i.MX 6Solo/6DualLite SABRE-SD boards.
Table 4. Images for SABRE-SD TFTP and NFS
SABRE-SD TFTP/NFS image
u-boot-6q.bin
Description
The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
SD board and platform
Table continues on the next page...
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
3Preparation
Table 4. Images for SABRE-SD TFTP and NFS (continued)
u-boot-6dl.bin The bootloader (with padding) for i.MX 6Solo/6DualLite
SABRE-SD platform
NFS/android_fs.tar.gz NFS rootfs
NFS/uImage Kernel image for TFTP
The following tables list the detailed contents of android_kk4.4.2_1.0.0-ga_core_image_6qsabreauto.tar.gz and
android_kk4.4.2_1.0.0-ga_full_image_6qsabreauto.tar.gz image packages:
The table below shows the prebuilt images to support the system boot from SD on i.MX 6Dual/6Quad and i.MX 6Solo/
6DualLite SABRE-AI boards.
Table 5. Images for SABRE-AI SD boot
SABRE-AI SD image
Description
u-boot-mx6q.bin The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
AI SD boot
u-boot-mx6dl.bin The bootloader (with padding) for i.MX 6DualLite SABRE-AI
SD boot
u-boot-mx6solo.bin The bootloader (with padding) for i.MX 6Solo SABRE-AI SD
boot
SD/boot.img Boot Image for SD
SD/system.img System Boot Image
SD/recovery.img Recovery Image
The table below shows the prebuilt images to support the system boot from NAND on i.MX 6 series SABRE-AI boards.
Table 6. Images for SABRE-AI NAND boot
SABRE-AI NAND image
Description
u-boot-mx6q-nand.bin The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
AI NAND boot
u-boot-mx6dl-nand.bin The bootloader (with padding) for i.MX 6DualLite SABRE-AI
NAND boot
u-boot-mx6solo-nand.bin The bootloader (with padding) for i.MX 6Solo SABRE-AI
NAND boot
NAND/boot.img Boot Image for NAND
NAND/android_root.img System Boot Image
NAND/recovery.img Recovery Image
The table below shows the prebuilt images to support the system boot from TFTP server and NFS rootfs on i.MX 6 series
SABRE-AI boards.
Table 7. Images for SABRE-AI TFTP and NFS
SABRE-AI TFTP/NFS image
Description
Table continues on the next page...
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
4
Freescale Semiconductor, Inc.Building Android for i.MX
Table 7. Images for SABRE-AI TFTP and NFS (continued)
u-boot-mx6q.bin The bootloader (with padding) for i.MX 6Dual/6Quad SABRE-
AI SD boot
u-boot-mx6dl.bin The bootloader (with padding) for i.MX 6DualLite SABRE-AI
boot
u-boot-mx6solo.bin The bootloader (with padding) for i.MX 6Solo SABRE-AI SD
boot
NFS/android_fs.tar.gz NFS rootfs
NFS/uImage Kernel image for TFTP
The following tables list the detailed contents of android_kk4.4.2_1.0.0-ga_core_image_6slevk.tar.gz image package.
The table below shows the prebuilt images to support the system boot from SD on i.MX 6SoloLite EVK boards.
Table 8. Images for EVK SD
EVK SD image Description
u-boot-mx6sl.bin Bootloader (with padding) for the i.MX 6SoloLite EVK board
SD/boot.img Boot image for SD
SD/system.img System boot image
SD/recovery.img Recovery image
The table below shows the prebuilt images to support the system boot from TFTP server and NFS rootfs on i.MX 6SoloLite
EVK boards.
Table 9. Images for EVK TFTP and NFS
EVK TFTP/NFS images Description
u-boot-mx6sl.bin Bootloader (with padding) for the i.MX 6SoloLite EVK board
NFS/android_fs.tar.gz NFS rootfs
NFS/uImage Kernel image for TFTP
NOTE
boot.img is an Android image that stores zImage and ramdisk together. It also stores
other information such as the kernel boot command line, machine name, e.g. This
information can be configured in corresponding board's BoardConfig.mk. If you use
boot.img, you do not need uImage and uramdisk.img.
3 Building Android for i.MX
3.1 Getting Android source code (Android/kernel/U-Boot)
The Android source code is maintained as more than 100 gits in the Android repository (android.googlesource.com).
To get the Android source code from Google repo, follow the steps below:
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
5Building Android for i.MX
$ cd ~
$ mkdir myandroid
$ mkdir bin
$ cd myandroid
$ chmod a+x ~/bin/repo
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r1
$ ~/bin/repo sync # this command loads most needed repos. Therefore, it can take several
hours to load.
Get kk4.4.2_1.0.0-ga kernel source code from Freescale open source git:
$ cd myandroid
$ git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx # the kernel repo is
heavy. Therefore, this process can take a while.
$ cd kernel_imx
$ git checkout kk4.4.2_1.0.0-ga
NOTE
If you are behind a proxy, use socksify to set socks proxy for git protocol.
If you use U-Boot as your bootloader, then you can clone the U-Boot git repository from Freescale open source git:
$
$
$
$
cd myandroid/bootable/bootloader
git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx
cd uboot-imx
git checkout kk4.4.2_1.0.0-ga
3.2 Patch code for i.MX
The patch script (and_patch.sh) requires some basic utilities like awk/sed.
Apply all the i.MX Android patches by performing the following steps:
1. Assume you have unzipped the i.MX Android release package to /opt/android_kk4.4.2_1.0.0-ga_source .
$ cd ~/myandroid
$ source /opt/android_kk4.4.2_1.0.0-ga_core_source/code/kk4.4.2_1.0.0-ga/and_patch.sh
$ help
2. You should see that the "c_patch" function is available.
$ c_patch /opt/android_kk4.4.2_1.0.0-ga_core_source/code/kk4.4.2_1.0.0-ga
imx_kk4.4.2_1.0.0-ga
Here, "/opt/android_kk4.4.2_1.0.0-ga_source/code/kk4.4.2_1.0.0-ga" is the location of the patches, which is the
directory created when you unzip the release package.
"imx_kk4.4.2_1.0.0-ga" 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 instead of "imx_kk4.4.2_1.0.0-ga".
3. If everything is OK, "c_patch" will generate the following output to indicate the successful patch:
**************************************************************
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
6
Freescale Semiconductor, Inc.Building Android for i.MX
Success: Now you can build the Android code for FSL i.MX platform
**************************************************************
NOTE
The patch script (and_patch.sh) requires some basic utilities like awk/sed . If they are not
available on your Linux computer, install them first.
3.3 Building Android images
After applying all i.MX patches, build the U-Boot, kernel, and Android image.
After applying all i.MX patches, build the U-Boot, kernel, and Android images by using the steps below:
$ cd ~/myandroid
$ source build/envsetup.sh
$ lunch sabresd_6dq-user
$ make 2>&1 | tee build_sabresd_6dq_android.log
"sabresd_6dq" is the product name (see ~/myandroid/device/fsl/product)
After build, check build_*_android.log to make sure no build error.
#Build Android images for i.MX 6 SABRE-SD boards
$ lunch sabresd_6dq-user
$ make 2>&1 | tee build_sabresd_6dq_android.log
#Build Android images for i.MX 6 SABRE-AI boards
$ lunch sabreauto_6dq-user
$ make 2>&1 | tee build_sabreauto_6dq_android.log
#Build Android images for i.MX 6SoloLite EVK boards
$ lunch evk_6sl-user
$ make 2>&1 | tee build_evk_6sl_android.log
For BUILD_ID & BUILD_NUMBER, add a buildspec.mk in your ~/myandroid directory. For details, see the Android
Frequently Asked Questions document.
For i.MX 6Dual/6Quad SABRE-SD and i.MX 6DualLite SABRE-SD boards, we use the same build configuration. The two
boards share the same kernel/system/recovery images with the exception of the U-Boot image. The following outputs are
generated by default in myandroid/out/target/product/sabresd_6dq:
root/ is a root file system (including init, init.rc, etc). Mounted at /
system/ is an Android system binary/libraries. Mounted at /system.
data/ is an Android data area. Mounted at /data.
recovery/ is a root file system when booting in "recovery" mode. Not used directly.
boot.img is a composite image which includes the kernel zImage, ramdisk, and boot parameters.
ramdisk.img is a ramdisk image generated from "root/". Not used directly.
system.img is an EXT4 image generated from "system/". It can be programmed to "SYSTEM" partition on SD/eMMC
card with "dd".
• recovery.img is an EXT4 image generated from "recovery/". It can be programmed to "RECOVERY" partition on SD/
eMMC card with "dd".
• u-boot-6q.bin is an U-Boot image with padding for i.MX 6Dual/6Quad SABRE-SD.
• u-boot-6dl.bin is an U-Boot image with padding for i.MX 6DualLite SABRE-SD.
NOTE
Make sure the mkimage is a valid command in your build machine. If not, use the
command below to have it installed:
$sudo apt-get install uboot-mkimage
• To build the U-Boot image separately, see Building U-Boot images.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
7Building Android for i.MX
• To build the kernel uImage separately, see Building kernel image.
• To build boot.img, see Building boot.img.
3.3.1 User build mode
For a production release, the Android image should be built in the user mode.
When compared to eng mode, it will have the following differences:
• It will have limited access due to security reasons, and it will lack certain debug tools.
• It will install modules tagged with user, and APKs& tools according to product definition files, which are in
PRODUCT_PACKAGES in device/fsl/imx6/imx6.mk.
If you need to add your customized package, add the package MODULE_NAME or PACKAGE_NAME to this list.
• Set ro.secure=1, and ro.debuggable=0. adb is disabled by default.
# Build images for i.MX 6 SABRE-SD board
$ make PRODUCT-sabresd_6dq-user 2>&1 | tee build_sabresd_6dq_android.log
# Build Images for i.MX 6 SABRE-AI board
$ make PRODUCT-sabreauto_6q-user 2>&1 | tee build_sabreauto_6dq_android.log
# Build Images for i.MX SoloLite EVK board
$ make PRODUCTevk_6sluser 2>&1 | tee build_evk_6sl_android.log
Or you can use the following commands:
#
$
$
$
$ Build images for i.MX 6 SABRE-SD board
source build/envsetup.sh
lunch sabresd_6dq-user
make
make dist # you can generate ota package with this command.
#
$
$
$
$ Build images for i.MX 6 SABRE-AI board
source build/envsetup.sh
lunch sabreauto_6q-user
make
make dist # you can generate ota package with this command.
#
$
$
$
$ Build images for i.MX 6SoloLite EVK board
source build/envsetup.sh
lunch evk_6sluser
make
make dist # you can generate ota package with this command.
For more Android building information, see source.android.com/source/building.html.
3.3.2 Building Android images for the SD card on the SABRE-SD
board
The default configuration in the source code package takes internal eMMC as the boot storage for i.MX 6Dual/6Quad and
i.MX 6Solo/6DualLite SABRE-SD boards.
The default setting can be changed to make the SD card in SD Slot 3 be the boot storage as shown below:
1. Change the fstab.freescale configure files in device/fsl.git by the following patch, which make sure partitions are
mounted for SD:
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
8
Freescale Semiconductor, Inc.Building Android for i.MX
diff git a/sabresd_6dq/fstab.freescale b/sabresd_6dq/fstab.freescale
index c2b737a..d2e59a3 100644
--- a/sabresd_6dq/fstab.freescale
+++ b/sabresd_6dq/fstab.freescale
@@ 3,12 +3,12 @@
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
-/devices/platform/sdhciesdhcimx.2/mmc_host/mmc1 /mnt/media_rw/extsd vfat defaults
voldmanaged=extsd:auto
+/devices/platform/sdhciesdhcimx.1/mmc_host/mmc2 /mnt/media_rw/extsd vfat defaults
voldmanaged=extsd:auto
/devices/platform/fslehci/mnt/udisk vfat defaults voldmanaged=sdcard:auto
-/dev/block/mmcblk0p5
/system
ext4
ro
wait
-/dev/block/mmcblk0p4
/data
ext4
nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=pa
nic
wait,encryptable=footer
-/dev/block/mmcblk0p6
/cache
ext4
nosuid,nodev,nomblk_io_submit
wait
-/dev/block/mmcblk0p7 /device
ext4
ro,nosuid,nodev
wait
-/dev/block/mmcblk0p1 /boot
emmc
defaults
defaults
-/dev/block/mmcblk0p2 /recovery
emmc
defaults
defaults
-/dev/block/mmcblk0p8 /misc
emmc
defaults
defaults
+/dev/block/mmcblk1p5 /system
ext4
ro
wait
+/dev/block/mmcblk1p4 /data
ext4
nosuid,nodev,nodiratime,noatime,nomblk_io_submit,noauto_da_alloc,errors=pa
nic
wait,encryptable=footer
+/dev/block/mmcblk1p6 /cache
ext4
nosuid,nodev,nomblk_io_submit
wait
+/dev/block/mmcblk1p7 /device
ext4
ro,nosuid,nodev
wait
+/dev/block/mmcblk1p1 /boot
emmc
defaults
defaults
+/dev/block/mmcblk1p2 /recovery emmc defaults
defaults
+/dev/block/mmcblk1p8 /misc
emmc
defaults
defaults
2. Follow the 3.3.1 to build the images.
3.3.3 Building Android images for NAND on the SABRE-AI board
The default configuration in the source code package takes SD card as the boot storage for i.MX 6 series SABRE-AI boards.
The default setting can be changed to make the NAND Flash in U19 be the boot storage as shown below:
make PRODUCT-sabreauto_6q-user BUILD_TARGET_FS=ubifs
NOTE
Make sure the uuid-dev is installed in your build machine (/usr/lib/x86_64-linux-gnu/
uuid.so). If not, please follow the command below to have it installed:
$sudo apt-get install uuid-dev
$sudo apt-get install liblzo2-dev
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
9Building Android for i.MX
3.4 Building U-Boot images
After you set up U-Boot using the steps outlined above, you can find the tool (mkimage) under tools/.
$ cd ~/myandroid/bootable/bootloader/uboot-imx
$ export ARCH=arm
$ export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
For i.MX 6Quad SABRE-SD:
$ make mx6q_sabresd_android_config
$ make
For i.MX 6DualLite SABRE-SD:
$ make mx6dl_sabresd_android_config
$ make
Command to build for i.MX 6Quad/DualLite/Solo SABRE-AI board is:
$ make distclean
For i.MX 6Quad SABRE-AI SD:
$ make mx6q_sabreauto_android_config
$ make
For i.MX 6Quad SABRE-AI NAND:
$ make mx6q_sabreauto_nand_android_config
$ make
For i.MX 6DualLite SABRE-AI SD:
$ make mx6dl_sabreauto_android_config
$ make
For i.MX 6DualLite SABRE-AI NAND:
$ make mx6dl_sabreauto_nand_android_config
$ make
For i.MX 6Solo SABRE-AI SD:
$ make mx6solo_sabreauto_android_config
$ make
For i.MX 6SoloLite EVK SD:
$ make mx6sl_evk_android_config
$ make
"u-boot.bin" is generated if you have a successful build. The above u-boot.bin has 1KB padding at the head of the file, for
example: first executable instruction is at the offset 1KB. If you want to generate a no-padding image, you need to implement
the dd command specified below in host.
$ sudo dd if=./u-boot.bin of=./u-boot-no-padding.bin bs=1024 skip=1; sync
Usually the no-padding U-Boot image is used in the SD card, for example, program the no-padding U-Boot image into 1KB
offset of SD card so that you do not overwrite the MBR (including partition table) within first 512B on the SD card.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
10
Freescale Semiconductor, Inc.Building Android for i.MX
NOTE
Any image that should be loaded by U-Boot must have an unique image head. For
example, data must be added at the head of the loaded image to tell U-Boot about the
image (i.e., it's a kernel, or ramfs, etc) and how to load the image (i.e., load/execute
address). Before you can load any image into RAM by U-Boot, you need a tool to add
this information and generate a new image which can be recognized by U-Boot. The tool
is delivered together with U-Boot. After you set up U-Boot using the steps outlined
above, you can find the tool (mkimage) under tools/. The process of using mkimage to
generate an image (for example, kernel image and ramfs image), which is to be loaded by
U-Boot, is outlined in the subsequent sections of this document.
3.5 Building kernel image
Kernel image will be built out while building the Android root file system.
If you do not need to build the kernel image, you can skip this section.
To run Android using NFS, or from SD, build the kernel with the default configuration as described below:
Assume you had already built U-Boot. mkimage was generated under myandroid/bootable/bootloader/uboot-imx/tools/ and it
is 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 two environment variables set. If the two variables are not set, set them as:
$
$
#
#
$
#
$
$
export ARCH=arm
export CROSS_COMPILE=~/myandroid/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
Generate ".config" according to default config file under arch/arm/configs.
to build the kernel image for i.MX6DQ, DL, and Solo
make imx6_android_defconfig
to build the kernel image for i.MX6SoloLite
make imx6s_android_defconfig
make uImage
With a successful build in either of the above case, the generated kernel image is ~/myandroid/kernel_imx/arch/arm/boot/
uImage.
3.6 Building boot.img
boot.img and booti are default booting commands.
As outlined in Running Android with a prebuilt image, we use boot.img and booti as default commands to boot, not the
uramdisk and uImage we used before.
You can use this command to generate boot.img under Android environment:
#
$
$
$
$ Boot image for SABRE-SD board
cd ~/myandroid
source build/envsetup.sh
lunch sabresd_6dq-user
make bootimage
#
$
$
$ Boot image for SABRE-AI board
source build/envsetup.sh
lunch sabreauto_6q-user
make bootimage
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
11Downloading Images
#
$
$
$
Boot image for i.MX6SoloLite EVK board
source build/envsetup.sh
lunch evk_6sl-user
make bootimage
4 Downloading Images
i.MX Android can be booted up from MMC/SD and NFS (networking).
i.MX Android can be booted up in the following ways:
1. Boot from MMC/SD
2. Boot from NFS (networking)
3. Boot from NAND for SABRE-AI board
Before boot, you should program the bootloader, kernel, ramdisk, and rootfs images into the main storage device (MMC/SD,
TF or NAND), or unpack the NFS root filesystem into the NFS server root.
The following download methods are supported for i.MX 6Dual/6Quad SABRE-SD and i.MX 6Solo/6DualLite SABRE-SD
boards:
• MFGTool to download all images to MMC/SD card.
• Using dd command to download all images to MMC/SD card.
4.1 System on MMC/SD
The images needed to create and Android system on MMC/SD can either be obtained from the release package or they can be
built out.
The images needed to create an Android system on MMC/SD are listed below:
U-Boot image: u-boot.bin or u-boot-no-padding.bin
boot image: boot.img
Android system root image: system.img
Recovery root image: recovery.img
The images can either be obtained from the release package or they can be built out.
4.1.1 Storage partitions
To create storage partitions, you can use MFGTool as described in the Android Quick Start Guide, or you can use format
tools in prebuild dir.
The layout of the MMC/SD/TF card for Android system is shown 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 MB.
The SYSTEM partition is used to put the built out Android system image. The DATA is used to put applications' unpacked
codes/data, system configuration 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 RECOVERY partition.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
12
Freescale Semiconductor, Inc.Downloading Images
Partition type/index
Name
Start offset
Size
File system
Content
N/A BOOT Loader 1 KB 1 MB N/A bootloader
Primary 1 Boot 8 MB 8 MB boot.img format,
kernel + ramdisk boot.img
Primary 2 Recovery Follow Boot 8MB boot.img format,
kernel + ramdisk recovery.img
Logic 5 (Extended 3) SYSTEM Follow
Recovery 512 MB EXT4. Mount as /
system Android system files under /
system/ dir.
Logic 6 (Extended 3) CACHE Follow
SYSTEM. 512 MB EXT4. Mount as /
cache. Android cache for image
store of OTA.
Logic 7 Device follow CACHE 8 MB Ext4. To Store MAC address files.
(Extended 3)
Logic 8
Mount at /vender.
Misc
(Extended 3)
Primary 4
Follow
4M N/A For recovery store
bootloader message,
reserve.
Total - Other
images EXT4. Mount at /
data. Application data storage for
the system application and
for internal media partition
in /mnt/sdcard/ dir.
Device
DATA
Follow Misc.
There is a shell script mksdcard.sh.tar in MFGTool-Dir\Profiles\MX6DL Linux Update\OS Firmware.
The script below can be used to partition a SD card as shown in the partition table above:
$ cd ~/myandroid/
$ sudo chmod +x ./device/fsl/common/tools/fsl-sdcard-partition.sh
$ sudo ./device/fsl/common/tools/fsl-sdcard-partition.sh /dev/sdX
NOTE
• The minimum size of SD card is 2GB.
• /dev/sdxN, the x is the disk index from 'a' to 'z'. That may be different on each
Linux computer.
• The default images and source code in this release only support boot from eMMC
device for i.MX 6Dual/6Quad SABRE-SD and i.MX 6Solo/6DualLite SABRE-SD.
If you want to boot it from the external SD card, see Section 3.3.2 "Building
Android images for the SD card on the SABRE-SD board".
• Unmount all the SD card partitions before running the script.
4.1.2 Downloading images with MFGTool
MFGTool can be used to download all images into a target device.
It is a quick and easy tool for downloading images. See Android Quick Start Guide for detailed description of MFGTool.
4.1.3 Downloading images with dd utility
The Linux utility "dd" on Linux computer can be used to download the images into the MMC/SD/TF card.
Before downloading, ensure that your MMC/SD/TF card partitions are created as described in Storage partitions.
All partitions can be recognized by the Linux computer. To download all images into the card, use the commands below:
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
13Downloading Images
Download the U-Boot 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 boot image:
# sudo dd if=boot.img of=/dev/sdx1; sync
Download the android system root image:
# sudo dd if=system.img of=/dev/sdx5; sync
Download the android recovery image:
# sudo dd if=recovery.img of=/dev/sdx2; sync
4.2 System on NFS
Android support runs the system on NFS root file system.
We can put the entire Android root system in NFS, and we can load kernel image from TFTP server.
You must have a computer that has NFS and TFTP server, with their root directory set up correctly, for example, /opt/tftproot
for TFTP root, and /opt/nfsroot for NFS root.
4.2.1 Setting up the TFTP and NFS root
After you set up the TFTP/NFS server, put the kernel image into the TFTP server root directory and the Android file system
files into the NFS server root directory.
For kernel image, use uImage instead of zImage.
• If you are using a prebuilt image, ensure that you pick up the correct uImage (see "Prebuilt image for using U-Boot").
• If you are building your own image, ensure that you have 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/
Set up the Android file system (take i.MX 6Dual/6Quad SABRE-SD or i.MX 6Solo/6DualLite SABRE-SD as an example):
• If you are using a prebuilt image, unzip the Android zip file (see "Prebuilt image for using U-Boot") to the NFS server
root. For example:
$ cd /opt/android_kk4.4.2_1.0.0-ga_image_6qsabresd/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
rm
cp
cp
~/myandroid
-rf /opt/nfsroot/*
-r out/target/product/sabresd_6dq/root/* /opt/nfsroot/
-r out/target/product/sabresd_6dq/system/* /opt/nfsroot/system/
NOTE
Since the NFS uses system, data, and cache folders under /opt/nfsroot/, we have to
change some settings and command sequence in /opt/nfsroot/init.rc and /opt/nfsroot/
init.freescale.rc. Since the framework will clear ethernet's IP when suspended, which
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
14
Freescale Semiconductor, Inc.Downloading Images
causes resume failure, the system property ethernet.clear.ip should be set to "no" in /opt/
nfsroot/init.rc. For example:
--- a/opt/nfsroot/init.rc
+++ b/opt/nfsroot/init.rc
@@ -144,7 +144,6 @@ loglevel 3
on post-fs
# once everything is setup, no need to modify /
-mount rootfs rootfs / ro remount
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0770 /cache
@@ -370,6 +369,7 @@ on boot
class_start core
class_start main
+class_start late_start
on property:sys.boot_completed=1
# Set default CPU frequency governor
@@ -400,8 +400,6 @@ on property:sys.interactive="active"
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
-on nonencrypted
-class_start late_start
on charger
class_start charger
--- a/opt/nfsroot/init.freescale.rc
+++ b/opt/nfsroot/init.freescale.rc
@@ -93,6 +93,7 @@ on boot
# No bluetooth hardware present
setprop hw.bluetooth 0
setprop wlan.interface wlan0
+setprop ro.nfs.mode yes
# mount the debugfs
mount debugfs none /sys/kernel/debug/
@@ -126,6 +127,6 @@ service iprenew_wlan0 /system/bin/dhcpcd -n
disabled
oneshot
-on fs
+#on fs
# mount ext4 partitions
-mount_all /fstab.freescale
+#mount_all /fstab.freescale
4.3 System on NAND for the SABRE-AI board
The images needed to create an Android system on NAND are listed below:
U-Boot image: u-boot-mx6q-nand.bin, u-boot-mx6dl-nand.bin, u-boot-mx6solo-nand.bin
Boot image: boot.img
Android system root image: android_root.img
Recovery root image: recovery.img
The images can either be obtained from the release package or they can be built out.
4.3.1 Storage partitions on NAND
The layout of the NAND for Android system is shown below:
• [Partition type/index] is which defined in the MBR.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
15Booting
• [Name] is only meaningful in Android. You can ignore it when creating these partitions.
• [Start Offset] shows where partition is started, unit in MB.
The SYSTEM partition is used to put the built out Android system image. The DATA is used to put the application's
unpacked codes/data, system configuration 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 RECOVERY partition.
Partition type/index
Name
Start offset
Size
File system
Content
MTD0 BOOT Loader 0 16MB N/A bootloader
MTD1 Boot 16M 16MB boot.img format,
kernel + ramdisk boot.img
MTD2 Recovery Follow Boot 128MB boot.img format,
kernel + ramdisk recovery.img
MTD3(ubi0:system) SYSTEM Follow
Recovery 300MB ubifs. Mount as /
system Android system files under /
system/ dir.
MTD3(ubi0:cache) CACHE Follow
SYSTEM. 200MB ubifs. Mount as /
cache Android cache for image
store of OTA.
MTD3(ubi0:device) Vendor Follow
CACHE. 10 MB ubifs. Mount at /
vender For Store MAC address files.
MTD3(ubi0:data) Data follow Vendor 300MB ubifs Application data storage for
system application. And for
internal media partition,
in /mnt/sdcard/ dir.
Mount at /vender.
To create storage partitions, you can use MFGTool as described in the Android Quick Start Guide.
4.3.2 Downloading images with MFGTool for NAND
MFGTool can be used to download all images into a target device.
It is a quick and easy tool for downloading images. See Android Quick Start Guide for detailed description of MFGTool for
NAND.
5 Booting
This chapter describes booting from MMC/SD, NAND, TFTP and NFS.
5.1 Booting from MMC/SD
This section describes booting from MMC/SD on the SABRE-SD board, on the SABRE-AI board, and on the EVK board.
5.1.1 Booting from MMC/SD on the SABRE-SD board
This section contains boot switch information and steps needed to bootup from MMC/SD.
The following table lists the boot switch settings for different boot methods:
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
16
Freescale Semiconductor, Inc.Booting
download Mode(MFGTool mode) (SW6) 00001100 (from 1-8 bit)
eMMC 4-bit (MMC3) boot (SW6) 11100110 (from 1-8 bit)
eMMC 8-bit (MMC3) boot (SW6) 11010110 (from 1-8 bit)
MMC4 (SD2) boot (SW6) 10000010 (from 1-8 bit)
MMC2 (SD3) boot (SW6) 01000010 (from 1-8 bit)
Boot from eMMC
Change the board boot switch to eMMC 4-bit mode and make (SW6) 11100110 (from 1-8 bit). Or change (SW6) 11100110
(from 1-8 bit) for 8-bit boot mode.
The default environment in boot.img is booting from eMMC. If you want to use the default environment in boot.img, you can
use the following command:
U-Boot > setenv bootargs
To clear the bootargs env, you can use the following commands:
U-Boot > setenv fastboot_dev mmc3 [eMMC as fastboot deivce]
U-Boot > setenv bootcmd booti mmc3
[Load the boot.img from eMMC]
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32
video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M
androidboot.console=ttymxc0 androidboot.hardware=freescale #[Optional]
U-Boot > saveenv
#[Save the environments]
NOTE
The mmcX value changes depending on the boot mode. These are the correct values:
• eMMC --> mmc3
• MMC4 (SD2) --> mmc1
• MMC2 (SD3) --> mmc2
bootargs env is an optional setting for booti. The boot.img includes a default bootargs,
which will be used if there is no definition of the bootargs env.
Some SoCs on SABRE-SD boards do not have MAC address fused.
Therefore, if you want to use FEC in U-Boot, set the following environment:
U-Boot > setenv ethaddr 00:04:9f:00:ea:d3
MAC address]
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3
MAC address]
#[setup the
$[setup the
Boot from SD card
Change the board boot switch to MMC2 (SD3) boot: (SW6) 01000010 (from 1-8 bit). To clear the bootargs env and set up
the booting from SD card in SD slot 3, you can use the following command:
U-Boot > setenv fastboot_dev mmc2 [eMMC as fastboot deivce]
U-Boot > setenv bootcmd booti mmc2
[Load the boot.img from SD card]
U-Boot > setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,bpp=32
video=mxcfb1:off video=mxcfb2:off fbmem=10M fb0base=0x27b00000 vmalloc=400M
androidboot.console=ttymxc0 androidboot.hardware=freescale #[Optional]
U-Boot > saveenv
#[Save the environments]
NOTE
bootargs env is an optional setting for booti. The boot.img includes a default bootargs,
which will be used if there is no definition of the bootargs env.
Some SoCs on SABRE-SD boards do not have MAC address fused.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
17Booting
Therefore, if you want to use FEC in U-Boot, set the following environment:
U-Boot > setenv ethaddr 00:04:9f:00:ea:d3
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3
#[setup the MAC address]
$[setup the MAC address]
5.1.2 Booting from MMC/SD on the SABRE-AI board
This section contains boot switch information and steps needed to bootup from MMC/SD.
The following table lists the boot switch settings for different boot methods on i.MX 6 series SABRE-AI boards.
download Mode(MFGTool mode) (S3) 0101 (from 1-4 bit)
SD on CPU Board (S1) 0100100000 (from 1-10 bit)
(S2) 0010 (from 1-4 bit)
(S3) 0010 (from 1-4 bit)
Boot from SD
Chang the board boot switch to (S3, S2, S1) 0010, 0010,0100100000 (from 1 bit).
The default environment in boot.img is booting from SD. If you want to use the default environment in boot.img, you can use
the following command:
U-Boot > setenv bootargs
To clear the bootargs env, you can use the following commands:
U-Boot > setenv bootcmd booti mmc2
#[Load the boot.img from SD]
U-Boot > setenv bootargs console=ttymxc3,115200 init=/init video=mxcfb0:dev=ldb,bpp=32
video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc3
androidboot.hardware=freescale #[Optional]
U-Boot > saveenv
#[Save the environments]
NOTE
bootargs env is an optional setting for booti. The boot.img includes a default bootargs,
which will be used if there is no definition of the bootargs env.
Some SoCs on SABRE-AI boards do not have MAC address fused.
Therefore, if you want to use FEC in U-Boot, set the following environment:
U-Boot > setenv ethaddr 00:04:9f:00:ea:d3
MAC address]
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3
MAC address]
#[setup the
$[setup the
5.1.3 Booting from SD on the i.MX6SoloLite EVK board
Below are the Boot Switch settings to control the boot storage:
download Mode(MFGTool mode) SW3: 01000000(from 1-8 bit) SW4: 00101100(from 1-8 bit)
SW5: 00000000(from 1-8 bit) Boot_Mode: 10(from 1-2bit)
SD boot SW3: 01000000(from 1-8 bit) SW4: 00101100(from 1-8 bit)
SW5: 00000000(from 1-8 bit) Boot_Mode: 01(from 1-2bit)
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
18
Freescale Semiconductor, Inc.Booting
Boot from SD
Chang the board Boot_Mode switch to 01(from 1-2bit) and (SW3,4,5) 01000000 0010110000000000(from 1-8 bit).
The default environment in boot.img is booting from SD. If you want to use default enviroment in boot.img, you can use the
following command:
UBoot > setenv bootargs
To clear the bootargs env, you can use the following command:
UBoot > setenv bootcmd booti mmc1
UBoot > setenv bootargs console=ttymxc0,115200 init=/init
androidboot.console=ttymxc0 video=mxc_elcdif_fb:bpp=32
androidboot.hardware=freescale csi
[Optional]
UBoot > saveenv
[Save the environments]
5.2 Booting from NAND
This section contains boot switch information and steps needed to bootup from MMC/SD.
The following table lists the boot switch settings for NAND boot on i.MX 6 series SABRE-AI boards.
download Mode (MFGTool mode) (S3) 0101 (from 1-4 bit)
NAND (Micro 29F8G08ABABA) (S3) 0010 (from 1-4 bit)
(S2) 0001 (from 1-4bit)
(S1) 0001000000 (from 1-10 bit)
Boot from NAND
Change the board boot switch to (S3, S2,S1) 0010, 0001,0001000000 (from 1bit) on an i.MX 6 series SABRE-AI board.
The default environment in boot.img is booting from NAND. If you want to use the default environment in boot.img, you can
use the following command:
U-Boot > setenv bootargs
To clear the bootargs env, you can use the following commands:
U-Boot > setenv bootcmd nand read 0x12800000 0x1000000 0x800000;booti 0x12800000
#[Load the boot.img from NAND]
U-Boot > setenv bootargs console=ttymxc3,115200 init=/init video=mxcfb0:dev=ldb,bpp=32
video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc3
androidboot.hardware=freescale mtdparts=gmi-nand:16m(bootloader),16m(bootimg),
128m(recovery),-(root) ubi.mtd3 #[Optional]
U-Boot > saveenv
$[Save the environments]
NOTE
bootargs env is an optional setting for booti. The boot.img includes a default bootargs,
which will be used if there is no definition of the bootargs env.
Some SoCs on SABRE-AI boards do not have MAC address fused.
Therefore, if you want to use FEC in U-Boot, set the following environment:
U-Boot > setenv ethaddr 00:04:9f:00:ea:d3
MAC address]
#[setup the
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
19Booting
U-Boot > setenv fec_addr 00:04:9f:00:ea:d3
MAC address]
$[setup the
5.3 Booting from TFTP and NFS
Set up the U-Boot environment for loading kernel from TFTP and mounting NFS as root file system after the U-Boot shell.
5.3.1 i.MX 6Quad and i.MX 6DualLite SABRE-SD platforms
U-Boot > setenv loadaddr 0x10800000
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 console=ttymxc0,115200 init=/init ip=dhcp nfsroot=${serverip}:/$
{nfsroot} video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M
fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
U-Boot > saveenv
#[Save the environments]
After you have configured these settings, reboot the board, and let U-Boot run the bootcmd environment to load and run the
kernel.
For the first-time boot, it takes some time to finish and get to the Android UI.
5.3.2 i.MX 6Quad and i.MX 6DualLite SABRE-AI platforms
U-Boot > setenv loadaddr 0x10800000
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 console=ttymxc3,115200 init=/init ip=dhcp nfsroot=${serverip}:/$
{nfsroot} video=mxcfb0:dev=ldb,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=10M
fb0base=0x27b00000 vmalloc=400M androidboot.console=ttymxc3 androidboot.hardware=freescale
U-Boot > saveenv
#[Save the environments]
After you configure these settings, reboot the board, and let u-boot run the bootcmd environment to load and run the kernel.
For the first-time boot, it takes some time to finish and get to the Android UI.
5.3.3 i.MX 6SoloLite EVK platform
UBoot > setenv loadaddr 0x80800000
UBoot > setenv bootfile uImage
UBoot > setenv serverip <your server ip>
#[Your TFTP/NFS server ip]
UBoot > setenv nfsroot <your rootfs>
#[Your rootfs]
UBoot > setenv bootcmd 'dhcp;bootm'
#[load kernel from TFTP and boot]
UBoot > setenv bootargs console=ttymxc0,115200 init=/init rw nfsroot=${serverip}:/${nfsroot}
androidboot.console=ttymxc0 csi
UBoot > saveenv
After you configure these settings, reboot the board, and let u-boot run the bootcmd environment to load and run the kernel.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
20
Freescale Semiconductor, Inc.Booting
For the first-time boot, it takes some time to finish and get to the Android UI.
5.4 Boot-up configurations
This section explains the common U-Boot environments used for NFS, MMC/SD boot, and kernel command line.
5.4.1 U-Boot environment
If you do not define the bootargs environment, it will use the default bootargs inside the image.
ethaddr/fec_addr is a MAC address of the board.
serverip is an IP address of the TFTP/NFS server.
loadaddr/rd_loadaddr is the kernel/initramfs image load address in memory.
bootfile is the name of the image file loaded by "dhcp" command, when you are using TFTP to load kernel.
bootcmd is the first variable to run after U-Boot boot.
bootargs is the kernel command line, which the bootloader passes to the kernel. As described in Kernel command line
(bootargs), bootargs env is optional for booti. boot.img already has bootargs. If you do not define the bootargs env, it
will use the default bootargs inside the image. If you have the env, it will be used.
If you want to use default env in boot.img, you can use the following command to clear the bootargs env.
> setenv bootargs
• dhcp: get ip address by BOOTP protocol, and load the kernel image ($bootfile env) from TFTP server.
• booti:
booti command will parse the boot.img header to get the zImage and ramdisk. It will also pass the bootargs as needed
(it will only pass bootargs in boot.img when it can't find "bootargs" var in your U-Boot env). To boot from mmcX, you
need to do the following:
> booti mmcX
To read the boot partition (the partition store boot.img, in this case, mmcblk0p1), the X was the MMC bus number,
which is the hardware MMC bus number, in i.MX 6Dual/6Quad SABRE-SD and i.MX 6Solo/6DualLite SABRE-SD
boards. eMMC is mmc3.
You can also add partition ID after mmcX.
> booti mmcX boot
#
> booti mmcX recovery
boot is default
# boot from the recovery partition
If you have read the boot.img into memory, you can use this command to boot from
> booti 0xXXXXXXXX
• bootm (only works in for the NFS) starts running the kernel. For other cases, use booti command.
• splashimage is the virtual or physical address of bmp file in memory. If MMU is enabled in board configuration file,
the address is virtual. Otherwise, it is physical. See README in U-Boot code root tree for details.
• splashpos sets the splash image to a free position, 'x,y', on the screen. x and y should be a positive number, which is
used as number of pixel from the left/top. Note that the left and top should not make the image exceed the screen size.
You can specify 'm,m' for centering the image. Usually, for example, '10,20', '20,m', 'm,m' are all valid settings. See
README in U-Boot code root tree for details.
• lvds_num chooses which LVDS interface, 0 or 1, is used to show the splash image. Note that we only support boot
splash on LVDS panel. We do not support HDMI or any other display device.
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
21Booting
5.4.2 Kernel command line (bootargs)
Depending on the different booting/usage scenarios, you may need different kernel boot parameters set for bootargs.
Kernel parameter
Description
Typical value
console=ttymxc0,115200
Used when
console Where to output
kernel log by
printk. init Tells kernel where init=/init
the init file is
located. All cases. "init" in Android is located in "/"
instead of in "/sbin".
ip Tells kernel how/
whether to get an
IP address. "ip=dhcp" or "ip=static_ip_address" is
mandatory in "boot from TFTP/NFS".
ip=none
or
All cases.
ip=dhcp
or
ip=static_ip_address
nfsroot Where the NFS
rootfs=ip_address:/opt/
server/directory is nfsroot,v3,tcp
located. Used in "boot from tftp/NFS" together with
"root=/dev/nfs".
root Indicates the
root=/dev/nfs
location of the root
or
file system.
root=/dev/mmcblk0p2 Used in "boot from tftp/NFS" (i.e. root=/dev/
nfs).
Tells kernel/driver
which resolution/
depth and refresh
rate should be
used, or tells
kernel/driver not to
register a
framebuffer device
for a display
device. To specify a display framebuffer with:
video
video=mxcfb0:dev=ldb,LDB-
XGA,if=RGB666,bpp=32
or
Used in "boot from SD" (i.e. root=/dev/
mmcblk0p2) if no ramdisk is used for root
fs.
video=mxcfb<0,1,2>:dev=<ldb,hdmi>,<LDB
-XGA,xres x
yresM@fps>,if=<RGB666,RGB24>,bpp=<1
6,32>
video=mxcfb1:dev=hdmi,
1920x1080M@60,if=RGB24,bp
p=32
or
or
video=mxcfb2:off
To disable a display device's framebuffer
register with:
video=mxcfb<0,1,2>:off
fbmem framebuffer
reservation size
configuration fbmem=5M,10M fbmem=<fb0 size>,<fb2 size>,<fb4
size>,<fb5 size>
vmalloc vmalloc virtual
range size for
kernel vmalloc=400M vmalloc=<size>
enable_wait_mode Enables or disable enable_wait_mode=on
the i.MX 6 WAIT
mode. enable_wait_mode=<on/off>
Lets CPU work at
special
frequency(MHz). If you want to specify CPU working
frequency
arm_freq
arm_freq=800
Wait mode is enabled by default for this
release.
Table continues on the next page...
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
22
Freescale Semiconductor, Inc.Booting
Kernel parameter
Description
Typical value
Used when
androidboot.console The Android shell
console. It should
be the same as
console=. androidboot.console=ttymxc0 If you want to use the default shell job
control, such as Ctrl+C to terminate a
running process, you must set this for the
kernel.
fec_mac Sets up the FEC
MAC address. fec_mac=00:04:9f:00:ea:d3 On SABRE-SD board, the SoC does not
have MAC address fused in. If you want to
use FEC, assign this parameter to the
kernel.
fb0base Tells kernel the
fb0base=0x27b00000
framebuffer base
address that
bootloader uses
for splashscreen.
Kernel will use the
address for
framebuffer. This is only for Hannstar XGA LVDS panel.
To choose to support smooth UI transition
from bootloader to Kernel, you need to set
this. When this is set, you have to set
'fbmem' for fb0 to reserve fb memory as
well.
gpumem Sets up the
reserved memory
size for GPU
driver gpumem=192 M It is 192 M by default on the SABRE-SD
platform. This kernel parameter can only be
used when limiting GPU/VPU usage.
ldo_active Enable or disable
LDO bypass. ldo_active=off By defaut, LDO bypass is enabled. If you
want to use internal LDO, specify
"ldo_active=on" to the kernel command
line. LDO bypass can only be enabled on
the board that mounted with external PMIC
to supply VDDARM_IN/VDDSOC_IN power
rail
caam Enable/disable
CAAM module. caam By default, CAAM is disabled. If you want
to use CAAM module, specify "caam" to the
kernel command line. CAAM uses ALT7
mode of pad GPIO_0, which conflicts with
any other module that using pad GPIO_0
on the board. On an i.MX 6 series SABRE-
SD board, CAAM conflicts with audio codec
(WM8962) and camera(ov5642) module.
bluetooth Tells kernel to
enable bluetooth. bluetooth This is only for SABRE-SD Rev C board. It
uses UART 5 to enable the BT support.
csi Enable CSI
camera device csi This is only valid for i.MX6SoloLite EVK
board.
ldo_active=on
Android User's Guide, Rev kk4.4.2_1.0.0-ga, 07/2014
Freescale Semiconductor, Inc.
23How to Reach Us: Information in this document is provided solely to enable system and software
Home Page:
freescale.com implementers to use Freescale products. There are no express or implied copyright
Web Support:
freescale.com/support information in this document.
licenses granted hereunder to design or fabricate any integrated circuits based on the
Freescale reserves the right to make changes without further notice to any products
herein. Freescale makes no warranty, representation, or guarantee regarding the
suitability of its products for any particular purpose, nor does Freescale 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 that may be provided in Freescale 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. Freescale does not convey
any license under its patent rights nor the rights of others. Freescale sells products
pursuant to standard terms and conditions of sale, which can be found at the following
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc.,
Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their
respective owners. ARM and ARM Cortex-A9 are registered trademarks of ARM
Limited.
© 2014 Freescale Semiconductor, Inc.
Document Number: AUG
Rev. kk4.4.2_1.0.0-ga
07/2014

没有评论:

发表评论