compilation rules for ARMv6

249 views
Skip to first unread message

Manish Sharma

unread,
Mar 28, 2009, 2:30:02 AM3/28/09
to android...@googlegroups.com
Hi All,
 
I have got information from this mailing list that to compile android package for armv6 we need to modify the linux-arm.mk and add rules for building ARMv6. Are these rules available with someone? Please share the rules/info it would be of great help.
 
Regards,
Manish

fadden

unread,
Mar 30, 2009, 3:44:07 PM3/30/09
to android-porting
Is it failing to compile with the current rules?

Manish Sharma

unread,
Mar 30, 2009, 11:44:47 PM3/30/09
to android...@googlegroups.com
Hi Fadden,
No! it is working fine with the current rules. Still I would like to use armv6 compilation rules.
Regards,
MS

Manish Sharma

unread,
Apr 2, 2009, 11:06:33 AM4/2/09
to android...@googlegroups.com
Hi All,
 
Further on this topic. I have updated the build/core/combo/linux-arm.mk file with following rules.
 
TARGET_ARCH_VERSION := armv6
 
RULES for ARMv6:
 
ifeq ($(TARGET_ARCH_VERSION),armv6)
$(warning ARMv6 support added)
ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_THUMB_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
arch_version_cflags :=  -march=armv5t -Wa,-march=armv6 -D__ARM_ARCH_6__
After this compiled with ARMv6 toolchain. Compilation was successful and I am able to get the android desktop.
 
Can someone confirm the changes mentioned above are sufficient and correct?

Regards,
MS

Manish Sharma

unread,
Apr 3, 2009, 8:05:23 AM4/3/09
to android...@googlegroups.com
Hi Guys,
 
The following configurations are not working. I am getting following kernel panic.
 
affs: dev is 32505861 name is "mtdblock5"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.5, "mtdblock5"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 120K
Warning: unable to open an initial console.
init: /init.rc: 142: group option accepts at most 6 supp. groups
Ösh: can't access tty; job control turned offinit: starting 'servicemanager'
# init: starting 'mountd'
init: Created socket '/dev/socket/mountd' with mode '660', user '0', group '1009'
init: starting 'debuggerd'
init: starting 'ril-daemon'
init: Created socket '/dev/socket/rild-debug' with mode '660', user '1001', group '1000'
init: starting 'zygote'
init: Created socket '/dev/socket/zygote' with mode '666', user '0', group '0'
init: Created socket '/dev/socket/rild' with mode '660', user '0', group '1001'
init: starting 'media'
init: cannot find '/system/bin/playmp3', disabling 'bootsound'
init: starting 'dbus'
init: Created socket '/dev/socket/dbus' with mode '660', user '1002', group '1002'
init: starting 'installd'
init: cannot find '/system/bin/nomadik_init', disabling 'auto1'
init: Created socket '/dev/socket/installd' with mode '600', user '1000', group '1000'
init: command 'class_start' r=0
init: processing action 0x27790 (property:persist.service.adb.enable=1)
init: starting 'adbd'
init: command 'start' r=0
init: event { 'add', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'add', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'remove', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'remove', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'add', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'add', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'remove', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'remove', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'add', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'add', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'remove', '/class/vc/vcs1', 'vc', '', 7, 1 }
init: event { 'remove', '/class/vc/vcsa1', 'vc', '', 7, 129 }
init: event { 'add', '/kernel/uids/1000', 'uids', '', -1, -1 }
init: event { 'add', '/kernel/uids/1002', 'uids', '', -1, -1 }
init: event { 'add', '/kernel/uids/1001', 'uids', '', -1, -1 }
warning: `rild' uses 32-bit capabilities (legacy support in use)
Kernel panic - not syncing: Attempted to kill init!

I apologize for wrong information.
Only the compilation is succeeded while boot I am getting the above kernel panic.
 
With or without the following changes in linux-arm.mk,  if I compile the android package with ARMv6 toolchain the above kernel panic is observed. So linux-arm.mk changes are not affecting the compilation.
 
with logcat I am getting following information:
 
# logcat &
# I/DEBUG   ( 1552): debuggerd: Apr  2 2009 22:41:19
D/mountd  ( 1551): AddMountPoint device: /dev/block/mmcblk0, mountPoint: /sdcard driverStorePath: /s
ys/devices/platform/usb_mass_storage/lun0/file
E/mountd  ( 1551): could not read initial mass storage state
D/mountd  ( 1551): USB offline
D/mountd  ( 1551): RequestMount /sdcard
# D/AndroidRuntime( 1554):
D/AndroidRuntime( 1554): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1554): CheckJNI is ON
E/dalvikvm( 1554): Bad asm sizeof sizeofGlobal_debuggerActive (4), should be 1
E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
E/dalvikvm( 1554): Bad asm sizeof sizeofMethodType (4), should be 1
E/dalvikvm( 1554): Please correct the values in mterp/common/asm-constants.h
E/dalvikvm( 1554): VM aborting
I/DEBUG   ( 1552): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1552): Build fingerprint: 'generic/generic/generic/:1.5/MAIN/eng.manishsh.20090402.21385
1:eng/test-keys'
I/DEBUG   ( 1552): pid: 1554, tid: 1554  >>> zygote <<<
I/DEBUG   ( 1552): signal 11 (SIGSEGV), fault addr deadd00d
I/DEBUG   ( 1552):  r0 00000320  r1 0000000c  r2 0000000c  r3 00000026
I/DEBUG   ( 1552):  r4 deadd00d  r5 ad06a964  r6 00000004  r7 00000001
I/DEBUG   ( 1552):  r8 ad084e04  r9 00000000  10 ad069f44  fp 00000000
I/DEBUG   ( 1552):  ip ad084ee0  sp bef0f7b0  lr afe13f8d  pc ad03b6ca  cpsr 20000030
I/DEBUG   ( 1552):          #00  pc 0003b6ca  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #01  pc 00017b00  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #02  pc 0003c94e  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #03  pc 00040fc2  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #04  pc 00028f58  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1552):          #05  pc 00008bf2  /system/bin/app_process
I/DEBUG   ( 1552):          #06  pc 0Kernel panic - not syncing: Attempted to kill init!
001fe22  /system/lib/libc.so
I/DEBUG   ( 1552):          #07  pc 0000bc22  /system/lib/libc.so
I/DEBUG   ( 1552):          #08  pc b0001424  /system/bin/linker
I/DEBUG   ( 1552): stack:
I/DEBUG   ( 1552):     bef0f770  0000000a
I/DEBUG   ( 1552):     bef0f774  00000000
I/DEBUG   ( 1552):     bef0f778  afe37f94
I/DEBUG   ( 1552):     bef0f77c  afe37fe8
I/DEBUG   ( 1552):     bef0f780  00000000
I/DEBUG   ( 1552):     bef0f784  afe13f8d  /system/lib/libc.so
I/DEBUG   ( 1552):     bef0f788  0000ab58  [heap]
I/DEBUG   ( 1552):     bef0f78c  afe12fa9  /system/lib/libc.so
I/DEBUG   ( 1552):     bef0f790  ad348f40  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1552):     bef0f794  ad084e04
I/DEBUG   ( 1552):     bef0f798  ad06a964  /system/lib/libdvm.so
I/DEBUG   ( 1552):     bef0f79c  00000004
I/DEBUG   ( 1552):     bef0f7a0  00000001
I/DEBUG   ( 1552):     bef0f7a4  afe1300d  /system/lib/libc.so
I/DEBUG   ( 1552):     bef0f7a8  e3a07077
I/DEBUG   ( 1552):     bef0f7ac  ef900077
I/DEBUG   ( 1552): #00 bef0f7b0  ad06a9a8  /system/lib/libdvm.so
I/DEBUG   ( 1552):     bef0f7b4  ad017b04  /system/lib/libdvm.so
I/DEBUG   ( 1552): #01 bef0f7b8  00000004
I/DEBUG   ( 1552):     bef0f7bc  00000001
I/DEBUG   ( 1552):     bef0f7c0  0000a938  [heap]
I/DEBUG   ( 1552):     bef0f7c4  ad085ac8
I/DEBUG   ( 1552):     bef0f7c8  00000320
I/DEBUG   ( 1552):     bef0f7cc  00000000
I/DEBUG   ( 1552):     bef0f7d0  ad084e04
I/DEBUG   ( 1552):     bef0f7d4  00000000
I/DEBUG   ( 1552):     bef0f7d8  00000000
I/DEBUG   ( 1552):     bef0f7dc  ad03c951  /system/lib/libdvm.so
 
 
The same code base works fine with arm-eabi toolchain.
 
 
Thanks and Regards,
MS

fadden

unread,
Apr 3, 2009, 2:21:29 PM4/3/09
to android-porting
On Apr 3, 5:05 am, Manish Sharma <manishsharm...@gmail.com> wrote:
> The following configurations are not working. I am getting following kernel
> panic.
[...]
> D/AndroidRuntime( 1554): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
> D/AndroidRuntime( 1554): CheckJNI is ON
> E/dalvikvm( 1554): Bad asm sizeof sizeofGlobal_debuggerActive (4), should be
> 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofMethodType (4), should be 1
> E/dalvikvm( 1554): Please correct the values in mterp/common/asm-constants.h
> E/dalvikvm( 1554): VM aborting

I don't see a kernel panic. The above indicates that the VM is
getting upset that the expected size of enumerated types is what it
wanted, and is aborting.

You need to coordinate HAVE_SHORT_ENUMS in system/core/include/arch/
<ARCH>/AndroidConfig.h with the enum sizes your compiler is
generating. It looks like your C compiler is generating code with
"short" enums and you don't have the define set.

Manish Sharma

unread,
Apr 4, 2009, 12:56:55 AM4/4/09
to android...@googlegroups.com
Thanks fadden,
 
I will check this file.
 
Regards,
Manish

 

Manish Sharma

unread,
Apr 6, 2009, 12:21:45 AM4/6/09
to android...@googlegroups.com
Hi fadden,
 
I have enabled HAVE_SHORT_ENUMS and now the logs are changed but still getting VM aborting.
 
 
# D/AndroidRuntime( 1554):

D/AndroidRuntime( 1554): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1554): CheckJNI is ON
E/dalvikvm( 1554): Bad asm sizeof sizeofGlobal_debuggerActive (1), should be 4
E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (1), should be 4
E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (1), should be 4
E/dalvikvm( 1554): Bad asm sizeof sizeofMethodType (1), should be 4

E/dalvikvm( 1554): Please correct the values in mterp/common/asm-constants.h
E/dalvikvm( 1554): VM aborting
I/DEBUG   ( 1552): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1552): Build fingerprint: 'generic/generic/generic/:1.5/MAIN/eng.manishsh.20090405.15140
2:eng/test-keys'

I/DEBUG   ( 1552): pid: 1554, tid: 1554  >>> zygote <<<
I/DEBUG   ( 1552): signal 11 (SIGSEGV), fault addr deadd00d
I/DEBUG   ( 1552):  r0 00000320  r1 0000000c  r2 0000000c  r3 00000026
I/DEBUG   ( 1552):  r4 deadd00d  r5 ad069f10  r6 00000001  r7 00000004
I/DEBUG   ( 1552):  r8 ad083e04  r9 00000000  10 ad069448  fp 00000000
I/DEBUG   ( 1552):  ip ad083ee0  sp bee077b0  lr afe13edd  pc ad03b616  cpsr 20000030
I/DEBUG   ( 1552):          #00  pc 0003b616  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #01  pc 00017a7c  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #02  pc 0003c864  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #03  pc 00040eb8  /system/lib/libdvm.so
I/DEBUG   ( 1552):          #04  pc 00029218  /system/lib/libandroid_runtime.so

I/DEBUG   ( 1552):          #05  pc 00008bf2  /system/bin/app_process
I/DEBUG   ( 1552):          #06  pc 0001fd72  /system/lib/libc.so
I/DEBUG   ( 1552):          #07  pc 0000bc12  /system/lib/libc.so

I/DEBUG   ( 1552):          #08  pc b0001424  /system/bin/linker
I/DEBUG   ( 1552): stack:
I/Kernel panic - not syncing: Attempted to kill init!
DEBUG   ( 1552):     bee07770  0000000a
I/DEBUG   ( 1552):     bee07774  00000000
I/DEBUG   ( 1552):     bee07778  afe37f94
I/DEBUG   ( 1552):     bee0777c  afe37fe8
I/DEBUG   ( 1552):     bee07780  00000000
I/DEBUG   ( 1552):     bee07784  afe13edd  /system/lib/libc.so
I/DEBUG   ( 1552):     bee07788  0000ab90  [heap]
I/DEBUG   ( 1552):     bee0778c  afe12ef9  /system/lib/libc.so
I/DEBUG   ( 1552):     bee07790  ad349360  /system/lib/libandroid_runtime.so
I/DEBUG   ( 1552):     bee07794  ad083e04
I/DEBUG   ( 1552):     bee07798  ad069f10  /system/lib/libdvm.so
I/DEBUG   ( 1552):     bee0779c  00000001
I/DEBUG   ( 1552):     bee077a0  00000004
I/DEBUG   ( 1552):     bee077a4  afe12f5d  /system/lib/libc.so
I/DEBUG   ( 1552):     bee077a8  e3a07077
I/DEBUG   ( 1552):     bee077ac  ef900077
I/DEBUG   ( 1552): #00 bee077b0  ad069f58  /system/lib/libdvm.so
I/DEBUG   ( 1552):     bee077b4  ad017a80  /system/lib/libdvm.so
I/DEBUG   ( 1552): #01 bee077b8  00000001
I/DEBUG   ( 1552):     bee077bc  00000004
I/DEBUG   ( 1552):     bee077c0  0000a940  [heap]
I/DEBUG   ( 1552):     bee077c4  ad084a88
I/DEBUG   ( 1552):     bee077c8  00000320
I/DEBUG   ( 1552):     bee077cc  00000000
I/DEBUG   ( 1552):     bee077d0  ad083e04
I/DEBUG   ( 1552):     bee077d4  00000000
I/DEBUG   ( 1552):     bee077d8  00000000
I/DEBUG   ( 1552):     bee077dc  ad03c867  /system/lib/libdvm.so
Regards,
MS

fadden

unread,
Apr 6, 2009, 4:29:33 PM4/6/09
to android-porting
On Apr 5, 9:21 pm, Manish Sharma <manishsharm...@gmail.com> wrote:
> I have enabled HAVE_SHORT_ENUMS and now the logs are changed but still
> getting VM aborting.
[...]
> E/dalvikvm( 1554): Bad asm sizeof sizeofGlobal_debuggerActive (1), should be
> 4
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (1), should be 4
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (1), should be 4
> E/dalvikvm( 1554): Bad asm sizeof sizeofMethodType (1), should be 4
> E/dalvikvm( 1554): Please correct the values in mterp/common/asm-constants.h

Previously, you had:

> E/dalvikvm( 1554): Bad asm sizeof sizeofGlobal_debuggerActive (4), should be
> 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofClassStatus (4), should be 1
> E/dalvikvm( 1554): Bad asm sizeof sizeofMethodType (4), should be 1
> E/dalvikvm( 1554): Please correct the values in mterp/common/asm-constants.h


It seems you've managed to change both the actual size and the
expected size.

Manish Sharma

unread,
Apr 7, 2009, 1:52:27 AM4/7/09
to android...@googlegroups.com
Hi fadden,
 
Now my setup is working without any error. The changes which I have done are.
 
1. Modified linux-arm.mk file as mentioned in my previous mail.
2. enabled HAVE_SHORT_ENUMS as mentioned by you.
 
If I miss anything it give VM aborting. I am still not understanding the logic of enabling HAVE_SHORT_ENUMS. If you have some idea please share.
 
Regards,
MS

fadden

unread,
Apr 7, 2009, 2:20:03 PM4/7/09
to android-porting
On Apr 6, 10:52 pm, Manish Sharma <manishsharm...@gmail.com> wrote:
> If I miss anything it give VM aborting. I am still not understanding the
> logic of enabling HAVE_SHORT_ENUMS. If you have some idea please share.

From the gcc "info" page:

`-fshort-enums'
Allocate to an `enum' type only as many bytes as it needs for the
declared range of possible values. Specifically, the `enum' type
will be equivalent to the smallest integer type which has enough
room.

*Warning:* the `-fshort-enums' switch causes GCC to generate code
that is not binary compatible with code generated without that
switch. Use it to conform to a non-default application binary
interface.

The "mterp" stuff is written in assembly, and needs to coordinate with
the gcc setting. This is communicated through the HAVE_SHORT_ENUMS
define.

Android switched from having short-enums enabled in 1.0 to having it
disabled in cupcake. You can either continue with the short enums or
switch to the no-short-enums. I recommend the latter. Whatever you
decide, you need to ensure that mterp is built with the same rule.

Manish Sharma

unread,
Apr 17, 2009, 1:06:23 AM4/17/09
to android...@googlegroups.com
Thanks fadden for such a nice explaination.
 
There was "-fno-short-enums" missing in my linux-arm.mk, while merging this file I did some mistake. Now it is working fine.
 
So simple steps to compile with armv6 are sync with latest android git and modified linux-arm.mk file as mentioned in my previous mail. Use the corresponding It will work fine.
 
 
Now I am starting compilation for armv7, these are my changes
 
ifeq ($(TARGET_ARCH_VERSION),armv7)

ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_THUMB_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
arch_version_cflags :=  -march=armv7-a -D__ARM_ARCH_7__
 
I am getting this error:

Copying: out/target/common/obj/APPS/SdkSetup_intermediates/classes.jar
target Dex: SdkSetup
target Package: SdkSetup (out/target/product/generic/obj/APPS/SdkSetup_intermediates/package.apk)
target R.java/Manifest.java: SettingsProvider (out/target/common/obj/APPS/SettingsProvider_intermediates/src/R.stamp)
target Java: SettingsProvider (out/target/common/obj/APPS/SettingsProvider_intermediates/classes)
Note: frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Copying out/target/common/obj/APPS/SettingsProvider_intermediates/classes-full-debug.jar
Copying: out/target/common/obj/APPS/SettingsProvider_intermediates/classes.jar
target Dex: SettingsProvider
target Package: SettingsProvider (out/target/product/generic/obj/APPS/SettingsProvider_intermediates/package.apk)
target R.java/Manifest.java: Settings (out/target/common/obj/APPS/Settings_intermediates/src/R.stamp)
packages/apps/Settings/res/values-fr/strings.xml:590: WARNING: empty 'Protégez votre téléphone contre toute utilisation non autorisée en créant un motif personnel de déverrouillage de l'écran.
1 L'écran suivant vous présente un exemple de motif.
2 Lorsque vous êtes prêt(e), dessinez votre propre motif de déverrouillage. Essayez différents motifs, mais reliez au moins quatre points.
' span found for at text 'b'
target Java: Settings (out/target/common/obj/APPS/Settings_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar
Copying: out/target/common/obj/APPS/Settings_intermediates/classes.jar
target Dex: Settings
target Package: Settings (out/target/product/generic/obj/APPS/Settings_intermediates/package.apk)
packages/apps/Settings/res/values-fr/strings.xml:590: WARNING: empty 'Protégez votre téléphone contre toute utilisation non autorisée en créant un motif personnel de déverrouillage de l'écran.
1 L'écran suivant vous présente un exemple de motif.
2 Lorsque vous êtes prêt(e), dessinez votre propre motif de déverrouillage. Essayez différents motifs, mais reliez au moins quatre points.
' span found for at text 'b'
target Java: SettingsTests (out/target/common/obj/APPS/SettingsTests_intermediates/classes)
Copying out/target/common/obj/APPS/SettingsTests_intermediates/classes-full-debug.jar
Copying: out/target/common/obj/APPS/SettingsTests_intermediates/classes.jar
target Dex: SettingsTests
target Package: SettingsTests (out/target/product/generic/obj/APPS/SettingsTests_intermediates/package.apk)
target thumb C++: libsimplejni <= development/samples/SimpleJNI/jni/native.cpp
development/samples/SimpleJNI/jni/native.cpp:1: error: bad value (armv7-a) for -march= switch
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libsimplejni_intermediates/native.o] Error 1
 
 
Regards,
MS

fadden

unread,
Apr 17, 2009, 3:21:19 PM4/17/09
to android-porting
On Apr 16, 10:06 pm, Manish Sharma <manishsharm...@gmail.com> wrote:
> target thumb C++: libsimplejni <=
> development/samples/SimpleJNI/jni/native.cpp
> development/samples/SimpleJNI/jni/native.cpp:1: error: bad value (armv7-a)
> for -march= switch
> make: ***
> [out/target/product/generic/obj/SHARED_LIBRARIES/libsimplejni_intermediates/native.o]
> Error 1

It appears the compiler you're using doesn't support "-march=armv7-a".

DineshG

unread,
Apr 17, 2009, 10:07:12 PM4/17/09
to android-porting
which compiler are you using ?

Manish Sharma

unread,
Apr 19, 2009, 11:53:38 PM4/19/09
to android...@googlegroups.com
I am using:
 
arm-linux-gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
 
I am able to compile with the following rules for armv6. Presently working on armv7 but getting compilation error. Please see my previous mails.

TARGET_ARCH_VERSION := armv6

RULES for ARMv6:
ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_THUMB_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
arch_version_cflags := -march=armv6  -D__ARM_ARCH_6__
 
Regards,
MS

Manish Sharma

unread,
Apr 19, 2009, 11:58:05 PM4/19/09
to android...@googlegroups.com
Hi fadden,
 
I am using for armv7:
 
arm-linux-gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
 
For armv6:
 
arm-linux-gcc (GCC) 4.2.1 (Linux Base 4.2.1-37)

Copyright (C) 2007 Free Software Foundation, Inc.
Regards,
MS

Manish Sharma

unread,
Apr 20, 2009, 4:47:58 AM4/20/09
to android...@googlegroups.com
Hi fadden,
 
To check the armv7-a arch I have compiled one hello.c file with "arm-linux-gcc (GCC) 4.2.3" toolchain by providing -march=armv7-a and it works fine. I can conclude toolchain supports armv7-a arch.
 
While looking into linux-arm.mk file I observed "TARGET_TOOLS_PREFIX" macro is hardcoded to arm-eabi toolchain.
 
*************
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $($(combo_target)TOOLS_PREFIX)),)
$(combo_target)TOOLS_PREFIX := \
        prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
*************
 
I have replaced this with my toolchain path and I was getting some other error this time.
 
*************
target SharedLib: libdl (out/target/product/generic/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
target Prelink: libdl (out/target/product/generic/symbols/system/lib/libdl.so)
external/elfcopy/elfcopy.c(1097): gelf_update_phdr(): invalid data
make: *** [out/target/product/generic/symbols/system/lib/libdl.so] Error 1
make: *** Deleting file `out/target/product/generic/symbols/system/lib/libdl.so'
*************
 
When I checked this on mailing list, the soultion mentioned was
 
*************
> Sean McNeil 写道:
>> Don't use 4.3.x. Use gcc 4.2.4 or older.
*************
 
I am using gcc 4.2.3 but still getting this error. Do I need to make the above change in linux-arm.mk file?
 
Regards,
MS

Manish Sharma

unread,
Jun 10, 2009, 3:04:43 AM6/10/09
to android...@googlegroups.com
Hi All,
 
I have cloned Android git last week. And compiled it as it is with arm-eabi-4.3.1 toolchain.
I am using the Linux kernel 2.6.27, which was working with older Android version (Cloned on Wk11).
Now when I am running this setup, I am getting following issue.
 
Fadden, Is it something to do with no-short-enum flag?
 
Regards,
Manish
 
LOG..
 
E/GLLogger( 1574): couldn't load <libhgl.so> library (Cannot find library)
I/ARMAssembler( 1574): generated scanline__00000077:03545404_00000A01_00000000 [ 30 ipp] (51 ins) at
 [0x1930f8:0x1931c4] in 0 ns
I/SystemServer( 1574): Starting Power Manager.
I/SystemServer( 1574): Starting Activity Manager.
W/dalvikvm( 1574): threadid=17: thread exiting with uncaught exception (group=0x4000fe70)
E/AndroidRuntime( 1574): Uncaught handler: thread ActivityManager exiting due to uncaught exception
E/AndroidRuntime( 1574): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
E/AndroidRuntime( 1574): java.lang.NumberFormatException: unable to parse '' as integer
E/AndroidRuntime( 1574):        at java.lang.Integer.parseInt(Integer.java:364)
E/AKernel panic - not syncing: Attempted to kill init!
ndroidRuntime( 1574):   at java.lang.Integer.parseInt(Integer.java:333)
E/AndroidRuntime( 1574):        at java.lang.Integer.valueOf(Integer.java:590)
E/AndroidRuntime( 1574):        at com.android.server.am.ActivityManagerService.<init>(ActivityManag
erService.java:1288)
E/AndroidRuntime( 1574):        at com.android.server.am.ActivityManagerService.<init>(ActivityManag
erService.java:110)
E/AndroidRuntime( 1574):        at com.android.server.am.ActivityManagerService$AThread.run(Activity
ManagerService.java:1130)
E/AndroidRuntime( 1574): Crash logging skipped, no checkin service
I/Process ( 1574): Sending signal. PID: 1574 SIG: 9
I/ServiceManager( 1554): service 'SurfaceFlinger' died
I/ServiceManager( 1554): service 'power' died

2009/4/20 Manish Sharma <manishs...@gmail.com>

Henrik Persson

unread,
Jun 10, 2009, 4:31:26 AM6/10/09
to android...@googlegroups.com
Hi,

Did you update your init.rc? Please diff your init.rc with the one in the android tree and verify that nothing seems to be missing.

According to your log (looking in ActivityManagerService.java) HOME_APP_ADJ seems to be missing.

HOME_APP_ADJ =
Integer.valueOf(SystemProperties.get("ro.HOME_APP_ADJ"));

Best regards,
Henrik Persson

________________________________

While looking into linux-arm.mk <http://linux-arm.mk/> file I observed "TARGET_TOOLS_PREFIX" macro is hardcoded to arm-eabi toolchain.



*************
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $($(combo_target)TOOLS_PREFIX)),)
$(combo_target)TOOLS_PREFIX := \
prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.2.1/bin/arm-eabi-

*************

I have replaced this with my toolchain path and I was getting some other error this time.

*************
target SharedLib: libdl (out/target/product/generic/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
target Prelink: libdl (out/target/product/generic/symbols/system/lib/libdl.so)
external/elfcopy/elfcopy.c(1097): gelf_update_phdr(): invalid data
make: *** [out/target/product/generic/symbols/system/lib/libdl.so] Error 1
make: *** Deleting file `out/target/product/generic/symbols/system/lib/libdl.so'
*************

When I checked this on mailing list, the soultion mentioned was

*************
> Sean McNeil 写道:
>> Don't use 4.3.x. Use gcc 4.2.4 or older.
*************

I am using gcc 4.2.3 but still getting this error. Do I need to make the above change in linux-arm.mk <http://linux-arm.mk/> file?

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

Manish Sharma

unread,
Jun 10, 2009, 5:33:34 AM6/10/09
to android...@googlegroups.com
go it...
 
this is already resolved...
 
 
Regards,
MS

2009/6/10 Manish Sharma <manishs...@gmail.com>
Reply all
Reply to author
Forward
0 new messages