VAR-SOM-OM44 Android-JB RN WL8: Difference between revisions
Line 122: | Line 122: | ||
<pre>$ 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> | </pre> | ||
=== Building BTFM driver === | === Building BTFM driver === | ||
<pre>$ cd ${MYDROID}/hardware/ti/wpan/bluetooth-compat | <pre>$ cd ${MYDROID}/hardware/ti/wpan/bluetooth-compat |
Revision as of 08:47, 6 October 2015
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 VAR-SOM-OM44
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 in [1].
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 $ sudo apt-get install lib32readline5-dev libstdc++6 lib32z1 lib32z1-dev ia32-libs g++-multilib libx11-dev libncurses5-dev uboot-mkimage
Install Java SE 6 JDK from Oracle.
http://www.oracle.com/technetwork/java/javase/downloads/index.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 (/Software/Android/4AJ.2.2.VAR.R4/4AJ.2.2.VAR.R4.AFS.patch) and apply it:
$ cat 4AJ.2.2.VAR.R4.AFS.patch | patch -p1 -d device/ti/blaze/ $ cat 4AJ.2.2.VAR.R4.AFS.WL8 | 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 (/Software/Android/4AJ.2.2.VAR.R4/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: (/Software/Android/4AJ.2.2.VAR.R4/wlan.tgz) and integrate it:
$ cp wlan.tgz device/ti/proprietary-open/wl12xx/wlan/wlan.tgz
To obtain Kernel & Driver Sources follow:
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 (/Software/Android/4AJ.2.2.VAR.R4/4AJ.2.2.VAR.R4.kernel.patch) and apply it:
$ cat 4AJ.2.2.VAR.R4.kernel.patch | patch -p1
To obtain U-Boot Sources follow:
$ cd ${YOUR_PATH} $ git clone git://git.omapzoom.org/repo/u-boot.git u-boot $ cd u-boot $ git checkout 90d3cc4479e5c54963d2bb80ed3e7dfeb7ad81b5
Download U-Boot patch from Variscite's FTP (/Software/Android/4AJ.2.2.VAR.R4/4AJ.2.2.VAR.R4.uboot.patch) and apply it:
$ cat 4AJ.2.2.VAR.R4.uboot.patch | patch -p1
To obtain X-loader Sources follow:
$ cd ${YOUR_PATH} $ git clone git://git.omapzoom.org/repo/x-loader.git x-loader $ cd x-loader $ git checkout 835089cdb52288fcf1ca2f14018ae756842be724
Download X-loader patch from Variscite's FTP (/Software/Android/4AJ.2.2.VAR.R4/4AJ.2.2.VAR.R4.xloader.patch) and apply it:
$ cat 4AJ.2.2.VAR.R4.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=${MYDROID}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- $ export PATH=${YOUR_PATH}/u-boot/tools:$PATH
Building U-BOOT
$ cd ${YOUR_PATH}/u-boot $ make distclean $ make ARCH=arm omap4430panda_config $ 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 omap4430sdp_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 var-som-om4460_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
The following binaries are required by the VAR-SOM-OM44 board. This step will prepare a directory, called myfs, containing all necessary Android files that you
must include within your SD card.
$ export BOARD_TYPE="blaze" $ cd ${MYDROID}/out/target/product/${BOARD_TYPE} $ mkdir -p system/lib/modules $ find ${MYDROID}/hardware/ti/wlan/mac80211/compat_wl12xx -name \*.ko |while read f; do cp $f system/lib/modules/; done $ find ${MYDROID}/hardware/ti/wpan/bluetooth-compat -name \*.ko |while read f; do cp $f system/lib/modules/; done $ cd ${YOUR_PATH} $ mkdir -p myfs_var_som_om44 ; cd myfs_var_som_om44 $ cp -Rfp ${MYDROID}/out/target/product/${BOARD_TYPE}/root/ . $ cp -Rfp ${MYDROID}/out/target/product/${BOARD_TYPE}/system/ . $ cp -Rfp ${MYDROID}/out/target/product/${BOARD_TYPE}/data/ . $ cp -f ${YOUR_PATH}/u-boot/u-boot.bin . $ cp -f ${YOUR_PATH}/kernel/android-3.0/arch/arm/boot/zImage . $ cp -f ${YOUR_PATH}/x-loader/MLO . $ cp -f ${MYDROID}/out/host/linux-x86/bin/mkbootimg . $ cp -f ${MYDROID}/device/ti/blaze/mksdcard.sh . $ chmod +x mksdcard.sh $ chmod 644 root/init.rc root/default.prop root/init.var-som-om4460.rc root/init.var-som-om4460.usb.rc root/init.usb.rc root/init.trace.rc root/ueventd.rc root/ueventd.var-som-om4460.rc $ chmod 644 system/lib/modules/*.ko system/build.prop
Create Bootabale SD Card
The SD card burning is done by 'mksdcard.sh' script using Linux machine.
Insert an SD card into USB adapter and take a look of how the SD card is detected by the kernel.
Usage:
$ sudo ./mksdcard.sh --dev=<SD-Card device> [--bootargs=<kernel bootargs>]
For example, if SD card is detected as /dev/sdb the the accurate commands is:
sudo ./mksdcard.sh --dev=/dev/sdb --bootargs='console=ttyO2,115200n8 mem=1G vmalloc=768M androidboot.console=ttyO2 omap_wdt.timer_margin=30'
To enable the HDMI output the accurate commands is:
sudo ./mksdcard.sh --dev=/dev/sdb --bootargs='console=ttyO2,115200n8 mem=1G vmalloc=768M androidboot.console=ttyO2 omap_wdt.timer_margin=30 omapdss.def_disp=hdmi omapdss.hdmi_options=1920x1080'
U-Boot Args
After completing either of the above sections to create a bootable SD-Card
Plug your SD-Card to VAR-SOM-OM44 Micro-SD slot(on SOM) and boot device.
when u-boot prompts in terminal enter the below u-boot args:
set ethaddr F8:DC:7A:11:22:33 set ethaddr_smsc F8:DC:7A:11:22:34 setenv console console=ttyO2,115200n8 androidboot.console=ttyO2 setenv memory mem=448M@0x80000000 mem=512M@0xA0000000 setenv rootfs root=/dev/mmcblk0p2 rw rootdelay=2 init=/init setenv vmem vram="48M" omapfb.vram=0:32M setenv display omapdss.def_disp=lcd consoleblank=0 setenv ethconf ip=off eth.ks8851=${ethaddr} setenv bootargs ${console} ${memory} ${rootfs} ${vmem} ${display} $(ethconf) setenv bootcmd booti mmc0 save
Android ADB Setup
Android Debug Bridge (adb) is a versatile tool that let you manage the state of the Android-powered device.
For more information about how to setup ADB adb, see TI ADB Setup page at http://processors.wiki.ti.com/index.php/Android_ADB_Setup.
NOTE: When using adb over USB on Windows Machine, edit android_winusb.inf to match VAR-SOM-OM44 vendor and product ids, under [Google.NTx86] section add:
- VAR-SOM-AM44
%SingleAdbInterface% = USB_Install, USB\VID_0451&PID_D109
%CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D109&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D109&MI_02