6AJ.1.1 Release Notes

= Introduction =

These Release Notes provide instructions for: and
 * 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

Both sets of instructions make use of binary components to enable hardware acceleration for Graphics.

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

OS Kernel: Linux® 3.8 Android:  Android JellyBean 4.2.2 Toolchain: Andriod linux-x86 toolchain arm-eabi-4.6 Reference hardware platforms: TI DRA7xxx EVM (J6 EVM) - REV D boards and later with Poly Fixed Silicon[1] Build Host OS: Ubuntu Daily Build J6 EVM Version: JACINTO6_JB_MR1_DB build 74

Release Features
On top of previous release, following new features are enbaled
 * Boot: QSPI/NOR boot + emmc (x-loader and bootloader from QSPI and rest of the stuff from emmc). SD card Android boot is not supported by default
 * Ethernet: Enabled on "Ethernt 0 P5" port
 * USB: USB2.0 Mass storage
 * Display: On board display with touch screen. On board LCD screen is expected to be present by default.
 * Audio: Multichannel audio out on HDMI, Multichannel-to-stereo down mix to McASP
 * Secure boot: Validated in this release on HS device and mshiled DK lite is available in CDDS Only. Customers needing access to Mshield DK lite should contact their TI representatives to get access
 * Power: DVFS for Thermal, Smart Reflex (AVS0), Thermal framework with governors implemented for MPU and GPU sensors, all on chip sensors are monitored, OPP_HIGH enabled.

NOTE: OPP_HIGH(1.5 GHz) is enabled in this release. if you don't have a poly fixed silicon, make sure to pick up an extra patch in kernel to disable OPP_HIGH.
 * Refer to "Poly Fix Silicon Identification" for finding out if you have poly fixed silicon or not.

Release Limitations
In this release: 
 * Touchscreen: Only button mode is enabled
 * USB: The USB1 port is set to work in gadget mode for ADB and USB2 port is set to operate in USB host mode (mouse, etc...)

=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 would need a 64bit machine for building Android file system. You must have sudo permissions on the PC for installing packages


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

The information below on initializing build environment for Android, is taken from official Android page here

The following commands will install the correct packages to your PC:

Ubuntu 10.04 sudo apt-get install git-core flex bison gperf libesd0-dev zip libwxgtk2.6-dev zlib1g-dev build-essential tofrodos x-dev sudo apt-get install lib32readline5-dev libstdc++6 lib32z1 lib32z1-dev ia32-libs g++-multilib libx11-dev libncurses5-dev sudo apt-get install uboot-mkimage libxml2-utils

Ubuntu 12.04 sudo apt-get install git-core flex bison gperf libesd0-dev zip libwxgtk2.8-dev zlib1g-dev build-essential tofrodos sudo apt-get install lib32readline6-dev libstdc++6 lib32z1 lib32z1-dev ia32-libs g++-multilib libx11-dev libncurses5-dev sudo apt-get install uboot-mkimage libxml2-utils


 * Install Java SE 6 JDK 

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdk


 * 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. export https_proxy= eg: http://local.proxyserver.com:80


 * 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 export PATH=~/bin:$PATH

If you do not have sudo rights to your machine, contact your System Administrator for assistance.


 * 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.

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

TI Hardware Accelerated Graphics Binaries
Accelerated graphics binaries are part of Android file system build now

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

Kernel & Driver Sources
To clone kernel source from scratch do: cd ${YOUR_PATH} mkdir kernel git clone git://git.omapzoom.org/kernel/omap.git kernel/android-3.8 cd kernel/android-3.8 git checkout dff911633257e1a73ffa86f72dbe093d1dac8b15

Step to get additional patch to disable OPP_HIGH. Needed only if you don't have a poly fixed silicon[1] git fetch http://review.omapzoom.org/kernel/omap refs/changes/49/33449/1 && git cherry-pick FETCH_HEAD

Setting up build environment
From your work directory (6AJ.1.1 folder): export YOUR_PATH=$PWD export MYDROID=${YOUR_PATH}/mydroid export PATH=$PATH:${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/ export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/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.6/bin/arm-eabi- export ARCH=arm make distclean make dra7xx_evm

Building Kernel
Follow the steps below to build kernel image.

cd ${YOUR_PATH}/kernel/android-3.8 export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- make ARCH=arm mrproper make ARCH=arm android_omap_defconfig make ARCH=arm uImage dtbs

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

Building Android Filesystem (AFS)
Follow the steps below to build Android file system.

cd $MYDROID . build/envsetup.sh lunch 21 #(specific lunch target: full_jacinto6evm-userdebug) make -j2 clean make -j2

Rebuild Android Filesystem (AFS) to include kernel
Copy Kernel Image cd $MYDROID cp -v ${YOUR_PATH}/kernel/android-3.8/arch/arm/boot/zImage device/ti/jacinto6evm/kernel

Rebuild AFS to generate update images cd $MYDROID . build/envsetup.sh lunch 21 #(specific lunch target: full_jacinto6evm-userdebug) rm out/target/product/jacinto6evm/*img rm out/target/product/jacinto6evm/obj/PACKAGING/systemimage_intermediates/system.img make -j2

Preparing eMMC binaries/images
cd $YOUR_PATH mkdir emmc_files cp -v ${MYDROID}/out/target/product/jacinto6evm/*img emmc_files cp -v ${MYDROID}/device/ti/jacinto6evm/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-3.8/arch/arm/boot/zImage emmc_files/kernel cp -v ${YOUR_PATH}/kernel/android-3.8/arch/arm/boot/dts/dra7-evm.dtb emmc_files 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 to QSPI and remaining binaries (kernel, dtb file and AFS) to emmc.

DIP Switch settings
Required DIP switch settings: The following DIP switch settings will put the device in preferred booting mode, with first device as SD and second device as QSPI_1. SYSBOOT [0-15] OFF ON ON OFF OFF OFF OFF OFF   ON OFF OFF OFF OFF OFF OFF OFF ON

USERCONFIG [SW5] OFF OFF ON OFF ON OFF OFF OFF OFF OFF

Flashing procedure
Hit any key to stop autoboot: 3 DRA752 EVM # fastboot 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
 * Put the board in fastboot mode by typing in fastboot 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.
 * For more info on partitions, refer application note "QSPI NOR/eMMC partitions"



=Application notes=

Poly Fix Silicon Identification

 * Box Identification:
 * Locate (D) Date Code information
 * The Date Code is listed in YYWW format.
 * Material with date codes of 1327 or later are manufactured with the corrected poly slot reticle


 * Device Level Identification:
 * There is a unique 7-character code (YMLLLLS) symbolized on the top of every component
 * YM in the code corresponds to the Year and Month of assembly
 * Units with lot trace code of 37LLLLS or later have been manufactured with the corrected poly slot reticle.


 * Programmatic Identification:
 * The test program revision is programmed as part of the die ID revision register.
 * Register to read is 0x4AE0C20C and The FT revision is found in bits [15:8]
 * If the value is 5 or more, it is poly fixed material

QSPI NOR/eMMC partitions
In this release, the xloader and boorloader goes into QSPI and rest of the images go in to eMMC partitions. The table below summarizes the partition info

Syntax for fastboot flash command is fastboot flash

To update ramdisk.img or kernel zImage, you will have to create boot.img file and flash it. Steps to create boot.img file below cd $YOUR_PATH/emmc_files mkbootimg --kernel  --ramdisk  --base 0x80000000 --output boot.img

Note: When you flash QSPI, you cannot update MLO or u-boot.img indvidually, you will have to flash both together as we erase the whole QSPI while flashing

fastboot oem spi fastboot flash xloader  fastboot flash bootloader 

Building SGX kernel module
Some changes made to kernel defconfig can causes prebuilt SGX kernel module to not load [   8.354095] pvrsrvkm_sgx544_116: disagrees about version of symbol thermal_cooling_device_register [   8.363616] pvrsrvkm_sgx544_116: Unknown symbol thermal_cooling_device_register (err -22) [   8.372467] pvrsrvkm_sgx544_116: disagrees about version of symbol thermal_zone_bind_cooling_device [   8.382049] pvrsrvkm_sgx544_116: Unknown symbol thermal_zone_bind_cooling_device (err -22) [   8.390869] pvrsrvkm_sgx544_116: disagrees about version of symbol pid_task [   8.398254] pvrsrvkm_sgx544_116: Unknown symbol pid_task (err -22) ..

Follow the instructions below for rebuilding SGX module

cd ${MYDROID}/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/build/linux2/omap4430_android export KERNELDIR=${YOUR_PATH}/kernel/android-3.8 export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- export ARCH=arm make TARGET_PRODUCT="omap5sevm" BUILD=release TARGET_SGX=544es2

SGX module will be present at ${MYDROID}/device/ti/proprietary-open/jacinto6/sgx_src/eurasia_km/eurasiacon/binary2_544_116_omap4430_android_release/target/pvrsrvkm_sgx544_116.ko

or

${MYDROID}/out/target/product/jacinto6evm/target/kbuild/pvrsrvkm_sgx544_116.ko

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

Audio
Below is some information about what input/output connectors in VayuEVM can be used for audio in Android and what type of accessories can be connected. Input:
 * Microphone – 3.5mm jack on CPU board, labeled (printed on PCB) as “MIC IN” (P10)
 * Dedicated microphone with 3.5 stereo plug has to be used:
 * 3-pin plug: Tip -> Left channel, Ring -> Right channel
 * Microphone can be mono, but must have stereo plug
 * Microphone from headsets (e.g. cellphone) cannot be used
 * LineIn jack is not used in Android

Output: Audio output is always rendered to Headphone and LineOut since VayuEVM doesn’t have headset/headphone detection to dynamically switch between them. There are no speakers installed on the board. HDMI: audio supports up to 8-channels, but from Android we are only using stereo and 5.1:
 * Headphone – 3.5mm jack on CPU board, labeled as “HEADPHONE” (P13)
 * 3.5mm plug, regardless of 3 or 4 pins
 * Left channel -> Tip, Right channel -> Ring, Ground -> Sleeve
 * Loads of 16 ohms
 * LineOut – 3.5mm jack on CPU board, labeled as “LINE OUT” (P12)
 * 3-pin plug
 * Left channel -> Tip, Right channel -> Ring, Ground -> Sleeve
 * Loads of ~10k ohms
 * HDMI sinks that support audio should support stereo playback too
 * 5.1 audio samples can play on a stereo sink but data is downmixed
 * HDMI multichannel requires a 5.1 or 7.1 sink, we use a 7.1 A/V receiver

Ethernet
Use following commands for enabling Ethernet in Android. shell@android:/$ su shell@android:/# netcfg eth0 up # to bring up the interface shell@android:/# netcfg eth0 dhcp # to get IP address from DHCP server

HDMI

 * In this release, DDC block in HDMI is used to read the EDID info
 * Following hardware modification is needed to be done on Jacinto6 EVM boards for HDMI to be functional (Rev D and later only supported)
 * • Mod is needed on RU108 module
 * • Lines 3B1 and 3B2 need to be shorted for HPD interrupt line to be connected all times
 * • Lines 4B1 and 4B2 need to be shorted for CEC interrupt line to be connected all times
 * • Refer to image here for details

SD card boot
SD Card Boot Information