6AM.1.1 Android AM57x Release

= Introduction =

These Release Notes provide instructions for both,
 * Testing the release using a pre-built binary image which can be loaded onto eMMC on EVM board
 * Rebuilding the Android binary image from the Android sources

This software release has been developed and verified in the following software and hardware environment.

NOTE: Same set of software source works for DRA7x and AM57x family of EVMs. Build/Lunch Instructions are different for EVM specific images.

NOTE: Same set of software binaries work for GPEVM, IDK and X15, only the device tree file (.dtb) is different for different EVMs.

Release Features
Following new features are enabled/tested for AM57x GPEVM and IDK in this release:
 * Boot: fastboot, emmc boot, SD card boot
 * Connectivity: USB2.0/USB3.0 Host, Gadget ,ADB, Dual Ethernet, SD card detect, eMMC HS200 mode
 * Power: AVS0, MPU DVFS, ABB
 * Thermal: Governors implemented for MPU (On Die), Monitoring implemented for all on chip sensors
 * Video: 1080p60 MP4/H264/
 * Audio: MP3/AAC playback, stereo audio out on McASP, 5.1 Audio on HDMI,
 * Display: SGX 1.14 accelerated UI and touch, DRM/KMS, ION/GEM, HDMI A/V out
 * Security: Android SELinux Permissive Mode
 * Benchmarks: GLBench_2.1.5,LinPack, Quadrant, Antutu

Release Limitations
In this release:


 * DSS: DSS acceleration is not enabled
 * HDMI: HDMI HPD is not functional
 * Video: Performance issues with 60fps clips
 * Camera: Android Camera App is not functional
 * Boot:: Android system.img read/write fails at higher speed uboot config

=Using the Prebuilt Release Image= The prebuilt release image can be obtained from here. After you download the binaries, follow the flashing instruction from "Flashing eMMC images" section.

=Rebuilding Android from Sources=

Build PC setup
You need a 64 bit Ubuntu machine for building Android file system.


 * Install Pre-requisite packages for building the Android File System

Follow instructions from official Android page here for setting up the packages required for building Android.


 * Proxy/Firewall

If you are behind proxy/firewall, workaround it using the instructions in. For installing repo make sure you also export https_proxy environment variable.


 * Install latest repo tool

mkdir ~/bin -p sudo apt-get install curl curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo


 * Tool Chain for building Kernel and Drivers

The Kernel and Driver sources are built using the Android linux-x86 toolchain for ARM GNU/Linux version. This tool chain can be obtained when you pull the Android code based on the released manifest that will be given.


 * A note on Host binaries of Marshmallow

Host binaries like simg2img, make_exr4fs etc.. that are built in Android M needs shared libraries now. You might see errors like below when trying to use those binaries simg2img: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory To resolve it, export your LD_LIBRARY_PATH to include the libraries. Point it to either the daily build or the folder from your build system export LD_LIBRARY_PATH=${MYDROID}/out/host/linux-x86/lib64/ or export LD_LIBRARY_PATH=

Android Filesystem Sources
You can get the Android source for this release by doing: cd mkdir -p 6AM.1.1_AM57x cd 6AM.1.1_AM57x export YOUR_PATH=$PWD mkdir -p mydroid; cd mydroid export MYDROID=$PWD repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 093201c0d6b9b26773f2f093983ac98da00cb0a1 repo sync

TI Hardware Accelerated Graphics and MultiMedia Binaries
Multimedia (DCE) and accelerated graphics binaries are part of Android file system build

U-Boot Sources
cd ${YOUR_PATH} git clone git://git.omapzoom.org/repo/u-boot.git cd u-boot git checkout d20e23addce9ba32b96946bde38df254a104d6b6

Kernel & Driver Sources
cd ${YOUR_PATH} mkdir kernel git clone git://git.omapzoom.org/kernel/omap.git kernel/android-4.4 cd kernel/android-4.4 git checkout 97d294d510addd9e7be4885f399f4a403ba09848

Setting up build environment
From your work directory (6AM.1.1_AM57x folder): export YOUR_PATH=$PWD export MYDROID=${YOUR_PATH}/mydroid export PATH=$PATH:${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/ export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-

Building U-boot sources
Instructions for building x-loader and bootloader

cd ${YOUR_PATH}/u-boot export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- export ARCH=arm make distclean make am57xx_evm_nodt_config make

Building Kernel
Instructions for building kernel and device tree

cd ${YOUR_PATH}/kernel/android-4.4 export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- export ARCH=arm make mrproper ./ti_config_fragments/defconfig_builder.sh -t ti_sdk_am57x_android_release make ti_sdk_am57x_android_release_defconfig make uImage LOADADDR=0x80008000 make dtbs

Note: If you are making changes to kernel defconfig and need to rebuild SGX kernel module, refer here

Building Android Filesystem (AFS)
Instructions for building Android file system. Note that Building Marshmallow code base needs Java7

cd $MYDROID . build/envsetup.sh lunch full_am57xevm-userdebug make -j2 clean make -j2

Rebuild Android Filesystem (AFS) to include kernel
Copy Kernel Image (This step is for making your kernel to be part of boot.img) cd $MYDROID cp -v ${YOUR_PATH}/kernel/android-4.4/arch/arm/boot/zImage device/ti/am57xevm/kernel

Rebuild AFS to generate update images cd $MYDROID . build/envsetup.sh lunch full_am57xevm-userdebug rm out/target/product/am57xevm/*.img rm out/target/product/am57xevm/obj/PACKAGING/systemimage_intermediates/system.img make -j2

Preparing eMMC binaries/images
cd $YOUR_PATH mkdir emmc_files cp -v ${MYDROID}/out/target/product/am57xevm/*img emmc_files cp -v ${MYDROID}/device/ti/am57xevm/fastboot.sh emmc_files cp -v ${MYDROID}/out/host/linux-x86/bin/{simg2img,make_ext4fs,mkbootimg,fastboot,adb} emmc_files cp -v ${YOUR_PATH}/kernel/android-4.4/arch/arm/boot/zImage emmc_files/kernel cp -v ${YOUR_PATH}/kernel/android-4.4/arch/arm/boot/dts/am57*.dtb emmc_files cp -v ${YOUR_PATH}/u-boot/MLO emmc_files/GP_MLO cp -v ${YOUR_PATH}/u-boot/MLO emmc_files/ cp -v ${YOUR_PATH}/u-boot/u-boot.img emmc_files

=Flashing eMMC images=

The default setup is to flash MLO and u-boot.img ,kernel, dtb file and AFS to emmc.
 * Instructions are same for GPEVM, IDK and X15

Flashing procedure
Hit any key to stop autoboot: 3 => env default -f -a => setenv partitions $partitions_android => env save => fastboot 1 cd $YOUR_PATH/emmc_files sudo ./fastboot.sh
 * Copy u-boot.img and MLO files to an SD card (boot partition) and then boot the target board from this external SD card.
 * Connect a USB cable from the Linux PC to the USB3.0 port on board
 * Power on the board and stop the board at u-boot prompt by interrupting with key press
 * Set the right environment variables for Android SDK and save (This step is needed only for fresh flash, for incremental flashing this is optional)
 * Now reset the board and stop again in u-boot
 * Put the board in fastboot mode by typing in below command
 * On the Linux PC which has the emmc images run the fastboot.sh script to flash the binaries
 * NOTE: After the flashing is done, remove the external SD card and reboot the board.

=Quirks=

Re-Building_SGX_kernel_module
cd ${MYDROID}/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap_android export KERNELDIR=${YOUR_PATH}/kernel/android-4.4 export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- export KERNEL_CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- export ARCH=arm make TARGET_PRODUCT="am57xevm" BUILD=release SGX modules will be present at ${MYDROID}/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/binary2_omap_android_release/target/pvrsrvkm.ko

Push pvrsrvkm.ko file to /system/lib/modules/ location on the target and reboot the board.

HDMI Detect

 * Apply patches and rebuild Android.
 * http://review.omapzoom.org/#/c/37742/ - AFS
 * http://review.omapzoom.org/#/c/37739/ - Kernel
 * http://review.omapzoom.org/#/c/37809/ - Kernel
 * From command line run the following in root level.
 * stop; modetest -s 36:1920x1080;start
 * Try lower resolutions and find correct connector ID from "modetest" if the above doesnt work

=Application notes/Additional Info=
 * Refer 6AM.1.1_Release_Notes for DRA7x Family of devices Release info
 * Refer 6AM.1.1_Application_Notes for DRA7x Family Application notes

Refer to Application notes page for more info on features of this release, additional boot options, etc...