Forums Added for the Oppo R5, Oppo N3, and Xiaomi Redmi Note

Just yesterday, Oppo unveiled a pair of rather unique smartphones, the Oppo … more

How to Play Music From Android Wear – XDA TV

Yesterday, we showed you how to do some advanced things with your Moto 360 quite easily … more

Google Updates Play Games, Wallet, Docs, Sheets, Slides, Drive, Google+, and Camera

While we haven’t really had much in the way of … more

Google Execs Talk to Ars About Android 5.0 Lollipop

Android 5.0 Lollipop is right around the corner, and it’s expected to hit AOSP … more
Post Reply

Android/Linux for PXA312 (Omnia)

OP us1111

30th September 2008, 10:55 AM   |  #1  
OP Senior Member
Thanks Meter: 2
 
180 posts
Join Date:Joined: Jun 2007
More
Complete steps for booting the android linux kernel (updates follow as we progress):


Install Dev Environment:

apt-get install linux-headers-$(uname -r) gcc make kernel-package libncurses5-dev fakeroot wget bzip2 git-svn curl

Download Cross Compiler
http://www.codesourcery.com/sgpp/lit...tal/release642

Select: GNU/Linux (and then Advanced Packages / IA32 GNU/Linux TAR)


Download and Unpack Cross Compiler
(http://www.codesourcery.com/sgpp/lit...ux-gnu.tar.bz2)

# wget http://www.codesourcery.com/sgpp/lit...ux-gnu.tar.bz2
# cd /usr/local ; tar -xjvf /tmp/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

Download Kernel (Thans to Oliver Ford!)
# git clone http://www.oliford.co.uk/hpipaq214/ipaq214.git v4

Change in Makefile:

# vi /ANDROID/v4/Makefile
Code:
ARCH ?= arm
CROSS_COMPILE ?= /usr/local/xscale/arm-2008q3/bin/arm-none-linux-gnueabi-
Adjust resolution (Thanks to z720!)
open the /arch/arm/mach-pxa/hpipaq214-lcd.c and change the folowing parameters:

Code:
.xres = 240 
.yres = 400
.pixclock = 96153.

Compile kernel:
make Image

The compiled and with Haret runable image will be in "arch/arm/boot/Image"

Download Haret (I used the PXA312 version from Oliver Ford from www.handhelds.com)

http://www.oliford.co.uk/hpipaq214/f...q214-aug08.exe

Change Haret Settings (default.txt)

Code:
set kernel "Image"
Set ramaddr 0xa0000000
Set RAMSIZE 0x04000000
Set cmdline "root=179:2 rootdelay=3 rw init=/sbin/init"
Set mtype 1653
Set kernelcrc 0
Set fbduringboot 1
Set forcefbduringboot 1

Bootlinux

Booting.....

If you copy the compiled Image to the directory in which you placed Haret, you should be off, the kernel will boot.. Mind you, this is just the booting kernel, the hard work will start from here!


Thanx for the picture z720!

Cross Compile busybox with static linking:

cd busybox-1.13.2/

Change Makefile to have the cross compiler active again:

Code:
ARCH            ?= arm
CROSS_COMPILE   ?= /usr/local/arm-2008q3/bin/arm-none-linux-gnueabi-
Make the static busybox (make menuconfig first and disable all non wanted busybox commands, leave ash, init, rclinux and telnetd active for later use!):

# LDFLAGS="--static" CFLAGS="--static" make
# file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped

Copy the busybox to the new initrd directory:

# cp busybox /ANDROID/initrd
# cd /ANDROID/initrd

# ln -s busybox init
# ln -s busybox ash
# ln -s busybox rclinux
# mkdir dev; mkdir sys ; mkdir proc
# cp -dpr /dev/ttys1 /dev/ttys2 /dev/ttys3 /dev/ttys4 /ANDROID/initrd/dev

Make the initrd.gz ramdisk fromout the initrd directory
# find . | cpio --create --'format=newc' | gzip >../initrd.gz

Copy it to the directory in which the kernel is placed...

Change default.txt cmdline:
Code:
Set cmdline "root=/dev/ram0 ramdisk_size=8192 rootdelay=5 rootwait rw init=/ash lpj=loops_per_jiffy boot_delay=100"

Boot and see why we need a keyboard now Next step is maybe auto configure network and start telnetd in the ramdisk










[OLD]
Hi, I read the thread about running Android on the Kaiser and was very interested to get at least a linux kernel running on my phone.. However no luck..

Well.. Tried to compile the kernel for this specific architecture (PXA312) with the gnueabi toolchain. The android kernel compiled fine with some minor changes. After that, i tried to start the kernel with HaRET but could not get it to start. I cannot determine the RAMADDR and the mtype for the omnia.

http://www.arm.linux.org.uk/developer/machines/
http://www.codesourcery.com/gnu_tool...ux-gnu.tar.bz2
http://code.google.com/p/android/downloads/list

HaRET does not seem to recognize the omnia's PXA312... Also i cannot determine the mtype for this.. Anyone have any ideas on how to get the kernel to boot???
Last edited by us1111; 10th February 2009 at 03:44 PM.
30th September 2008, 11:11 AM   |  #2  
Senior Member
Thanks Meter: 5
 
1,434 posts
Join Date:Joined: Jan 2005
Quote:
Originally Posted by us1111

HaRET does not seem to recognize the omnia's PXA312... Also i cannot determine the mtype for this.. Anyone have any ideas on how to get the kernel to boot???

PXA3xx is supported by linux-arm, but you need to do a lot of device research
before you can boot linux.
Can you post your 'haretlog.txt' file ?
30th September 2008, 11:44 AM   |  #3  
OP Senior Member
Thanks Meter: 2
 
180 posts
Join Date:Joined: Jun 2007
More
I'm using the latest haret-20080927.exe which generates the attached output... Took a little while, because after running the kernel this time, all my non-rom applications did not work (no certificate)..

These are btw. the PXA settings in .config:

CONFIG_ARCH_PXA=y
CONFIG_CPU_PXA300=y
CONFIG_CPU_PXA310=y
CONFIG_CPU_PXA320=y
CONFIG_PXA3xx=y
CONFIG_PXA_SSP=y

Sure hope you can help!! I'm reasonably known with linux and a bit of programming... By the way, i completely guessed the RAMADDR. Also the mtype i hope is close enough and got it from the linuxarm site (Marvell PXA3XX DVK Zylonite). These values are most probably wrong but I haven't got a clue how to determine these with the given tools...
Attached Files
File Type: txt haretlog.txt - [Click for QR Code] (6.5 KB, 346 views)
Last edited by us1111; 30th September 2008 at 12:36 PM.
30th September 2008, 10:30 PM   |  #4  
Junior Member
Thanks Meter: 0
 
13 posts
Join Date:Joined: Sep 2008
Omnia uses DDR ram while many others use SD ram. Maybe this will help
17th October 2008, 10:39 AM   |  #5  
OP Senior Member
Thanks Meter: 2
 
180 posts
Join Date:Joined: Jun 2007
More
Quote:
Originally Posted by sageman8

Omnia uses DDR ram while many others use SD ram. Maybe this will help

Well, maybe it's my lack of knowledge, but it did not help for me.. I believe that as long as I have no MTYPE or RAMADDR values, it's impossible to boot the kernel.. So I sure could need some help with that
2nd November 2008, 01:57 PM   |  #6  
OP Senior Member
Thanks Meter: 2
 
180 posts
Join Date:Joined: Jun 2007
More
Hmmm. Maybe I can do something with the following info regarding the RAMADDR:

128.58M (0x8095800) DSK1:
| 1.35M (0x159800) Part00
| 3.08M (0x313800) Part01
| 124.15M (0x7c27800) Part02

Now I just have to figure out what is the correct base.. No luck at all finding the correct MTYPE for my PXA312 though..
2nd November 2008, 02:19 PM   |  #7  
Senior Member
Thanks Meter: 2
 
642 posts
Join Date:Joined: Apr 2007
More
try mytype 1388

look here.. http://www.arm.linux.org.uk/developer/machines/

as far as i can see, the pxa300/310 has the same cpu as the 312 so theres a good chance you'd be alright with that machtype.

good luck
2nd November 2008, 06:08 PM   |  #8  
kosmodisk's Avatar
Senior Member
Thanks Meter: 6
 
259 posts
Join Date:Joined: Sep 2007
is it possible to compile it for PXA 27x?
3rd November 2008, 09:11 AM   |  #9  
OP Senior Member
Thanks Meter: 2
 
180 posts
Join Date:Joined: Jun 2007
More
Quote:
Originally Posted by kosmodisk

is it possible to compile it for PXA 27x?

Yeah.. It should:

root@JEOS:/ANDROID/android/kernel.git# grep -i pxa .config
CONFIG_ARCH_PXA=y
# Intel PXA2xx/PXA3xx Implementations
# Supported PXA3xx Processor Variants
CONFIG_CPU_PXA300=y
CONFIG_CPU_PXA310=y
CONFIG_CPU_PXA320=y
# CONFIG_MACH_LOGICPD_PXA270 is not set
# CONFIG_ARCH_PXA_IDP is not set
# CONFIG_PXA_SHARPSL is not set
# CONFIG_ARCH_PXA_ESERIES is not set
CONFIG_PXA3xx=y
CONFIG_PXA_SSP=y
# CONFIG_PCMCIA_PXA2XX is not set
# CONFIG_PXA_FICP is not set
# CONFIG_KEYBOARD_PXA27x is not set
# CONFIG_SERIAL_PXA is not set
# CONFIG_I2C_PXA is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_FB_PXA is not set
# CONFIG_SND_PXA2XX_AC97 is not set
# CONFIG_SND_PXA2XX_SOC is not set
# CONFIG_USB_GADGET_PXA2XX is not set
# CONFIG_MMC_PXA is not set
3rd November 2008, 10:30 PM   |  #10  
kosmodisk's Avatar
Senior Member
Thanks Meter: 6
 
259 posts
Join Date:Joined: Sep 2007
i´m not a programmer(i have only basic knowledge of it), but i would like to try porting android to hp ipaq rw6815/o2 atom, is it very hard? i've tried to run port for kaiser or vogue, but it stucks up on log: jumping to kernel

can you give me some advices? thanks

Post Reply Subscribe to Thread

Tags
kernel, omnia, pxa312
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Software and Hacking General [Developers Only] by ThreadRank