NexusQ

From OMAPpedia

Jump to: navigation, search

Contents

[edit] Flashing Android

[edit] Get prebuilt binaries

Download Android binaries boot.img, system.img and userdata.img here

[edit] Getting to fastboot mode

You need to enter your Q into fastboot mode. You can do that using adb:

$ adb reboot-bootloader

or using the following trick:

[edit] Burn the images on Q

Warning
Flashing your Nexus Q will erase the original firmware. Don't do that unless you absolutely sure

This assumes you have paths to the adb and fastboot set up properly. If you build your own Android images, see section #Setting up environment variables. Alternatively, you can install Android SDK which has those tools under platform/tools.

$ sudo fastboot flash boot /boot.img
$ sudo fastboot flash userdata /userdata.img
$ sudo fastboot flash system /system.img
$ sudo fastboot reboot


Here

is either ~/mydroid/out/target/product/steelhead or directory contains downloaded binary images.

After reboot full android should come up. It supports video/audio output to HDMI, input using USB mice and keyboards connected to USB-On-The-Go Adapter. No Bluetooth, Wifi, NFC, sound amplifier support yet.

In order to get Ethernet up you hav to issue:

$ adb root
$ adb shell netcfg eth0 dhcp

[edit] Building Android

[edit] Downloading ASOP – Jellybean code

See detailed instructions on http://source.android.com/source/downloading.html

First, install android source code management tool:

$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl  > ~/bin/repo
$ chmod a+x ~/bin/repo

When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:

$ export HTTP_PROXY=http://:@:
$ export HTTPS_PROXY=http://:@:

Getting Android source code:

$ mkdir mydroid
$ cd mydroid
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo sync -j 4

Install necessary packages (Ubuntu):

# sudo apt-get install gperf xsltproc zlib1g:i386 gcc-multilib libxml2-utils

[edit] Get Android device definition for Q

Download device files from here.

$ cd mydroid/device/google
$ mkdir steelhead
$ cd steelhead
$ tar -xzvf /android.steelhead.tar.gz

[edit] Get DOMX

$ cd mydroid/hardware/ti
$ git clone git://git.omapzoom.org/platform/hardware/ti/domx.git
$ cd domx
$ git checkout -b local origin/jb-release

[edit] Get binary drivers

Graphics drivers should be obtained prior to building Android images

$ cd mydroid/device/ti
$ git clone git://git.omapzoom.org/device/ti/proprietary-open.git
$ cd proprietary-open
$ git checkout -b local origin/jb-release
$ git reset --hard 14109844cc22d0ee512d569a09825a0404400079

[edit] Apply patches

[edit] Bundled kernel headers

$ cd mydroid/bionic
$ git fetch http://review.omapzoom.org/platform/bionic refs/changes/89/26989/1 && git cherry-pick FETCH_HEAD

[edit] Ion library

$ cd mydroid/system/core
$ git fetch http://review.omapzoom.org/platform/system/core refs/changes/88/26988/1 && git cherry-pick FETCH_HEAD

[edit] DOMX

$ cd mydroid/hardware/ti/omap4xxx/domx
$ git fetch http://review.omapzoom.org/platform/hardware/ti/omap4xxx refs/changes/90/26990/1 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/platform/hardware/ti/omap4xxx refs/changes/91/26991/2 && git cherry-pick FETCH_HEAD

[edit] Base framework

$ cd mydroid/frameworks/base
$ git fetch http://review.omapzoom.org/platform/frameworks/base refs/changes/41/28341/1 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/platform/frameworks/base refs/changes/42/28342/2 && git cherry-pick FETCH_HEAD

[edit] Set up environment variables

$ cd ~/mydroid
$ source build/envsetup.sh
$ setpaths
$ lunch full_steelhead-userdebug

[edit] Build Android images

Set up variables

$ cd ~/mydroid
$ make -j12

After build successfully finished you will have all the images under out/target/product/steelhead. You can flash them as described in #Burn the images on Q.

[edit] Builing Linux kernel

Android device definition includes prebuilt kernel so this step is optional.

The Kernel is built using Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux version. This tool chain can be obtained from here.

[edit] Clone TI android 3.0 kernel

$ mkdir ~/mydroid/kernel
$ cd ~/mydroid/kernel
$ git clone git://git.omapzoom.org/kernel/omap.git
$ cd omap/
$ git checkout -b local origin/p-android-omap-3.0
$ git reset --hard a2d5b450b00fd71309d447eb63fa5591ed7bfa07

[edit] Apply patches on kernel

$ cd ~/mydroid/kernel/omap
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/12/26512/7 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/13/26513/8 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/14/26514/10 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/92/26792/10 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/34/27034/9 && git cherry-pick FETCH_HEAD
$ git fetch http://review.omapzoom.org/kernel/omap refs/changes/31/27231/3 && git cherry-pick FETCH_HEAD

[edit] Build kernel

$ export PATH=$PATH:/arm-2010q1/bin
$ cd ~/mydroid/kernel/omap
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- steelhead_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage

The kernel we just build has not gone in Android yet. Make sure you have the paths set as for Android build. Use the same shell prompt or issue:

$ cd ~/mydroid/
$ source build/envsetup
$ lunch full_steelhead-userdebug

Copy kernel to where android results are placed:

$ cp ~/mydroid/kernel/omap/arch/arm/boot/zImage $OUT/kernel

[edit] Do and incremental build so that the zImage goes into boot.img

$ # environment should be set for android build
$ cd ~/mydroid
$ make -j12
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox