<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ronetix.at/index.php?action=history&amp;feed=atom&amp;title=PM9G45-Android</id>
	<title>PM9G45-Android - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ronetix.at/index.php?action=history&amp;feed=atom&amp;title=PM9G45-Android"/>
	<link rel="alternate" type="text/html" href="https://wiki.ronetix.at/index.php?title=PM9G45-Android&amp;action=history"/>
	<updated>2026-09-26T02:18:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.ronetix.at/index.php?title=PM9G45-Android&amp;diff=204&amp;oldid=prev</id>
		<title>Ilko at 06:49, 8 October 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.ronetix.at/index.php?title=PM9G45-Android&amp;diff=204&amp;oldid=prev"/>
		<updated>2021-10-08T06:49:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:49, 8 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#vardefine:HARDWARE_NAME|PM9G45}} &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;!--&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#vardefine:HARDWARE_NAME|PM9G45}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/del&gt;{{#vardefine:URL_PM9G45|[https://ronetix.at/product/pm9g45-cpu-module-with-atmel-at91sam9g45/ PM9G45]}} &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;!--&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#vardefine:URL_PM9G45|[https://ronetix.at/product/pm9g45-cpu-module-with-atmel-at91sam9g45/ PM9G45]}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/del&gt;{{#vardefine:URL_PEEDI|[https://ronetix.at/product/peedi-jtag-swd-bdm-emulator-and-flash-programmer/ PEEDI]}} &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &amp;lt;!--&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#vardefine:URL_PEEDI|[https://ronetix.at/product/peedi-jtag-swd-bdm-emulator-and-flash-programmer/ PEEDI]}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Pm9g45_top&lt;/del&gt;.png|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;PM9G45-top&lt;/ins&gt;.png|thumb]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Needed Tools =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Needed Tools =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ilko</name></author>
	</entry>
	<entry>
		<id>https://wiki.ronetix.at/index.php?title=PM9G45-Android&amp;diff=36&amp;oldid=prev</id>
		<title>Ilko: Initial import</title>
		<link rel="alternate" type="text/html" href="https://wiki.ronetix.at/index.php?title=PM9G45-Android&amp;diff=36&amp;oldid=prev"/>
		<updated>2020-08-18T10:07:42Z</updated>

		<summary type="html">&lt;p&gt;Initial import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#vardefine:HARDWARE_NAME|PM9G45}} &amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#vardefine:URL_PM9G45|[https://ronetix.at/product/pm9g45-cpu-module-with-atmel-at91sam9g45/ PM9G45]}}  &amp;lt;!--&lt;br /&gt;
--&amp;gt;{{#vardefine:URL_PEEDI|[https://ronetix.at/product/peedi-jtag-swd-bdm-emulator-and-flash-programmer/ PEEDI]}}  &amp;lt;!--&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[[File:Pm9g45_top.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
= Needed Tools =&lt;br /&gt;
=== Android source repository tool ===&lt;br /&gt;
&lt;br /&gt;
	repo(a git script) is a tool to facilitate the use of git with Android&lt;br /&gt;
	code, to install it:&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/usr/local/bin&lt;br /&gt;
 $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo &amp;gt; ~/usr/local/bin/repo&lt;br /&gt;
 $ chmod a+x ~/usr/local/bin/repo&lt;br /&gt;
 $ export PATH=$PATH:~/usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Packing Linux kernel suitable for usage by U-Boot ===&lt;br /&gt;
&lt;br /&gt;
	When building U-Boot in the tools directory a tool mkimage will be build, too. To be successful &amp;quot;make uImage&amp;quot; command from the Linux kernel tree, mkimage must be in a directory from the PATH list.&lt;br /&gt;
&lt;br /&gt;
A static executable for GNU/Linux at&lt;br /&gt;
 http://download.ronetix.at/boards/tools/linux/&lt;br /&gt;
&lt;br /&gt;
=== Serial communication or terminal emulation software ===&lt;br /&gt;
&lt;br /&gt;
	Use screen or minicom to get connected to the pm9g45 board through RS-232 port.&lt;br /&gt;
&lt;br /&gt;
=== Java JDK required version for building Android v2.1 file system is 1.5. ===&lt;br /&gt;
&lt;br /&gt;
JAVA version is required to be 1.5.&lt;br /&gt;
Get JDK 1.5.0 update 22 and execute:&lt;br /&gt;
&lt;br /&gt;
 $ export JAVA_HOME=&amp;lt;java installation path&amp;gt;&lt;br /&gt;
 $ export PATH=$JAVA_HOME/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
	If &amp;quot;undefined reference to symbol &amp;#039;dlsym@@GLIBC_2.0&amp;quot; appears&lt;br /&gt;
	take a look at [4], and add &amp;quot;LOCAL_LDLIBS += -ldl&amp;quot; before each&lt;br /&gt;
	&amp;quot;LOCAL_MODULE_TAGS := tests&amp;quot; in system/core/libacc/tests/Android.mk&lt;br /&gt;
	file.&lt;br /&gt;
&lt;br /&gt;
=== Tool for creating JFFS2 root fs file system ===&lt;br /&gt;
&lt;br /&gt;
	The needed tool mkfs.jffs2 is part of mtd-utils and mtd-tools.&lt;br /&gt;
&lt;br /&gt;
A static executable for GNU/Linux at&lt;br /&gt;
 http://download.ronetix.at/boards/tools/linux/&lt;br /&gt;
&lt;br /&gt;
= Get Android sources =&lt;br /&gt;
&lt;br /&gt;
=== Android sources ===&lt;br /&gt;
&lt;br /&gt;
	The Android codes from their primary locations can be obtained as&lt;br /&gt;
	described in http://www.at91.com/android4sam/bin/view/Android4SAM/GetAndroid&lt;br /&gt;
&lt;br /&gt;
	The working directory is assumed to be ~/usr/src/pm9g45/ and could be changed.&lt;br /&gt;
&lt;br /&gt;
	FIXME:see http://source.android.com/source/downloading.html&lt;br /&gt;
&lt;br /&gt;
 $ mkdir -p ~/usr/src/pm9g45/android&lt;br /&gt;
 $ mkdir -p ~/usr/src/pm9g45/u-boot&lt;br /&gt;
 $ mkdir -p ~/usr/src/pm9g45/linux&lt;br /&gt;
 $ cd ~/usr/src/pm9g45/android&lt;br /&gt;
 $ repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.1_r2&lt;br /&gt;
 $ cd hardware&lt;br /&gt;
 $ git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git&lt;br /&gt;
 $ cd alsa_sound&lt;br /&gt;
 $ git checkout origin/eclair&lt;br /&gt;
 $ cd ../external&lt;br /&gt;
 $ git clone git://android.git.kernel.org/platform/external/alsa-lib.git&lt;br /&gt;
 $ cd alsa-lib&lt;br /&gt;
 $ git checkout origin/eclair&lt;br /&gt;
 $ cd ..&lt;br /&gt;
 $ git clone git://android.git.kernel.org/platform/external/alsa-utils.git&lt;br /&gt;
 $ cd alsa-utils&lt;br /&gt;
 $ git checkout origin/eclair&lt;br /&gt;
&lt;br /&gt;
	The {{#var:URL_PM9G45}} BSP is based on Atmel AT91SAM9G45 port for Android.&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/usr/src/pm9g45/android/vendor&lt;br /&gt;
 $ wget http://download.ronetix.at/boards/android/v2.1/patches/Android-2.1_r2-ver1.1-ronetix-14102011.tar.bz2&lt;br /&gt;
 $ wget http://download.ronetix.at/boards/android/v2.1/patches/Android-2.1_r2-ver1.1.tar.bz2&lt;br /&gt;
 $ tar xjvf Android-2.1_r2-ver1.1.tar.bz2&lt;br /&gt;
 $ tar xjvf Android-2.1_r2-ver1.1-ronetix-14102011.tar.bz2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Toolchain =&lt;br /&gt;
&lt;br /&gt;
	Android sources comes with prebuilt toolchains and the one mentioned is used.&lt;br /&gt;
&lt;br /&gt;
 $ export CROSS_COMPILE=~/usr/src/pm9g45/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= At91bootstrap =&lt;br /&gt;
&lt;br /&gt;
	No modifications of the bootstrap required. But for some reason&lt;br /&gt;
	a change is needed see the AT91Bootstrap README. An already built bin&lt;br /&gt;
	file is ready for use(x. Pre-built images)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Bootloader =&lt;br /&gt;
&lt;br /&gt;
	U-Boot for Android usage requires no special treatment.	See U-Boot&lt;br /&gt;
	README to configure and build the boot loader if customizations are&lt;br /&gt;
	needed, else and prebuilt one can be used.(x. Pre-built images)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Linux Kernel =&lt;br /&gt;
&lt;br /&gt;
	The commands below shows how to build Linux kernel. For demo and&lt;br /&gt;
	evaluation purposes there is an prebuilt Linux kernel image file&lt;br /&gt;
	(x. Pre-built images).&lt;br /&gt;
&lt;br /&gt;
 $ wget http://download.ronetix.at/boards/linux/kernel/2.6.30/linux-2.6.30.tar.bz2&lt;br /&gt;
 $ tar xjf linux-2.6.30.tar.bz2&lt;br /&gt;
 $ cd linux-2.6.30&lt;br /&gt;
 $ git init&lt;br /&gt;
 $ git add *&lt;br /&gt;
 $ git add .gitignore .mailmap&lt;br /&gt;
 $ git commit -m &amp;quot;Initial commit after linux-2.6.30.tar.bz2 extraction&amp;quot;&lt;br /&gt;
 $ wget http://download.ronetix.at/boards/android/v2.1/patches/2.6.30-at91-exp.4-android_2.1_r2-pm9g45_v1.3-09122011.tar.bz2&lt;br /&gt;
 $ tar xjf 2.6.30-at91-exp.4-android_2.1_r2-pm9g45_v1.3-09122011.tar.bz2&lt;br /&gt;
 $ git am 2.6.30-at91-exp.4-android_2.1_r2-pm9g45_v1.3-09122011/*.patch&lt;br /&gt;
 $ export CROSS_COMPILE=~/usr/src/pm9g45/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-&lt;br /&gt;
 $ export ARCH=arm&lt;br /&gt;
 $ cp pm9g45_v1.3_android_config .config&lt;br /&gt;
 $ make oldconfig&lt;br /&gt;
&lt;br /&gt;
	To build it run:&lt;br /&gt;
&lt;br /&gt;
 $ make uImage&lt;br /&gt;
&lt;br /&gt;
	The result arch/arm/boot/uImage is to be written to the PM9G45 NAND.&lt;br /&gt;
&lt;br /&gt;
= Building Android file system =&lt;br /&gt;
&lt;br /&gt;
	In the vendor/ronetix/README file from the Android package&lt;br /&gt;
	are available these commands for reminder.&lt;br /&gt;
&lt;br /&gt;
=== Setup environment ===&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/usr/src/pm9g45/android/&lt;br /&gt;
 $ make clean&lt;br /&gt;
 $ source build/envsetup.sh&lt;br /&gt;
 $ chmod a-x vendor/atmel/cmd/partner_setup&lt;br /&gt;
 $ partner_setup pm9g45&lt;br /&gt;
 $ choosecombo device release pm9g45 eng&lt;br /&gt;
 ...&lt;br /&gt;
 ============================================&lt;br /&gt;
 PLATFORM_VERSION_CODENAME=REL&lt;br /&gt;
 PLATFORM_VERSION=2.1-update1&lt;br /&gt;
 TARGET_PRODUCT=pm9g45&lt;br /&gt;
 TARGET_BUILD_VARIANT=user&lt;br /&gt;
 TARGET_SIMULATOR=false&lt;br /&gt;
 TARGET_BUILD_TYPE=release&lt;br /&gt;
 TARGET_ARCH=arm&lt;br /&gt;
 HOST_ARCH=x86&lt;br /&gt;
 HOST_OS=linux&lt;br /&gt;
 HOST_BUILD_TYPE=release&lt;br /&gt;
 BUILD_ID=ERE27&lt;br /&gt;
 ============================================&lt;br /&gt;
&lt;br /&gt;
=== Build it ===&lt;br /&gt;
&lt;br /&gt;
	Here it takes a lot of drinks, and finally the result is&lt;br /&gt;
	at out/target/product/pm9g45&lt;br /&gt;
&lt;br /&gt;
 $ make -j4&lt;br /&gt;
&lt;br /&gt;
=== Pack the images in file for writing to the target ===&lt;br /&gt;
&lt;br /&gt;
 $ cd ~/usr/src/pm9g45/android/&lt;br /&gt;
 $ _C_PWD=`pwd`&lt;br /&gt;
 $ cd out/target/product/pm9g45&lt;br /&gt;
 $ cp -T system root/system -r&lt;br /&gt;
 $ chmod 0777 root/ -R&lt;br /&gt;
 $ mkfs.jffs2 -l -s 0x800 -e 0x20000 -p 0x4000000 -d root/ -o pm9g45-android.jffs2 -n -q&lt;br /&gt;
 $ cd $_C_PWD&lt;br /&gt;
 $ unset _C_PWD&lt;br /&gt;
&lt;br /&gt;
	Move the pm9g45-android.jffs2 file in a TFTP/FTP reachable place &lt;br /&gt;
	or SD card to be programmed faster with {{#var:URL_PEEDI}}. SAM-BA v2.10 can be&lt;br /&gt;
	used to program the file system, too.&lt;br /&gt;
&lt;br /&gt;
	RootFS to be written at 0x500000 with JFFS2 OOB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Burning images =&lt;br /&gt;
&lt;br /&gt;
	In case you compile all the sources the produced files will be:&lt;br /&gt;
&lt;br /&gt;
* AT91Bootstap	- binaries/pm9g45-nandflashboot-2.13.bin&lt;br /&gt;
* U-Boot		- u-boot.bin&lt;br /&gt;
* Linux kernel	- arch/arm/boot/uImage&lt;br /&gt;
* Android		- out/target/product/pm9g45/pm9g45-android.jffs2&lt;br /&gt;
&lt;br /&gt;
	The files are given with respect from the place the build command is&lt;br /&gt;
	issued. If you use the demo prebuilt images, their list is in the&lt;br /&gt;
	prebuilt images topic.&lt;br /&gt;
&lt;br /&gt;
=== Using SAM-BA v2.10 ===&lt;br /&gt;
&lt;br /&gt;
	TODO: SAM-BA build instructions.&lt;br /&gt;
&lt;br /&gt;
=== Using {{#var:URL_PEEDI}} flash programmer ===&lt;br /&gt;
&lt;br /&gt;
	Flash Section 0 and 1 have to be with OOB Info set to FF,&lt;br /&gt;
	but flash sections 2 and 3 must be with OOB Info set to JFFS2.&lt;br /&gt;
&lt;br /&gt;
 PEEDI&amp;gt; f s 0&lt;br /&gt;
 PEEDI&amp;gt; f e ; Erase the whole NAND with 0xFF set in the spare area&lt;br /&gt;
 PEEDI&amp;gt; f p pm9g45-nandflashboot-2.13.bin bin 0x0&lt;br /&gt;
 PEEDI&amp;gt; f s 1&lt;br /&gt;
 PEEDI&amp;gt; f p u-boot.bin bin 0x20000 erase&lt;br /&gt;
 PEEDI&amp;gt; f s 2&lt;br /&gt;
 PEEDI&amp;gt; f p uImage bin 0x200000 erase&lt;br /&gt;
 PEEDI&amp;gt; f s 3&lt;br /&gt;
 PEEDI&amp;gt; f p pm9g45-android.jffs2 bin 0x500000 erase&lt;br /&gt;
&lt;br /&gt;
	If you wish to waste the data saved by Android, play the next two&lt;br /&gt;
	commands:&lt;br /&gt;
&lt;br /&gt;
 PEEDI&amp;gt; f s 0&lt;br /&gt;
 PEEDI&amp;gt; f e 0x2780000 0x10000000&lt;br /&gt;
&lt;br /&gt;
= Initial run =&lt;br /&gt;
&lt;br /&gt;
	After the program completes unplug the power cord, then&lt;br /&gt;
	detach the JTAG cable or in PEEDI run &amp;quot;ta de&amp;quot;, plug the Ethernet&lt;br /&gt;
	and RS-232 cable and finally plug the power cord.&lt;br /&gt;
&lt;br /&gt;
	The first run will take around 2 minutes.&lt;br /&gt;
&lt;br /&gt;
= Applications Developing =&lt;br /&gt;
&lt;br /&gt;
	Here are some specifics for Android applications:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;dx&amp;quot; which allows to convert Java Class files into &amp;quot;dex&amp;quot; (Dalvik Executable) files.&lt;br /&gt;
* Android applications are packed into an .apk (Android Package) file by the program &amp;quot;aapt&amp;quot; (Android Asset Packaging Tool)&lt;br /&gt;
* To simplify development Google provides the Android Development Tools (ADT) for Eclipse&lt;br /&gt;
* ADT from the URL https://dl-ssl.google.com/android/eclipse/ and requires &amp;quot;org.eclipse.jdt&amp;quot; to be installed.&lt;br /&gt;
* Android supports 2-D and 3-D graphics using the OpenGL libraries and supports data storage in a SQLite database.&lt;br /&gt;
* Every Android applications runs in its own process and under its own user id which is generated automatically by the Android system during deployment.&lt;br /&gt;
* Steps to instal the Andoid SDK http://developer.android.com/sdk/installing.html&lt;br /&gt;
* Insrall JDK plugin for Eclipse Helios: In &amp;quot;Install new window&amp;quot; enter &amp;quot;Helios-http://download.eclipse.org/releases/helios/&amp;quot; then hit enter. From the list select &amp;quot;Eclipse IDE for Java Developers&amp;quot; and &amp;quot;Eclipse Java Development Tools&amp;quot;&lt;br /&gt;
* Each application must be signed in order to be accepted by Android, even the applications in the developing phase must be signed with the standard debugkey to be uploaded on the target. The target have to be enabled to accept debuggable applications. Signing and building noted here http://developer.android.com/guide/developing/building/building-cmdline.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Android Compatible devices =&lt;br /&gt;
&lt;br /&gt;
	Even though the software is open-source, device manufacturers cannot use&lt;br /&gt;
	Google&amp;#039;s Android trademark unless Google certifies that the device&lt;br /&gt;
	complies with their Compatibility Definition Document (CDD). Devices&lt;br /&gt;
	must also meet this definition to be eligible to license Google&amp;#039;s&lt;br /&gt;
	closed-source applications, including the Android Market.&lt;br /&gt;
&lt;br /&gt;
 http://source.android.com/compatibility/index.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Tip and tricks =&lt;br /&gt;
=== LCD Resolution ===&lt;br /&gt;
&lt;br /&gt;
	For a custom screen edit file &amp;quot;common/packages/apps/Calibrate/src/com/android/calibrate/AndroidCalibrate.java&amp;quot;&lt;br /&gt;
	locate where UI_SCREEN_&amp;lt;WIDTH and HEIGHT&amp;gt; are set and modify them.&lt;br /&gt;
&lt;br /&gt;
=== Modifying ramdisk.img ===&lt;br /&gt;
&lt;br /&gt;
	When building the Android file system a three img files are produced&lt;br /&gt;
	in the out/target/product/pm9g45/ directory:&lt;br /&gt;
	ramdisk.img wich contains the root/ directory,&lt;br /&gt;
	system.img which is the same as system/ directory and&lt;br /&gt;
	userdata.img which is data/ directory.&lt;br /&gt;
	Crating the file system for pm9g45 is descried above.&lt;br /&gt;
&lt;br /&gt;
	extract:&lt;br /&gt;
 $ gnucpio -iz -F ramdisk.img&lt;br /&gt;
&lt;br /&gt;
	create:&lt;br /&gt;
 gnucpio -i -t -F ../ramdisk.img | gnucpio -o -H newc -O ../rootfs.img&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BB9G45 button functions ===&lt;br /&gt;
&lt;br /&gt;
	A list of Android KeyEvents is lested at&lt;br /&gt;
* http://developer.android.com/reference/android/view/KeyEvent.html&lt;br /&gt;
&lt;br /&gt;
	A kaymap table can be found:&lt;br /&gt;
* out/target/product/pm9g45/system/usr/keylayout/qwerty.kl&lt;br /&gt;
&lt;br /&gt;
	The SW3 and SW4 buttons are defined as:&lt;br /&gt;
 KEY_MENU is SW4&lt;br /&gt;
 KEY_BACK is SW3&lt;br /&gt;
&lt;br /&gt;
=== How to Unlock the Screen ===&lt;br /&gt;
&lt;br /&gt;
	Press a SW3 or SW4 then drag the lock icon over the yellow-green spot&lt;br /&gt;
	next to the other end.&lt;br /&gt;
&lt;br /&gt;
=== IP over Ethernet ===&lt;br /&gt;
&lt;br /&gt;
	The software gets IP over Ethernet if the cable is attached.&lt;br /&gt;
	The board IP can be seen by executing the following command on the&lt;br /&gt;
	board serial console.&lt;br /&gt;
&lt;br /&gt;
 $ ifconfig eth0&lt;br /&gt;
 eth0: ip 192.168.10.88 mask 255.255.255.0 flags [up broadcast running multicast]&lt;br /&gt;
&lt;br /&gt;
	This IP is used to attach ADB to the board.&lt;br /&gt;
&lt;br /&gt;
	There is an errors in the way the DHCP is processed, so take a look at&lt;br /&gt;
	&amp;quot;13.1. Enabling the DNS service&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== IP over USB0 ===&lt;br /&gt;
&lt;br /&gt;
	Connect the J3 USB device port of the target to the USB port of the host&lt;br /&gt;
	computer. On the host a CDC Ethernet Device driver have to be available.&lt;br /&gt;
&lt;br /&gt;
	Set the IP of the target:&lt;br /&gt;
&lt;br /&gt;
		# ifconfig usb0 192.168.0.200 netmask 255.255.255.0 up&lt;br /&gt;
&lt;br /&gt;
	Set the IP of the host and connect to the target:&lt;br /&gt;
&lt;br /&gt;
		# ifconfig usb0 192.168.0.1 netmask 255.255.255.0 up&lt;br /&gt;
		# adb connect 192.168.0.200:5555&lt;br /&gt;
&lt;br /&gt;
=== Android Debug Bridge ===&lt;br /&gt;
&lt;br /&gt;
	This mechanism gives easy to push(put) and pull(get) files from the target memory, provides command shell access, Eclipse ADT plugin easy software developing and getting the Android stack log on the host computer.&lt;br /&gt;
&lt;br /&gt;
	The command &amp;quot;adb devices&amp;quot; shows the already connected devices if any, this command do not make connection to the device even through USB.&lt;br /&gt;
	To connect to a device use &amp;quot;adb connect &amp;lt;device IP here&amp;gt;&amp;quot;. Where &amp;lt;device&lt;br /&gt;
	IP here could be IP over Ethernet or over USB.&lt;br /&gt;
&lt;br /&gt;
 # export PATH=$PATH:~/usr/src/pm9g45/android/out/host/linux-x86/bin/&lt;br /&gt;
 # adb connect 192.168.10.88:5555&lt;br /&gt;
 * daemon not running. starting it now *&lt;br /&gt;
 * daemon started successfully *&lt;br /&gt;
&lt;br /&gt;
		connected to 192.168.10.88:5555&lt;br /&gt;
 # adb devices&lt;br /&gt;
		List of devices attached &lt;br /&gt;
 192.168.10.88:5555      device&lt;br /&gt;
 # adb shell&lt;br /&gt;
&lt;br /&gt;
=== Android log ===&lt;br /&gt;
&lt;br /&gt;
	The Linux kernel log can be seen as running &amp;quot;dmesg&amp;quot; command in the&lt;br /&gt;
	Android shell. Android stack logs useful for testing and debug can be&lt;br /&gt;
	shown with &amp;quot;catlog&amp;quot; command from the target command shell or with&lt;br /&gt;
	&amp;quot;adb logcat&amp;quot; from the host computer.&lt;br /&gt;
&lt;br /&gt;
=== Micro SD card ===&lt;br /&gt;
&lt;br /&gt;
	The Micro SD card must be formatted with FAT16 file system.&lt;br /&gt;
	On GNU/Linux host you can use mkdosfs like this:&lt;br /&gt;
&lt;br /&gt;
 $ mkdosfs /dev/sdc1&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
&lt;br /&gt;
	asound.conf and asound.state and asla_amixer names differ.&lt;br /&gt;
	Using &amp;quot;alsa_amixer&amp;quot; you will get the below names to set the sound.&lt;br /&gt;
&lt;br /&gt;
 # alsa_amixer set &amp;#039;Master&amp;#039; 100&lt;br /&gt;
 # alsa_amixer set &amp;#039;Master Playback ZC&amp;#039; unmute&lt;br /&gt;
 # alsa_amixer set &amp;#039;Sidetone&amp;#039; 0&lt;br /&gt;
 # alsa_amixer set &amp;#039;Line&amp;#039; nocap&lt;br /&gt;
 # alsa_amixer set &amp;#039;Mic&amp;#039; cap&lt;br /&gt;
 # alsa_amixer set &amp;#039;Mic Boost (+20dB)&amp;#039; mute&lt;br /&gt;
 # alsa_amixer set &amp;#039;Playback De-emphasis&amp;#039; &amp;#039;32Khz&amp;#039;&lt;br /&gt;
 # alsa_amixer set &amp;#039;Capture&amp;#039; 31&lt;br /&gt;
 # alsa_amixer set &amp;#039;ADC High Pass Filter&amp;#039; unmute&lt;br /&gt;
 # alsa_amixer set &amp;#039;Input Mux&amp;#039; &amp;#039;Mic&amp;#039;&lt;br /&gt;
 # alsa_amixer set &amp;#039;Output Mixer HiFi&amp;#039; unmute&lt;br /&gt;
 # alsa_amixer set &amp;#039;Output Mixer Line Bypass&amp;#039; mute&lt;br /&gt;
 # alsa_amixer set &amp;#039;Store DC Offset&amp;#039; unmute&lt;br /&gt;
&lt;br /&gt;
	Then do &amp;quot;asla_ctl store -f asound.state&amp;quot;, next take the slightly changed&lt;br /&gt;
	names and correct asound.conf. In asound.state are listed parameters&lt;br /&gt;
	ranges and it allowable values.&lt;br /&gt;
&lt;br /&gt;
=== Recalibrate touch screen from command line ===&lt;br /&gt;
&lt;br /&gt;
 # ps&lt;br /&gt;
 USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
 # kill &amp;quot;here put the PID of com.android.calibrate&amp;quot;&lt;br /&gt;
 # rm /data/etc/pointercal &lt;br /&gt;
 # am start -a android.intent.action.MAIN -n com.android.calibrate/.AndroidCalibrate &lt;br /&gt;
&lt;br /&gt;
= Errata, bugs and uncouth =&lt;br /&gt;
=== Enabling the DNS service ===&lt;br /&gt;
&lt;br /&gt;
	FIXME: DNS and IP address equivalently in getprop and netcfg after&lt;br /&gt;
	running &amp;quot;netcfg eth0 dhcp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
	On the first boot the IPs set on eth0 and on dhcp.eth0.ipaddress are&lt;br /&gt;
	the same, but the DNS server is not set(host names are unresolvable).&lt;br /&gt;
&lt;br /&gt;
	To set the DNS server do these commands in the Android stack console:&lt;br /&gt;
&lt;br /&gt;
 $ getprop dhcp.eth0.dns1&lt;br /&gt;
 192.168.10.1&lt;br /&gt;
 $ setprop net.dns1 192.168.10.1&lt;br /&gt;
&lt;br /&gt;
	Note that if the dhcp service is taken again with the next two commnds&lt;br /&gt;
	the IP addresses shown by ipconfig and in dhcp.eth0.ipaddress will&lt;br /&gt;
	differ, also the DNS server have to be set if it defers from the&lt;br /&gt;
	previous one.&lt;br /&gt;
&lt;br /&gt;
 $ netcfg eth0 up&lt;br /&gt;
 $ netcfg eth0 dhcp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The initial logo of Atmel is not shown properly ===&lt;br /&gt;
&lt;br /&gt;
= Pre-built images =&lt;br /&gt;
&lt;br /&gt;
	A set of images which are ready to use for demo and evaluation purposes.&lt;br /&gt;
; AT91BootStrap&lt;br /&gt;
: http://download.ronetix.at/boards/linux/bootstrap/nandflashboot/pm9g45-nandflashboot-2.13.bin&lt;br /&gt;
&lt;br /&gt;
;U-Boot&lt;br /&gt;
: http://download.ronetix.at/boards/android/v2.1/u-boot-pm9g45_v1.3-android_v2.1.bin&lt;br /&gt;
&lt;br /&gt;
; Linux kernel&lt;br /&gt;
: http://download.ronetix.at/boards/android/v2.1/uImage-pm9g45_v1.3-andoird_v2.1&lt;br /&gt;
&lt;br /&gt;
; Andoid RootFS&lt;br /&gt;
: http://download.ronetix.at/boards/android/v2.1/pm9g45_v1.3-android_v2.1-rootfs.jffs2&lt;br /&gt;
&lt;br /&gt;
= Build environment in Virtual Machine =&lt;br /&gt;
&lt;br /&gt;
	The provided VM(virtual machine) environment has the ARM toolchain, &lt;br /&gt;
	AT91Bootstrap, U-Boot, Linux kernel and Android stuff. The purpose is to&lt;br /&gt;
	test, easy try,&lt;br /&gt;
&lt;br /&gt;
	The VM image and its companian manuals can de dowloaded from [5].&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&lt;br /&gt;
	Articles, documents used to write this text.&lt;br /&gt;
&lt;br /&gt;
*[1] ftp://ftp.linux4sam.org/pub/Android4SAM/9m10g45/v1.1/patches/Android-2.1_r2-ver1.1.tar.bz2&lt;br /&gt;
*[2] http://wiki.openmoko.org/wiki/Android_usage&lt;br /&gt;
*[3] http://www.vogella.de/articles/Android/article.html&lt;br /&gt;
*[4] https://bugzilla.redhat.com/show_bug.cgi?format=multiple&amp;amp;id=593947&lt;br /&gt;
*[5] http://download.ronetix.at/vmware/&lt;br /&gt;
*[6] http://source.android.com/source/downloading.html&lt;/div&gt;</summary>
		<author><name>Ilko</name></author>
	</entry>
</feed>