Re: Porting to S3C2443

89 views
Skip to first unread message
Message has been deleted
Message has been deleted

Shantanu

unread,
Nov 4, 2009, 2:16:55 PM11/4/09
to android-porting
On Nov 4, 3:26 pm, bigfly <bigfly...@gmail.com> wrote:
> Hi,
>
> I'm trying to port the Android Donut to the S3C2443, but the system
> cannot execute init and dump the following message:

> 5. Build the kernel with the donut's prebuilt toolchain(arm-
> eabi-4.2.1).

I think this is the part where you went wrong. You might want to
download koolu's armv4t toolchain and use that to build your code.
This is koolu's git: http://gitorious.org/android-on-freerunner. Keep
us posted on your effort as I'll be starting in the same direction in
a few days so would be good if I can avoid repeating the things which
have already been achieved :)

Regards
Shantanu

Shantanu

unread,
Nov 5, 2009, 2:15:54 AM11/5/09
to android-porting
On Nov 4, 3:23 pm, bigfly <bigfly...@gmail.com> wrote:
> Hi,
>
> I'm trying to port the Android Donut to the S3C2443, but the system
> cannot execute init and dump the following message:

> 5. Build the kernel with the donut's prebuilt toolchain(arm-
> eabi-4.2.1).

I think this is where you go wrong. You need to download armv4t
toolchain from koolu (http://gitorious.org/android-on-freerunner) and
use that to compile.

Adam Jiang

unread,
Nov 5, 2009, 7:26:41 AM11/5/09
to android...@googlegroups.com
Hello,

It seems the failure is caused by RTC device. What's the spec of your device? What kind of RTC device are you using? Is it the same with what hctosys.c could serve?

There is another porting work base on S3C2443. You'd like to take a look at it.

http://groups.google.com/group/android-porting/browse_thread/thread/5392e33cb309aad2
http://kumikomi.asablo.jp/blog/cat/mini2440/

Regards,
--
Adam

On Wed, Nov 4, 2009 at 7:23 PM, bigfly <bigf...@gmail.com> wrote:
Hi,

I'm trying to port the Android Donut to the S3C2443, but the system
cannot execute init and dump the following message:

...
android init
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-i2c s3c2410-i2c: slave address 0x10
s3c2410-i2c s3c2410-i2c: bus frequency set to 378 KHz
s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq
enabled
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
TCP cubic registered
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Freeing init memory: 128K
Kernel panic - not syncing: Attempted to kill init!


I tracked down the code and found the kernel received the SIGILL
signal and tried to kill the init.

I used the following steps to build the kernel and the SDK (donut):

1. Download the donut source code and patch it with android-donut-
armv4t-20090825-1.patch from Christopher.
2. Set TARGET_ARCH_VERSION to armv4t and make the donut with its
prebuilt toolchain (arm-eabi-4.2.1).
3. Download the android kernel 2.6.29 and enable the ARM EABI option
(CONFIG_AEABI) and other necessary options.
4. Modify the 'Makefile'

-NONSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-
name=include)
+NONSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-
name=include) -Dlinux


5. Build the kernel with the donut's prebuilt toolchain(arm-
eabi-4.2.1).
6. Use the kernel command line option 'initrd' to pass the
'ramdisk.img'.

I didn't download the system.img and userdata.img.

Any ideas? Thanks in advance.


bigfly



--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting



--
Adam Jiang
------------------------------------------
e-mail:jiang...@gmail.com
http://www.adamjiang.com

bigfly

unread,
Nov 20, 2009, 2:51:02 AM11/20/09
to android-porting
Shantanu, you are the man. By using the armv4t toolchain from koolu to
compile the donut source code, I can get rid of the 'undefined
instruction' problem and see the init to start breathing.

Thanks again.

On Nov 5, 3:15 pm, Shantanu <shantanu.g...@gmail.com> wrote:
> On Nov 4, 3:23 pm, bigfly <bigfly...@gmail.com> wrote:
>
> > Hi,
>
> > I'm trying to port the Android Donut to theS3C2443, but the system

bigfly

unread,
Nov 20, 2009, 3:04:15 AM11/20/09
to android-porting
I encountered another problem when init starting its life.

The following is the output of logcat:

I/DEBUG ( 1557): debuggerd: Nov 19 2009 18:56:41
I/vold ( 1556): Android Volume Daemon version 2.0
E/vold ( 1556): Unable to open '/sys/class/mmc_host' (No such file
or directory)
D/vold ( 1556): Bootstrapping complete
I/DEBUG ( 1557): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG ( 1557): Build fingerprint: 'generic/generic/generic/:1.6/
Donut/eng.Joe.20091119.172946:eng/test-keys'
I/DEBUG ( 1557): pid: 1558, tid: 1558 >>> /system/bin/rild <<<
I/DEBUG ( 1557): signal 4 (SIGILL), fault addr b0001d38
I/DEBUG ( 1557): r0 00000400 r1 00000000 r2 00000000 r3 00001000
I/DEBUG ( 1557): r4 be8f88c0 r5 00000000 r6 0000a120 r7 00000001
I/DEBUG ( 1557): r8 00000000 r9 00000000 10 00000000 fp 00000000
I/DEBUG ( 1557): ip 0000a198 sp be8f8898 lr 1e078440 pc
b0001d38 cpsr 40000010
I/DEBUG ( 1557): #00 pc b0001d38 /system/bin/linker
I/DEBUG ( 1557): #01 lr 1e078440 <unknown>
I/DEBUG ( 1557): stack:
I/DEBUG ( 1557): be8f8858 1f000000
I/DEBUG ( 1557): be8f885c afe22f31 /system/lib/libc.so
I/DEBUG ( 1557): be8f8860 00000000
I/DEBUG ( 1557): be8f8864 00000000
I/DEBUG ( 1557): be8f8868 00000000
I/DEBUG ( 1557): be8f886c 00000001
I/DEBUG ( 1557): be8f8870 00000000
I/DEBUG ( 1557): be8f8874 be8f8cc0 [stack]
I/DEBUG ( 1557): be8f8878 be8f8cc0 [stack]
I/DEBUG ( 1557): be8f887c 00001000
I/DEBUG ( 1557): be8f8880 00001000
I/DEBUG ( 1557): be8f8884 00000000

I found the undefined instruction was 0xad01f9a3 and its assembly code
is:

stcge 9, cr15, [r1, #-652]

The above code is in the /system/bin/linker. I don't understand why
there is a coprocessor instruction in the android dynamic linker and
what is the coprocessor 9?

Any suggestions?

ironox

unread,
Dec 10, 2009, 9:30:09 AM12/10/09
to android-porting
hi bigfly

i am doing the same thing as you

my board is based on s3c2440 cpu

and i think we encoutered the same problem.

if you have solved it , could you let me know?

i diabled rild because my board don't have phone module
,but i get these log from logcat :

it seems zygote have illegal instruction in it, but i do not know how
fix it,
any help will be appreciated!

D/AndroidRuntime( 1679): >>>>>>>>>>>>>> AndroidRuntime START
<<<<<<<<<<<<<<
D/AndroidRuntime( 1679): CheckJNI is OFF
I/DEBUG ( 1464): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG ( 1464): Build fingerprint: 'generic/generic/generic/:1.6/
Donut/eng.ironox.20091210.133754:eng/test-keys'
I/DEBUG ( 1464): pid: 1679, tid: 1679 >>> zygote <<<
I/DEBUG ( 1464): signal 4 (SIGILL), fault addr ad059dc0
I/DEBUG ( 1464): r0 4104bf1c r1 bec49598 r2 4106cc18 r3 0000bc48
I/DEBUG ( 1464): r4 417447f2 r5 4104bf2c r6 bec49590 r7 ad00e840
I/DEBUG ( 1464): r8 00000071 r9 0000bc48 10 4104bf0c fp 00000000
I/DEBUG ( 1464): ip 00000071 sp bec49550 lr ad01342c pc
ad059dc0 cpsr 00000010
I/DEBUG ( 1464): #00 pc 00059dc0 /system/lib/libdvm.so
I/DEBUG ( 1464): #01 lr ad01342c /system/lib/libdvm.so
I/DEBUG ( 1464): stack:
I/DEBUG ( 1464): bec49510 4000cc70
I/DEBUG ( 1464): bec49514 4162a1f8
I/DEBUG ( 1464): bec49518 00000001
I/DEBUG ( 1464): bec4951c ad06030b /system/lib/libdvm.so
I/DEBUG ( 1464): bec49520 4000cc70
I/DEBUG ( 1464): bec49524 ad08ae1c
I/DEBUG ( 1464): bec49528 00003f3f
I/DEBUG ( 1464): bec4952c 00015d88 [heap]
I/DEBUG ( 1464): bec49530 00015d20 [heap]
I/DEBUG ( 1464): bec49534 0000096f
I/DEBUG ( 1464): bec49538 00000000
I/DEBUG ( 1464): bec4953c 41744c48
I/DEBUG ( 1464): bec49540 4104bf58
I/DEBUG ( 1464): bec49544 bec49590 [stack]
I/DEBUG ( 1464): bec49548 e3a07077
I/DEBUG ( 1464): bec4954c ef900077
I/DEBUG ( 1464): #00 bec49550 0000bc48 [heap]
I/DEBUG ( 1464): bec49554 ad08bef0
I/DEBUG ( 1464): bec49558 bec49590 [stack]
I/DEBUG ( 1464): bec4955c ad018038 /system/lib/libdvm.so
I/DEBUG ( 1464): bec49560 00000344
I/DEBUG ( 1464): bec49564 bec49640 [stack]
I/DEBUG ( 1464): bec49568 4000cc70
I/DEBUG ( 1464): bec4956c 4104bf6c
I/DEBUG ( 1464): bec49570 00000000
I/DEBUG ( 1464): bec49574 ad018090 /system/lib/libdvm.so
I/DEBUG ( 1464): bec49578 00010978 [heap]
I/DEBUG ( 1464): bec4957c 00000001
I/DEBUG ( 1464): bec49580 0000bc48 [heap]
I/DEBUG ( 1464): bec49584 ad017a9c /system/lib/libdvm.so
I/DEBUG ( 1464): bec49588 4000cc70
I/DEBUG ( 1464): bec4958c afe0ee38 /system/lib/libc.so
I/DEBUG ( 1464): bec49590 41744c44
I/DEBUG ( 1464): bec49594 4104bf58
Message has been deleted

bigfly

unread,
Dec 13, 2009, 8:28:01 PM12/13/09
to android-porting
Hello ironox,

I have solved my problem by disabling the thumb instruction set
support.
Basically, I just merged part of the build system of Eclair.

The detailed steps:

1. Merged the following two files from the Eclair:
build/core/combo/linux-arm.mk
build/core/combo/arch/arm/armv4t.mk

2. Change other files accordingly.
TARGET_ARCH_VERSION -> TARGET_ARCH_VARIANT

3. Use the koolu's toolchain to compile.

I hope these information can help you.

Best Regards,

BigFly

wang jintong

unread,
Dec 13, 2009, 11:29:35 PM12/13/09
to android...@googlegroups.com
Hi bigfly,

Can you send your libgcc.a to me ? My libgcc.a is based on armv5te arch . It can not be used on armv4t arch .

thank you very much.


--

bigfly

unread,
Dec 15, 2009, 8:11:56 PM12/15/09
to android-porting
Hi Wang,

I don't quite understand why you need the armv4t of libgcc.a alone.

I think compile the source code by using the koolu's toolchain could
solve your problem.

If things still don't work, please let me know and detail the problem
that bothers you.


Regards,
BigFly
> > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsubscribe@ googlegroups.com>
> > website:http://groups.google.com/group/android-porting

wang jintong

unread,
Dec 16, 2009, 6:30:21 AM12/16/09
to android...@googlegroups.com
Hi , BigFly :

You are absolutely right, and just because of my fail to get the Koolu code, I don’t have its toolchain. I used to think that the toolchain can be utilized by means of changing the libgcc.a, but now it seems to be impossible. Could you please tell me where I can download the toolchain of Koolu? For the reason of network mask, I am not able to find out the available download link.

Thank you very much!

Regards

Michael Trimarchi

unread,
Dec 16, 2009, 7:33:04 AM12/16/09
to android...@googlegroups.com

tommy tommy

unread,
Dec 16, 2009, 7:39:23 AM12/16/09
to android...@googlegroups.com
great job




--
Achievement provides the only real pleasure in life!

wang jintong

unread,
Dec 17, 2009, 3:51:22 AM12/17/09
to android...@googlegroups.com
Hi, all :

Thank you very much , I have got toolchain .

Now, I have some problem.. Like this :

target SharedLib: libc (out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(abort.o): In function `abort':
/home/workspace/eclair/bionic/libc/unistd/abort.c:126: relocation truncated to fit: R_ARM_THM_JUMP11 against symbol `__libc_android_abort' defined in .glue_7 section in /home/workspace/eclair/prebuilt/linux-x86/toolchain/armv4t-android-eabi-4.2.1/bin/../lib/gcc/armv4t-android-eabi/4.2.1/interwork/libgcc.a(_clz.o)
collect2: ld returned 1 exit status

Help me !  Thank you ..

Michael Trimarchi

unread,
Dec 17, 2009, 4:10:02 AM12/17/09
to android...@googlegroups.com
wang jintong wrote:
> Hi, all :
>
> Thank you very much , I have got toolchain .
>
> Now, I have some problem.. Like this :
>
> target SharedLib: libc
> (out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
> out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(abort.o):
> In function `abort':
> /home/workspace/eclair/bionic/libc/unistd/abort.c:126: relocation
> truncated to fit: R_ARM_THM_JUMP11 against symbol
> `__libc_android_abort' defined in .glue_7 section in
> /home/workspace/eclair/prebuilt/linux-x86/toolchain/armv4t-android-eabi-4.2.1/bin/../lib/gcc/armv4t-android-eabi/4.2.1/interwork/libgcc.a(_clz.o)
> collect2: ld returned 1 exit status
>
> Help me ! Thank you ..
>

>
> On Wed, Dec 16, 2009 at 8:39 PM, tommy tommy <hongj...@gmail.com
> <mailto:hongj...@gmail.com>> wrote:
>
> great job
>
> 2009/12/16 Michael Trimarchi <trim...@gandalf.sssup.it

> <mailto:trim...@gandalf.sssup.it>>

> <mailto:android-porting%2Bunsu...@googlegroups.com>


> website: http://groups.google.com/group/android-porting
>
>
>
>
> --
> Achievement provides the only real pleasure in life!
>
> --
> unsubscribe: android-porti...@googlegroups.com

> <mailto:android-porting%2Bunsu...@googlegroups.com>
> website: http://groups.google.com/group/android-porting

abort.patch

wang jintong

unread,
Dec 17, 2009, 6:05:44 AM12/17/09
to android...@googlegroups.com
Thank you all , I'm so happy today , Because Eclair is running on my board now ..

Thank you all for your help ..

But  ,I still do not know why  abort.c  is writed like that ..???

wang jintong

unread,
Dec 22, 2009, 2:08:24 AM12/22/09
to android...@googlegroups.com
Hi.all :

I got some problem like this :  ,help me please .thank you .

D/AndroidRuntime(   20): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(   20): 
D/AndroidRuntime(   20): >>>>>>>>>>>>>> start the virtual machine <<<<<<<<<<<<<<
D/AndroidRuntime(   20): CheckJNI is OFF
D/AndroidRuntime(   20): 
D/AndroidRuntime(   20): >>>>>>>>>>>>>> JNI CreateJavaVM <<<<<<<<<<<<<<
D/dalvikvm(   20): Jni.c:dvmStartup 
D/dalvikvm(   20): init.c:registerSystemNatives
D/        (   20): Register.c:jniRegisterSystemMethods
init: got a SIGCHLD - reap and restart as needed ...
init: waitpid returned pid 20, status = 00000004
init: process 'zygote', pid 20 exited
init: process 'zygote' killing any children in process group
request_suspend_state: wakeup (3->0) at 13454183000 (1970-01-01 00:00:13.454181000 UTC)
init: restarting service if needed
init: starting 'zygote'
init: Created socket '/dev/socket/zygote' with mode '666', user '0', group '0'
init: started 'zygote' OK
D/AndroidRuntime(   25): 
D/AndroidRuntime(   25): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(   25): 
D/AndroidRuntime(   25): >>>>>>>>>>>>>> start the virtual machine <<<<<<<<<<<<<<
D/AndroidRuntime(   25): CheckJNI is OFF
D/AndroidRuntime(   25): 
D/AndroidRuntime(   25): >>>>>>>>>>>>>> JNI CreateJavaVM <<<<<<<<<<<<<<

wang jintong

unread,
Dec 28, 2009, 2:51:35 AM12/28/09
to android...@googlegroups.com
close thumb ,OK
Reply all
Reply to author
Forward
0 new messages