DART Android RN WL8: Difference between revisions

From Variscite Wiki
 
(26 intermediate revisions by one other user not shown)
Line 20: Line 20:
#Accept the license agreement and click on the Linux x64 bin installer. The downloaded file will be named jdk-6uXX-linux-x64.bin where XX is the JDK 6 update version.
#Accept the license agreement and click on the Linux x64 bin installer. The downloaded file will be named jdk-6uXX-linux-x64.bin where XX is the JDK 6 update version.
#Follow the following steps to install JDK 6
#Follow the following steps to install JDK 6
<pre>$ chmod a+x jdk-6uXX-linux-x64.bin
<pre>chmod a+x jdk-6uXX-linux-x64.bin
$ ./jdk-6uXX-linux-x64.bin
./jdk-6uXX-linux-x64.bin
$ sudo mkdir -p /usr/lib/jvm
sudo mkdir -p /usr/lib/jvm
$ sudo mv jdk1.6.0_XX /usr/lib/jvm/
sudo mv jdk1.6.0_XX /usr/lib/jvm/
$ sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_XX/bin/java" 1
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_XX/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_XX/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_XX/bin/javac" 1
$ sudo update-alternatives --config java
sudo update-alternatives --config java
$ sudo update-alternatives --config javac</pre>
sudo update-alternatives --config javac</pre>
{{Note|'''NOTE:'''<br/>
{{Note|'''NOTE:'''<br/>
Android Jelly Bean (4.1.2) needs Oracle JDK 6.<br>The Hard Disk should have at least 30 GigaBytes of free space to complete the building of sources.<br>Please refer to the AOSP documentation for latest information and instructions for setting up other Ubuntu versions http://source.android.com/source/initializing.html|info}}
Android Jelly Bean (4.1.2) needs Oracle JDK 6.<br>The Hard Disk should have at least 30 GigaBytes of free space to complete the building of sources.<br>Please refer to the AOSP documentation for latest information and instructions for setting up other Ubuntu versions http://source.android.com/source/initializing.html|info}}


'''Install ''repo'' tool:'''
'''Install ''repo'' tool:'''
<pre>$&nbsp;mkdir ~/bin -p
<pre>mkdir ~/bin -p
$&nbsp;sudo apt-get install curl
sudo apt-get install curl
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$&nbsp;chmod a+x ~/bin/repo
chmod a+x ~/bin/repo
$&nbsp;export PATH=~/bin:$PATH
export PATH=~/bin:$PATH
</pre>
</pre>
If you do not have ''sudo'' rights to your machine, contact your System Administrator for assistance. '''Tool Chain for building Kernel and Drivers'''
If you do not have ''sudo'' rights to your machine, contact your System Administrator for assistance. '''Tool Chain for building Kernel and Drivers'''
Line 47: Line 47:


To obtain '''Android Filesystem Sources''' follow:
To obtain '''Android Filesystem Sources''' follow:
<pre>$ cd <your work directory>
<pre>cd <your work directory>
$ mkdir -p 4AJ.2.2; cd 4AJ.2.2
mkdir -p 4AJ.2.2; cd 4AJ.2.2
$&nbsp;export YOUR_PATH=`pwd`
export YOUR_PATH=`pwd`
$&nbsp;mkdir -p mydroid; cd mydroid
mkdir -p mydroid; cd mydroid
$ export MYDROID=`pwd`
export MYDROID=`pwd`
$&nbsp;repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 27.x -m RLS4AJ.2.2_JellyBean.xml
repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 27.x -m RLS4AJ.2.2_JellyBean.xml
$&nbsp;repo sync
repo sync
</pre>
</pre>
Download AFS patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.AFS.patch''') and apply it:
Download AFS patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.AFS.* patches''') and apply them:
<pre>$ cat 4AJ.2.2.VAR.DART.R10.AFS.patch | patch -p1 -d device/ti/blaze/
<pre>cat 4AJ.2.2.VAR.DART.R10.AFS.patch | patch -p1 -d device/ti/blaze/
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.patch | patch -p1 -d device/ti/blaze/
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.tgz.patch | patch -p1 -d device/ti/proprietary-open/wl12xx/wlan
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.LIBHW.patch | patch -p1 -d hardware/libhardware_legacy/
</pre>
</pre>
Download Ducati binaries package from Variscite's FTP ('''/proprietary/DART_WL8/ducati_full_blaze.tgz''') and integrate it:
Download Ducati binaries package from Variscite's FTP ('''/proprietary/DART_WL8/ducati_full_blaze.tgz''') and integrate it:
<pre>$ cp ducati_full_blaze.tgz device/ti/proprietary-open/omap4/ducati_full_blaze.tgz</pre>
<pre>$ cp ducati_full_blaze.tgz device/ti/proprietary-open/omap4/ducati_full_blaze.tgz</pre>
Download WiLink6 binaries package from Variscite's FTP ('''/proprietary/DART_WL8/wlan.tgz''') and integrate it:
Copy wlan original TI binaries in place:
<pre>$ cp wlan.tgz device/ti/proprietary-open/wl12xx/wlan/wlan.tgz</pre>
<pre>$ cp wlan.tgz device/ti/proprietary-open/wl12xx/wlan/wlan.tgz</pre>
<span style="line-height: 1.5em;">To obtain </span>'''Kernel & Driver Sources'''<span style="line-height: 1.5em;">follow:</span>
<span style="line-height: 1.5em;">To obtain </span>'''Kernel & Driver Sources'''<span style="line-height: 1.5em;">follow:</span>


To clone kernel source from scratch do:
To clone kernel source from scratch do:
<pre>$&nbsp;cd ${YOUR_PATH}
<pre>cd ${YOUR_PATH}
$&nbsp;git clone git://git.omapzoom.org/kernel/omap.git kernel/android-3.0
git clone git://git.omapzoom.org/kernel/omap.git kernel/android-3.0
$ cd kernel/android-3.0
cd kernel/android-3.0
$&nbsp;git checkout 1f21f8ed30c1d6abd029b67d17106042930a93d2</pre>
git checkout 1f21f8ed30c1d6abd029b67d17106042930a93d2</pre>
Download kernel patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.kernel.WL8.patch''') and apply it''':'''
Download kernel patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.kernel.WL8.patch''') and apply it''':'''
<pre>$&nbsp;cat 4AJ.2.2.VAR.DART.R10.kernel.patch | patch -p1</pre>
<pre>cat 4AJ.2.2.VAR.DART.R10.kernel.WL8.patch | patch -p1</pre>
<span style="line-height: 1.5em;">To obtain </span>'''U-Boot Sources'''<span style="line-height: 1.5em;">follow:</span>
<span style="line-height: 1.5em;">To obtain </span>'''U-Boot Sources'''<span style="line-height: 1.5em;">follow:</span>
<pre>$ cd ${YOUR_PATH}
<pre>cd ${YOUR_PATH}
$ git clone git://git.omapzoom.org/repo/u-boot.git u-boot
git clone git://git.omapzoom.org/repo/u-boot.git u-boot
$&nbsp;cd u-boot
cd u-boot
$&nbsp;git checkout 622fcfe5ae67e10598bdba8173c68717809518fc
git checkout 622fcfe5ae67e10598bdba8173c68717809518fc
</pre>
</pre>
Download U-Boot patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.uboot.patch''') and apply it:
Download U-Boot patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.uboot.patch''') and apply it:
<pre>$&nbsp;cat 4AJ.2.2.VAR.DART.R10.uboot.patch | patch -p1 </pre>
<pre>cat 4AJ.2.2.VAR.DART.R10.uboot.patch | patch -p1 </pre>
<span style="line-height: 1.5em;">To obtain </span>'''X-loader Sources'''<span style="line-height: 1.5em;">follow:</span>
<span style="line-height: 1.5em;">To obtain </span>'''X-loader Sources'''<span style="line-height: 1.5em;">follow:</span>
<pre>$ cd ${YOUR_PATH}
<pre>cd ${YOUR_PATH}
$&nbsp;git clone git://git.omapzoom.org/repo/x-loader.git x-loader
git clone git://git.omapzoom.org/repo/x-loader.git x-loader
$&nbsp;cd x-loader
cd x-loader
$&nbsp;git checkout dd88047040dce4a926a6ab80e207bc757f44d648
git checkout dd88047040dce4a926a6ab80e207bc757f44d648
</pre>
</pre>
Download X-loader patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.xloader.patch''') and apply it:
Download X-loader patch from Variscite's FTP ('''/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.xloader.patch''') and apply it:
<pre>$ cat 4AJ.2.2.VAR.DART.R10.xloader.patch | patch -p1  
<pre>cat 4AJ.2.2.VAR.DART.R10.xloader.patch | patch -p1  
</pre>
</pre>


Line 98: Line 101:


From your work directory (where your 4AJ.2.2 directory resides):
From your work directory (where your 4AJ.2.2 directory resides):
<pre>$&nbsp;export YOUR_PATH=`pwd`
<pre>export YOUR_PATH=`pwd`
$&nbsp;export MYDROID=${YOUR_PATH}/mydroid
export MYDROID=${YOUR_PATH}/mydroid
$&nbsp;export PATH=$PATH:${MYDROID}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
export PATH=$PATH:${MYDROID}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
$&nbsp;mkdir ${MYDROID}/logs
mkdir ${MYDROID}/logs
$&nbsp;export CROSS_COMPILE=arm-eabi-
export CROSS_COMPILE=arm-eabi-
$&nbsp;export PATH=${YOUR_PATH}/u-boot/tools:$PATH
export PATH=${YOUR_PATH}/u-boot/tools:$PATH
</pre>
</pre>
=== Building U-BOOT ===
=== Building U-BOOT ===
<pre>$&nbsp;cd ${YOUR_PATH}/u-boot
<pre>cd ${YOUR_PATH}/u-boot
$ make ARCH=arm distclean
make ARCH=arm distclean
$ make ARCH=arm omap4460dart_evm_config      # To build u-boot for DART EVM
make ARCH=arm omap4460dart_board_config    # To build u-boot for DART Board
$ make ARCH=arm omap4460dart_board_config    # To build u-boot for DART Board
make ARCH=arm 2>&1 |tee ${MYDROID}/logs/u-boot_make.out
$ make ARCH=arm 2>&1 |tee ${MYDROID}/logs/u-boot_make.out
</pre>
</pre>
=== Building X-LOADER ===
=== Building X-LOADER ===
<pre>$ cd ${YOUR_PATH}/x-loader
<pre>cd ${YOUR_PATH}/x-loader
$&nbsp;make distclean
make distclean
$ make ARCH=arm omap4460dart_config
make ARCH=arm omap4460dart_config
$&nbsp;make ARCH=arm ift 2>&1 |tee ${MYDROID}/logs/x-loader_make.out</pre>
make ARCH=arm ift 2>&1 |tee ${MYDROID}/logs/x-loader_make.out</pre>
=== Building Kernel ===
=== Building Kernel ===


''Note: If you are building for a GP device it is recommended not to build the SMC kernel driver''.<br/>To create kernel uImage you need to add "mkimage" directory path to your "PATH" environment variable:
''Note: If you are building for a GP device it is recommended not to build the SMC kernel driver''.<br/>To create kernel uImage you need to add "mkimage" directory path to your "PATH" environment variable:
<pre>$&nbsp;cd ${YOUR_PATH}/kernel/android-3.0
<pre>cd ${YOUR_PATH}/kernel/android-3.0
$&nbsp;make ARCH=arm distclean
make ARCH=arm distclean
$&nbsp;make ARCH=arm dart_defconfig
make ARCH=arm dart_defconfig
$&nbsp;make ARCH=arm uImage 2>&1 |tee ${MYDROID}/logs/kernel_make.out
make ARCH=arm uImage 2>&1 |tee ${MYDROID}/logs/kernel_make.out
</pre>
</pre>
=== Building Kernel modules ===
=== Building Kernel modules ===
<pre>$&nbsp;make ARCH=arm modules 2>&1 |tee ${MYDROID}/logs/kernel_modules.out
<pre>make ARCH=arm modules 2>&1 |tee ${MYDROID}/logs/kernel_modules.out
</pre>
=== Building WLAN driver ===
<pre>$&nbsp;cd ${MYDROID}/hardware/ti/wlan/mac80211/compat_wl12xx
$&nbsp;export KERNEL_DIR=${YOUR_PATH}/kernel/android-3.0
$&nbsp;export KLIB=${KERNEL_DIR}
$ export KLIB_BUILD=${KERNEL_DIR}
$ make ARCH=arm 2>&1 |tee ${MYDROID}/logs/wlan_modules.out
</pre>
</pre>
The above step will produce the following kernel WLAN modules: ''compat.ko'', ''cfg80211.ko'', ''mac80211.ko'', ''wl18xx.ko'' and ''wl18xx_sdio.ko''. These modules are pushed into the ''/system/lib/modules'' directory on the flashed image.


=== Building BTFM driver ===
=== Building BTFM driver ===
<pre>$&nbsp;cd ${MYDROID}/hardware/ti/wpan/bluetooth-compat
<pre>cd ${MYDROID}/hardware/ti/wpan/bluetooth-compat
$ export KERNEL_DIR=${YOUR_PATH}/kernel/android-3.0
export KERNEL_DIR=${YOUR_PATH}/kernel/android-3.0
$ export KLIB=${KERNEL_DIR}
export KLIB=${KERNEL_DIR}
$&nbsp;export KLIB_BUILD=${KERNEL_DIR}
export KLIB_BUILD=${KERNEL_DIR}
$ make ARCH=arm 2>&1 |tee ${MYDROID}/logs/wlan_modules.out
make ARCH=arm 2>&1 |tee ${MYDROID}/logs/wlan_modules.out
</pre>
</pre>
The above step will produce the following kernel BTFM modules: ''compat.ko'', ''btwilink.ko'', ''bnep.ko'', ''hidp.ko'', ''rfcomm.ko'', ''bluetooth.ko''. These modules are pushed into the ''/system/lib/modules'' directory on the flashed image.
The above step will produce the following kernel BTFM modules: ''compat.ko'', ''btwilink.ko'', ''bnep.ko'', ''hidp.ko'', ''rfcomm.ko'', ''bluetooth.ko''. These modules are pushed into the ''/system/lib/modules'' directory on the flashed image.
Line 149: Line 144:


In the make step below use the number of cores you have available; i.e. -j4 (for 4 cores) or -j12 (for 12 cores)
In the make step below use the number of cores you have available; i.e. -j4 (for 4 cores) or -j12 (for 12 cores)
<pre>$&nbsp;cd $MYDROID
<pre>cd $MYDROID
$ source build/envsetup.sh
source build/envsetup.sh
</pre>
</pre>
Now setup platform:
Now setup platform:
<pre>$&nbsp;lunch full_blaze-userdebug
<pre>lunch full_blaze-userdebug
</pre>
</pre>
And build Android AFS:
And build Android AFS:
<pre>$ make clean&nbsp; #(required for clean rebuild only)
<pre>make clean&nbsp; #(required for clean rebuild only)
$ make 2>&1 | tee ${MYDROID}/logs/android_make.out
make 2>&1 | tee ${MYDROID}/logs/android_make.out
</pre>
</pre>
=== Preparing Android binaries ===
=== Preparing Android binaries ===


Install external kernel modules that are required by the DART-4460 board.
Copy external WLAN kernel modules:
<pre>$&nbsp;export BOARD_TYPE="blaze"
<pre>
cd ${MYDROID}/out/target/product/blaze/system/lib/modules
tar xvf wlan_modules.tar.gz
</pre>
Copy WLAN firmware:
<pre>
cd ${MYDROID}/out/target/product/blaze/system/etc/firmware/ti-connectivity
tar xvf wlan_firmware.tar.gz
</pre>


$&nbsp;cd ${MYDROID}/out/target/product/${BOARD_TYPE}
=== Rebuild Android ===
$ mkdir -p system/lib/modules
<pre>
$&nbsp;find ${MYDROID}/hardware/ti/wlan/mac80211/compat_wl12xx -name \*.ko |while read f; do cp $f system/lib/modules/; done
cd ${MYDROID}
$&nbsp;find ${MYDROID}/hardware/ti/wpan/bluetooth-compat -name \*.ko |while read f; do cp $f system/lib/modules/; done
make 2>&1 | tee ${MYDROID}/logs/android_make.out
</pre>
</pre>
=== Preparing eMMC images ===
=== Preparing eMMC images ===
<pre>$&nbsp;cd ${YOUR_PATH}
<pre>cd ${YOUR_PATH}
$&nbsp;mkdir -p omap4_emmc_files_omap4dart&nbsp;; cd omap4_emmc_files_omap4dart
mkdir -p omap4_emmc_files_omap4dart&nbsp;; cd omap4_emmc_files_omap4dart
$&nbsp;cp -f ${MYDROID}/out/host/linux-x86/bin/fastboot .
cp -f ${MYDROID}/out/host/linux-x86/bin/fastboot .
$&nbsp;cp -f ${MYDROID}/out/host/linux-x86/bin/mkbootimg .
cp -f ${MYDROID}/out/host/linux-x86/bin/mkbootimg .
$&nbsp;cp -f ${MYDROID}/out/host/linux-x86/bin/simg2img .
cp -f ${MYDROID}/out/host/linux-x86/bin/simg2img .
$&nbsp;cp -f ${MYDROID}/out/host/linux-x86/bin/make_ext4fs .
cp -f ${MYDROID}/out/host/linux-x86/bin/make_ext4fs .
$ cp -f ${YOUR_PATH}/kernel/android-3.0/arch/arm/boot/zImage .
cp -f ${YOUR_PATH}/kernel/android-3.0/arch/arm/boot/zImage .


  <<  For OMAP4 Dart Board >>
cp -f ${YOUR_PATH}/x-loader/MLO Dart_Board_OMAP4460_GP_ES1.1_MLO .
$&nbsp;cp -f ${YOUR_PATH}/x-loader/MLO Dart_Board_OMAP4460_GP_ES1.1_MLO
cp -f ${YOUR_PATH}/u-boot/u-boot.bin Dart_Board_u-boot.bin .
$&nbsp;cp -f ${YOUR_PATH}/u-boot/u-boot.bin Dart_Board_u-boot.bin


  <<  For OMAP4 Dart EVM >>
$ cp -f ${YOUR_PATH}/x-loader/MLO Dart_EVM_OMAP4460_GP_ES1.1_MLO
$ cp -f ${YOUR_PATH}/u-boot/u-boot.bin Dart_EVM_u-boot.bin
</pre>
</pre>
'''Create img files:'''
'''Create img files:'''
<pre>
<pre>
$ cd ${YOUR_PATH}/omap4_emmc_files_omap4dart
cd ${YOUR_PATH}/omap4_emmc_files_omap4dart
$&nbsp;cp -f ${MYDROID}/out/target/product/${BOARD_TYPE}/*.img .
cp -f ${MYDROID}/out/target/product/${BOARD_TYPE}/*.img .
</pre>
</pre>
This build should not take too much time and will re-generate a new *.img files with the modified init.rc file in it
This build should not take too much time and will re-generate a new *.img files with the modified init.rc file in it
Line 195: Line 195:
Now from this new directory we will create the eMMC images which will be flashed using fastboot protocol (described later).
Now from this new directory we will create the eMMC images which will be flashed using fastboot protocol (described later).


First create '''boot.img''' image using kernel image we copied previously:
First create '''boot.img''' image using kernel image we copied previously:<br>
<pre>$&nbsp;./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 --cmdline "<extra_bootargs>" -o boot.img
Build for LCD:
<pre>$&nbsp;./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 -o boot.img
</pre>
</pre>
For example to create '''boot.img''' with HDMI resolution of 1920x1080:
Build for HDMI: <br>
<pre>$ ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 --cmdline "omapdss.def_disp=hdmi omapdss.hdmi_options=1920x1080" -o boot.img
<pre>$ ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 --cmdline "omapdss.def_disp=hdmi omapdss.hdmi_options=1920x1080" -o boot.img
</pre>
</pre>
Line 261: Line 262:
  $ sudo ./fastboot flash xloader ./MLO
  $ sudo ./fastboot flash xloader ./MLO
  $ sudo ./fastboot flash bootloader ./u-boot.bin
  $ sudo ./fastboot flash bootloader ./u-boot.bin
== Flash Android binaries using Ubuntu SD image ==
As an easy and fast way to flash Android binaries on OMAP4 DART, Variscite provides a Ubuntu core SD card image with pre-built Android binaries.<br/>This SD card image includes a script (emmc-flasher.sh) that installs the boot images and root file-system.
'''Preparing rescue SD-Card'''
*Plug your SD card to your Linux machine, run dmesg and see what device is added (i.e. /dev/sd<span style="color: rgb(255, 0, 0);">'''X'''</span>)
*gunzip Ubuntu_12.04_core-DART-BOARD.VAR10_2.img.gz
*dd if=Ubuntu_12.04_core-DART-BOARD.VAR10_2.img of=/dev/sd<span style="color: rgb(255, 0, 0);">'''X'''</span> bs=128k
'''Recover Nand Flash'''
*Insert the SD card into the SD/MMC slot of the custom board.
*Boot from SD card.
*Login as root (password:password)
*From Linux command line, type:
<pre>$&nbsp;cd eMMC/Android/
$&nbsp;./emmc-flasher.sh Dart_Board</pre>

Latest revision as of 12:25, 23 November 2015

AJ.2.2.VAR.DART.R10_WL8 Release Notes

Introduction

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

OS Kernel: Linux® 3.0
Android: Android JellyBean 4.1.2
Kernel: 3.0.31
Toolchain: Andriod linux-x86 toolchain arm-eabi-4.4.3
Reference hardware platforms: Variscite OMAP4 DART board
Build Host OS: Ubuntu 10.04 64-bit
Daily Build Blaze_Tablet Version: JB DEV Daily Build 96

Tools & Dependency packages

Pre-requisite packages for building the Android Filesystem (Note: This is with reference to Ubuntu 10.04 64-bit). Ubuntu 64-bit is required for the cross-compilation of Android Jelly Bean Filesystem.

If you are behind a firewall, you will have to set-up firewall using the instructions.
The following commands will install the correct packages to your server:

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

Install Oracle JDK 6

  1. Download the latest JDK 6 installer from Oracle http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
  2. Accept the license agreement and click on the Linux x64 bin installer. The downloaded file will be named jdk-6uXX-linux-x64.bin where XX is the JDK 6 update version.
  3. Follow the following steps to install JDK 6
chmod a+x jdk-6uXX-linux-x64.bin
./jdk-6uXX-linux-x64.bin
sudo mkdir -p /usr/lib/jvm
sudo mv jdk1.6.0_XX /usr/lib/jvm/
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_XX/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_XX/bin/javac" 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
NOTE:
Android Jelly Bean (4.1.2) needs Oracle JDK 6.
The Hard Disk should have at least 30 GigaBytes of free space to complete the building of sources.
Please refer to the AOSP documentation for latest information and instructions for setting up other Ubuntu versions http://source.android.com/source/initializing.html

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

Downloading Release Software

To obtain Android Filesystem Sources follow:

cd <your work directory>
mkdir -p 4AJ.2.2; cd 4AJ.2.2
export YOUR_PATH=`pwd`
mkdir -p mydroid; cd mydroid
export MYDROID=`pwd`
repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 27.x -m RLS4AJ.2.2_JellyBean.xml
repo sync

Download AFS patch from Variscite's FTP (/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.AFS.* patches) and apply them:

cat 4AJ.2.2.VAR.DART.R10.AFS.patch | patch -p1 -d device/ti/blaze/
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.patch | patch -p1 -d device/ti/blaze/
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.tgz.patch | patch -p1 -d device/ti/proprietary-open/wl12xx/wlan
cat 4AJ.2.2.VAR.DART.R10.AFS.WL8.LIBHW.patch | patch -p1 -d hardware/libhardware_legacy/

Download Ducati binaries package from Variscite's FTP (/proprietary/DART_WL8/ducati_full_blaze.tgz) and integrate it:

$ cp ducati_full_blaze.tgz device/ti/proprietary-open/omap4/ducati_full_blaze.tgz

Copy wlan original TI binaries in place:

$ cp wlan.tgz device/ti/proprietary-open/wl12xx/wlan/wlan.tgz

To obtain Kernel & Driver Sourcesfollow:

To clone kernel source from scratch do:

cd ${YOUR_PATH}
git clone git://git.omapzoom.org/kernel/omap.git kernel/android-3.0
cd kernel/android-3.0
git checkout 1f21f8ed30c1d6abd029b67d17106042930a93d2

Download kernel patch from Variscite's FTP (/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.kernel.WL8.patch) and apply it:

cat 4AJ.2.2.VAR.DART.R10.kernel.WL8.patch | patch -p1

To obtain U-Boot Sourcesfollow:

cd ${YOUR_PATH}
git clone git://git.omapzoom.org/repo/u-boot.git u-boot
cd u-boot
git checkout 622fcfe5ae67e10598bdba8173c68717809518fc

Download U-Boot patch from Variscite's FTP (/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.uboot.patch) and apply it:

cat 4AJ.2.2.VAR.DART.R10.uboot.patch | patch -p1 

To obtain X-loader Sourcesfollow:

cd ${YOUR_PATH}
git clone git://git.omapzoom.org/repo/x-loader.git x-loader
cd x-loader
git checkout dd88047040dce4a926a6ab80e207bc757f44d648

Download X-loader patch from Variscite's FTP (/proprietary/DART_WL8/4AJ.2.2.VAR.DART.R10.xloader.patch) and apply it:

cat 4AJ.2.2.VAR.DART.R10.xloader.patch | patch -p1 

Release Content

This release has the below content - Kernel and Drivers tested with VAR-SOM-OM44 and verified with Jelly Bean UI - A9 source code for accelerating Video

Build Instructions

Setting up build environment

From your work directory (where your 4AJ.2.2 directory resides):

export YOUR_PATH=`pwd`
export MYDROID=${YOUR_PATH}/mydroid
export PATH=$PATH:${MYDROID}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
mkdir ${MYDROID}/logs
export CROSS_COMPILE=arm-eabi-
export PATH=${YOUR_PATH}/u-boot/tools:$PATH

Building U-BOOT

cd ${YOUR_PATH}/u-boot
make ARCH=arm distclean
make ARCH=arm omap4460dart_board_config    # To build u-boot for DART Board
make ARCH=arm 2>&1 |tee ${MYDROID}/logs/u-boot_make.out

Building X-LOADER

cd ${YOUR_PATH}/x-loader
make distclean	
make ARCH=arm omap4460dart_config
make ARCH=arm ift 2>&1 |tee ${MYDROID}/logs/x-loader_make.out

Building Kernel

Note: If you are building for a GP device it is recommended not to build the SMC kernel driver.
To create kernel uImage you need to add "mkimage" directory path to your "PATH" environment variable:

cd ${YOUR_PATH}/kernel/android-3.0
make ARCH=arm distclean
make ARCH=arm dart_defconfig
make ARCH=arm uImage 2>&1 |tee ${MYDROID}/logs/kernel_make.out

Building Kernel modules

make ARCH=arm modules 2>&1 |tee ${MYDROID}/logs/kernel_modules.out

Building BTFM driver

cd ${MYDROID}/hardware/ti/wpan/bluetooth-compat
export KERNEL_DIR=${YOUR_PATH}/kernel/android-3.0
export KLIB=${KERNEL_DIR}
export KLIB_BUILD=${KERNEL_DIR}
make ARCH=arm 2>&1 |tee ${MYDROID}/logs/wlan_modules.out

The above step will produce the following kernel BTFM modules: compat.ko, btwilink.ko, bnep.ko, hidp.ko, rfcomm.ko, bluetooth.ko. These modules are pushed into the /system/lib/modules directory on the flashed image.

Building Android Filesystem (AFS) with TI Codecs enabled

In the make step below use the number of cores you have available; i.e. -j4 (for 4 cores) or -j12 (for 12 cores)

cd $MYDROID
source build/envsetup.sh

Now setup platform:

lunch full_blaze-userdebug

And build Android AFS:

make clean  #(required for clean rebuild only)
make 2>&1 | tee ${MYDROID}/logs/android_make.out

Preparing Android binaries

Copy external WLAN kernel modules:

cd ${MYDROID}/out/target/product/blaze/system/lib/modules
tar xvf wlan_modules.tar.gz

Copy WLAN firmware:

cd ${MYDROID}/out/target/product/blaze/system/etc/firmware/ti-connectivity
tar xvf wlan_firmware.tar.gz

Rebuild Android

cd ${MYDROID}
make 2>&1 | tee ${MYDROID}/logs/android_make.out

Preparing eMMC images

cd ${YOUR_PATH}
mkdir -p omap4_emmc_files_omap4dart ; cd omap4_emmc_files_omap4dart
cp -f ${MYDROID}/out/host/linux-x86/bin/fastboot .
cp -f ${MYDROID}/out/host/linux-x86/bin/mkbootimg .
cp -f ${MYDROID}/out/host/linux-x86/bin/simg2img .
cp -f ${MYDROID}/out/host/linux-x86/bin/make_ext4fs .
cp -f ${YOUR_PATH}/kernel/android-3.0/arch/arm/boot/zImage .

cp -f ${YOUR_PATH}/x-loader/MLO Dart_Board_OMAP4460_GP_ES1.1_MLO .
cp -f ${YOUR_PATH}/u-boot/u-boot.bin Dart_Board_u-boot.bin .

Create img files:

cd ${YOUR_PATH}/omap4_emmc_files_omap4dart
cp -f ${MYDROID}/out/target/product/${BOARD_TYPE}/*.img .

This build should not take too much time and will re-generate a new *.img files with the modified init.rc file in it

Now from this new directory we will create the eMMC images which will be flashed using fastboot protocol (described later).

First create boot.img image using kernel image we copied previously:
Build for LCD:

$ ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 -o boot.img

Build for HDMI:

$ ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --board omap4 --cmdline "omapdss.def_disp=hdmi omapdss.hdmi_options=1920x1080" -o boot.img

Create cache partition:

$ dd if=/dev/zero of=./cache.img bs=1048510 count=128
$ mkfs.ext4 -F cache.img -L cache

Flashing the Android binaries on eMMC

Flash Android binaries using Fastboot

After the eMMC files are available you then can use the fastboot.sh script to upload binaries to your Dart Board or Dart EVM. You will need to copy the fastboot.sh script to the location of the eMMC files.

$ cd ${YOUR_PATH}/omap4_emmc_files_omap4dart
$ cp ${MYDROID}/device/ti/${BOARD_TYPE}/boot/fastboot.sh .

Connect the Dart Board or Dart EVM USB OTG port to your Linux machine and go to where the eMMC files are. Previous partitions created will be deleted and eMMC will be flashed with new u-boot and MLO. You need to boot the board and start fastboot server on the target (OMAP4 board).

   # fastboot

You should see a message such as:

    "Fastboot started..." or "Fastboot entered..."

When running the fastboot script the command should be issued as super user then run:

$ sudo ./fastboot.sh --pwd

Dart will boot up on its own with the new image in a few minutes. Until the user interface is ready for use, please avoid interrupting it by pressing any keys etc. This will detect your board and flash the images to the board.

First time flashing on eMMC

If there is no u-boot on your board's eMMC you have two options to boot Dard, using external SD card or using usbboot utility which boot Dart over USB OTG port.

Boot using external SD card:

To boot using external SD card copy u-boot.bin and MLO files to an SD card (boot partition) and then boot the target board from this external SD card by press and hold the bootselect button.

Boot using usbboot utility:

usbboot is a small utility that boot Dart over USB OTG port, it has embedded 1ndstage bootloader (MLO) and it takes u-boot.bin image file as parameter.

(pre-built binary and source code of usbboot utility can be obtained from Variscite's FTP)

To boot using usbboot,  press and hold the bootselect button, power on the board and then connect the Dart USB OTG port to Linux machine.

Then from Linux shell type:

$ sudo ./usbboot u-boot.bin

Flash eMMC

Once you boot the board, start fastboot server on the target (Dart board).

# fastboot

You should see a message such as:

    "Fastboot started..." or "Fastboot entered..."

Now from the PC execute following commands to flash MLO and u-boot to eMMC

$ sudo ./fastboot oem format
$ sudo ./fastboot flash xloader ./MLO
$ sudo ./fastboot flash bootloader ./u-boot.bin