Difference between revisions of "Android 4.0.3 ICS on DM814x (Naon)"

From DAVE Developer's Wiki
Jump to: navigation, search
m (Building Android)
(Useful links)
 
(19 intermediate revisions by the same user not shown)
Line 9: Line 9:
  
 
Texas Instruments provides the [http://www.ti.com/tool/ANDROIDSDK-SITARA Android developement kits] for the Sitara platform, but an official release for the DM814x/AM387x processor is not yet available. However, it is possible to build Android 4.0.3 Ice Cream Sandwich (ICS) for the DM814x/AM387x processor and make it run on the Naon/Maya/Dido SoMs.
 
Texas Instruments provides the [http://www.ti.com/tool/ANDROIDSDK-SITARA Android developement kits] for the Sitara platform, but an official release for the DM814x/AM387x processor is not yet available. However, it is possible to build Android 4.0.3 Ice Cream Sandwich (ICS) for the DM814x/AM387x processor and make it run on the Naon/Maya/Dido SoMs.
 +
 +
For further information on Android, please visit [[:Category:Android|Android category page]].
  
 
== Useful links ==
 
== Useful links ==
Line 16: Line 18:
 
* [http://gitorious.org/rowboat/manifest/blobs/master/rowboat-ics-ti81xx.xml Manifest file used for building]
 
* [http://gitorious.org/rowboat/manifest/blobs/master/rowboat-ics-ti81xx.xml Manifest file used for building]
 
* [http://source.android.com/source/downloading.html Downloading the source tree]
 
* [http://source.android.com/source/downloading.html Downloading the source tree]
 +
* [https://www.youtube.com/watch?v=bMv2U4gndmQ YouTube video: Android ICS running on Naon]
 +
 +
= Demo board =
 +
 +
Android 4.0.3 ICS has been built to run on the following system:
 +
 +
* Naon SOM with TI DM8148 processor
 +
* [[:Category:NaonEVB-Lite |NaonEVB-Lite ]] carrier board with custom add-on to provide display support
 +
* 800x480 LCD display (mod )
 +
* Capacitive touch screen
 +
 +
[[File:Naon-android-ics-board.jpg|thumb|none|border|500px|Android ICS on Naon - Demo board]]
  
 
= Configuring the build system =
 
= Configuring the build system =
Line 21: Line 35:
 
Please follow the [http://source.android.com/source/initializing.html instructions to initialize the build environment] and in particular [http://source.android.com/source/downloading.html download] the repo tool and the AOSP source code.
 
Please follow the [http://source.android.com/source/initializing.html instructions to initialize the build environment] and in particular [http://source.android.com/source/downloading.html download] the repo tool and the AOSP source code.
  
Please note that the required manifest file is [http://gitorious.org/rowboat/manifest/blobs/master/rowboat-ics-ti81xx.xml rowboat-ics-ti81xx.xml].
+
Please note that the required manifest file is [http://gitorious.org/rowboat/manifest/blobs/master/rowboat-ics-ti81xx.xml rowboat-ics-ti81xx.xml]. Please enter the following commands to update the source code:
 +
 
 +
<pre>
 +
repo init -u git://gitorious.org/rowboat/manifest.git -m rowboat-ics-ti81xx.xml
 +
repo sync
 +
</pre>
  
 
= Building Android =
 
= Building Android =
 +
 +
== Building the kernel ==
  
 
Assuming that '''rowboat-android''' is the directory containing the full AOSP source code:
 
Assuming that '''rowboat-android''' is the directory containing the full AOSP source code:
Line 29: Line 50:
 
* '''out/target/product/ti814xevm/''' will contain the created root file system
 
* '''out/target/product/ti814xevm/''' will contain the created root file system
  
 +
To launch Android kernel build, enter the following commands:
  
 +
<pre>
  
* '''repoICS-init.sh''' inizializza la cartella per ICS e sincronizza TUTTI i git collegati
+
umask 0002
* '''avvia.sh''' esegue il make di tutto ICS
+
export PATH=<path_to_toolchain>:$PATH
 +
export ARCH=arm
 +
export CROSS_COMPILE=arm-none-linux-gnueabi-
 +
export OUT_DIR_COMMON_BASE=<path_to_build_directory>
 +
export USE_CCACHE=1
 +
export CCACHE_DIR=<path_to_build_cache_directory>
 +
make TARGET_PRODUCT=naon OMAPES=6.x
 +
</pre>
  
 +
=== Makefile customization ===
  
** Nota: ho modificato '''Makefile''' riga 71-73 in modo che usi il file naon_ics_defconfig al posto di quello TI.
+
'''N.B''': The main '''Makefile''' must be modified at rows 71-73 so that the kernel configuration file naon_ics_defconfig is used instead of the default one.
 
<pre>
 
<pre>
 
ifeq ($(TARGET_PRODUCT), naon)
 
ifeq ($(TARGET_PRODUCT), naon)
Line 45: Line 76:
 
endif
 
endif
 
</pre>
 
</pre>
* '''build''' tutti gli script per il build di android
+
 
file modificato '''build/core/root.mk''' aggiungendo riga 13
+
== Building the RFS ==
 +
 
 +
To build the Android root file system (please note that it will take some time, depending on the host system performaces), launch the following commands:
 +
 
 +
<pre>
 +
echo "Make new RFS..."
 +
sudo make TARGET_PRODUCT=naon OMAPES=6.x fs_tarball
 +
echo "DONE!"
 +
</pre>
 +
 
 +
'''N.B''': The '''build/core/root.mk''' must be modified at row 13:
 +
 
 
<pre>
 
<pre>
 
ifeq ($(TARGET_PRODUCT), naon)
 
ifeq ($(TARGET_PRODUCT), naon)
Line 54: Line 96:
 
else
 
else
 
</pre>
 
</pre>
riga 60
+
 
 +
row 60
 +
 
 
<pre>
 
<pre>
 
endif
 
endif
 
</pre>
 
</pre>
riga 83
+
 
 +
row 83
 
<pre>
 
<pre>
 
ifeq ($(TARGET_PRODUCT), naon)
 
ifeq ($(TARGET_PRODUCT), naon)
Line 68: Line 113:
 
endif
 
endif
 
</pre>
 
</pre>
riga 114
+
 
 +
row 114
 
<pre>
 
<pre>
 
ifeq ($(TARGET_PRODUCT), naon)
 
ifeq ($(TARGET_PRODUCT), naon)
Line 74: Line 120:
 
else
 
else
 
</pre>
 
</pre>
riga 125
+
 
 +
row 125
 +
 
 
<pre>
 
<pre>
 
endif
 
endif
 
</pre>
 
</pre>
  
* '''avvia_dbg.sh''' esegue il make con le opzioni di DEBUG per il kernel
+
== Cleaning the build ==
* '''mkRFS.sh''' crea il RFS
+
 
** Nota: ho disabilitato la creazione del tar che nn server se si usa NFS. file '''build/tools/mktarball.sh'''
+
To clean the build directory and repeat the process, just remove the '''out''' directory:
* '''clean.sh''' cancella la cartella di build '''out''' in modo che il successivo make compili tutto da capo.
+
 
 +
<pre>
 +
sudo rm -rf out
 +
</pre>
  
 
= Running Android on Naon =
 
= Running Android on Naon =
 +
 +
== U-boot environment ==
 +
 +
The following u-boot environment variables must be set to run Android:
 +
 +
<pre>
 +
naon_host=evb_lite_android
 +
andrk=tftp ${loadaddr} android/uImage
 +
andrroot=<path_to_android_rootfs>
 +
andrcons=setenv bootargs ${bootargs} console=ttyO0,115200n8 androidboot.console=ttyO0 rootwait noinitrd init=/init rw earlyprintk
 +
andrmem=setenv bootargs ${bootargs} mem=364M vram=16M notifyk.vpssm3_sva=${notify_mem}
 +
andrenv-nfs=setenv bootargs root=/dev/nfs rw nfsroot=${nfsserverip}:${andrroot} panic=5 loglevel=6 rootdelay=5
 +
andrenv-mmc=setenv bootargs root=/dev/mmcblk0p1 rootfstype=ext3 loglevel=8 rootdelay=2 panic=5
 +
android=run andrk andrenv-nfs andrmem andrcons addip; bootm ${buf}
 +
android-mmc=run andrk andrenv-mmc andrmem andrcons addip; bootm ${buf}
 +
andrnand=run andrenv-mmc andrmem andrcons addip; sf probe 0:0; sf read ${loadaddr} 0x80000 0x400000; bootm ${loadaddr}
 +
</pre>
 +
 +
== Display type and resolution ==
 +
 +
Android detects the display resolution from framebuffer settings. To change the resolution, the load parameter of the vpss.ko module must be adjusted into the rc.syslink init file. Some examples are the following:
 +
 +
* for HDMI output at 1080p, the parameter is'''mode=hdmi:1080p-60,dvo2:800x480@60'''
 +
* for HDMI output at 1600x1200, the parameter is '''mode=hdmi:1600x1200@60,dvo2:800x480@60'''
 +
* for the 800x480 LCD display, the parameter is '''mode=hdmi:800x480@60,dvo2:lcd-ta1h'''
 +
 +
== Screenshots ==
 +
 +
[[File:Naon-android-ics-boot.jpg|thumb|none|border|500px|Android ICS on Naon - Boot]]
 +
 +
[[File:Naon-android-ics-desktop.jpg|thumb|none|border|500px|Android ICS on Naon - Desktop]]
 +
 +
[[File:Naon-android-ics-apps.jpg|thumb|none|border|500px|Android ICS on Naon - Apps]]
 +
 +
[[File:Naon-android-ics-info.jpg|thumb|none|border|500px|Android ICS on Naon - Info Screen]]

Latest revision as of 14:32, 29 March 2013

Info Box
Android-logo.jpg Applies to Android
Naon am387x-dm814x.png Applies to Naon
Maya 03.png Applies to Maya
Dido-main.png Applies to Dido

Introduction[edit | edit source]

Texas Instruments provides the Android developement kits for the Sitara platform, but an official release for the DM814x/AM387x processor is not yet available. However, it is possible to build Android 4.0.3 Ice Cream Sandwich (ICS) for the DM814x/AM387x processor and make it run on the Naon/Maya/Dido SoMs.

For further information on Android, please visit Android category page.

Useful links[edit | edit source]

Demo board[edit | edit source]

Android 4.0.3 ICS has been built to run on the following system:

  • Naon SOM with TI DM8148 processor
  • NaonEVB-Lite carrier board with custom add-on to provide display support
  • 800x480 LCD display (mod )
  • Capacitive touch screen
Android ICS on Naon - Demo board

Configuring the build system[edit | edit source]

Please follow the instructions to initialize the build environment and in particular download the repo tool and the AOSP source code.

Please note that the required manifest file is rowboat-ics-ti81xx.xml. Please enter the following commands to update the source code:

repo init -u git://gitorious.org/rowboat/manifest.git -m rowboat-ics-ti81xx.xml
repo sync

Building Android[edit | edit source]

Building the kernel[edit | edit source]

Assuming that rowboat-android is the directory containing the full AOSP source code:

  • kernel contains the Android kernel tree that must be patched to add Naon support
  • out/target/product/ti814xevm/ will contain the created root file system

To launch Android kernel build, enter the following commands:


umask 0002
export PATH=<path_to_toolchain>:$PATH 
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export OUT_DIR_COMMON_BASE=<path_to_build_directory>
export USE_CCACHE=1
export CCACHE_DIR=<path_to_build_cache_directory>
make TARGET_PRODUCT=naon OMAPES=6.x

Makefile customization[edit | edit source]

N.B: The main Makefile must be modified at rows 71-73 so that the kernel configuration file naon_ics_defconfig is used instead of the default one.

ifeq ($(TARGET_PRODUCT), naon)
ifeq ($(KRN_DBG),1)
	$(MAKE) -C kernel ARCH=arm naon_ics_defconfig V=1 CONFIG_DEBUG_DONT_REORDER_CODE=1
else
	$(MAKE) -C kernel ARCH=arm naon_ics_defconfig
endif
endif

Building the RFS[edit | edit source]

To build the Android root file system (please note that it will take some time, depending on the host system performaces), launch the following commands:

echo "Make new RFS..."
sudo make TARGET_PRODUCT=naon OMAPES=6.x fs_tarball
echo "DONE!"

N.B: The build/core/root.mk must be modified at row 13:

ifeq ($(TARGET_PRODUCT), naon)
export SYSLINK_VARIANT_NAME := TI814X
CLEAN_RULE := syslink_clean sgx_clean kernel_clean clean
rowboat: sgx
else

row 60

endif

row 83

ifeq ($(TARGET_PRODUCT), naon)
ifeq ($(KRN_DBG),1)
	$(MAKE) -C kernel ARCH=arm naon_ics_defconfig V=1 CONFIG_DEBUG_DONT_REORDER_CODE=1
else
        $(MAKE) -C kernel ARCH=arm naon_ics_defconfig
endif
endif

row 114

ifeq ($(TARGET_PRODUCT), naon)
sgx: kernel_build ti81xx_kernel_modules
else

row 125

endif

Cleaning the build[edit | edit source]

To clean the build directory and repeat the process, just remove the out directory:

sudo rm -rf out

Running Android on Naon[edit | edit source]

U-boot environment[edit | edit source]

The following u-boot environment variables must be set to run Android:

naon_host=evb_lite_android
andrk=tftp ${loadaddr} android/uImage
andrroot=<path_to_android_rootfs>
andrcons=setenv bootargs ${bootargs} console=ttyO0,115200n8 androidboot.console=ttyO0 rootwait noinitrd init=/init rw earlyprintk
andrmem=setenv bootargs ${bootargs} mem=364M vram=16M notifyk.vpssm3_sva=${notify_mem}
andrenv-nfs=setenv bootargs root=/dev/nfs rw nfsroot=${nfsserverip}:${andrroot} panic=5 loglevel=6 rootdelay=5
andrenv-mmc=setenv bootargs root=/dev/mmcblk0p1 rootfstype=ext3 loglevel=8 rootdelay=2 panic=5
android=run andrk andrenv-nfs andrmem andrcons addip; bootm ${buf}
android-mmc=run andrk andrenv-mmc andrmem andrcons addip; bootm ${buf}
andrnand=run andrenv-mmc andrmem andrcons addip; sf probe 0:0; sf read ${loadaddr} 0x80000 0x400000; bootm ${loadaddr}

Display type and resolution[edit | edit source]

Android detects the display resolution from framebuffer settings. To change the resolution, the load parameter of the vpss.ko module must be adjusted into the rc.syslink init file. Some examples are the following:

  • for HDMI output at 1080p, the parameter ismode=hdmi:1080p-60,dvo2:800x480@60
  • for HDMI output at 1600x1200, the parameter is mode=hdmi:1600x1200@60,dvo2:800x480@60
  • for the 800x480 LCD display, the parameter is mode=hdmi:800x480@60,dvo2:lcd-ta1h

Screenshots[edit | edit source]

Android ICS on Naon - Boot
Android ICS on Naon - Desktop
Android ICS on Naon - Apps
Android ICS on Naon - Info Screen