Porting to SH4

by Jimmy-Creupagu » Thu, 17 Sep 2009 22:05:50 GMT


Sponsored Links
 Hi all!

I'm trying to port Android to SH4 arch.
I downloaded all the patches I could find from the web and from:

https://review.source.android.com/#dashboard,1001893

Also, few changes from the link are now merged in master branch.

Recently I updated my build system to "donut" but I'm having more
errors than before...
This kind of errors doesn't happen in compiling for TARGET_ARCH=arm




u...@user-desktop:~/ANDROID$ make TARGET_ARCH=sh -j2 showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=sh
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================
build/core/copy_headers.mk:15: warning: overriding commands for target
`out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/generic/obj/include/libpv/
getactualaacconfig.h'


[...]

# FIRST ERROR

make: *** No rule to make target `out/host/linux-x86/bin/emulator',
needed by `out/host/linux-x86/bin/dexpreopt.py'.  Stop.

## to avoid the problem I defined in product_config.mk:

ifeq ($(TARGET_ARCH),sh)
  DISABLE_DEXPREOPT := true
endif

## Is that a known issue??

## I then tried to build only the pseudo target "libc" ... but I
obtain:

error: asm-generic/int-ll64.h: No such file or directory

error: linux/const.h: No such file or directory

# this files are missing in donut but not in cupcake. I copied them
from my cupcake bkup dir.
# Then ...

bionic/libc/unistd/socketcalls.c:235: error: conflicting types for
'sendmsg'
bionic/libc/include/sys/socket.h:74: error: previous declaration of
'sendmsg' was here
bionic/libc/unistd/socketcalls.c:248: error: conflicting types for
'recvmsg'
bionic/libc/include/sys/socket.h:75: error: previous declaration of
'recvmsg' was here

# I modified socketcalls.c and changed "ssize_t" to "int" to be in
accordance with socket.h
#BUT WHY does arm not show the same issue??
# with this modifications I achieve to compile "libc"



##DALVIKVM
## then I tried to build "dalvikvm" with the same config as before...

external/openssl/crypto/ui/ui_openssl.c:224:21:  error: termio.h: No
such file or directory

## As far as I understand, I miss some define somewhere because TERMIO
is defined... but it
## shouldn't...is it?




## Can you give me some hints about what to do?
Should I add some definitions?
go back to cupcake maybe?

Thanks!

Jimmy



--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Porting to SH4

by Jean-Baptiste Queru » Thu, 17 Sep 2009 22:25:02 GMT


 he dexpreopt part makes sense: dexpreopt needs to run the target
image in an emulator so that it can run the code in the exact target
environment, and there's no sh emulator (deep inside, this implies
that dexpreopt for sh would have to be done on actual hardware).

I don't have any direct idea for the other issues, but my guess is
that the kernel headers you're using for sh don't match what bionic
(the android C library) expects.

JBQ

On Thu, Sep 17, 2009 at 7:05 AM, Jimmy-Creupagu <jamai5...@gmail.com> wrote:



--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Porting to SH4

by Jimmy-Creupagu » Fri, 18 Sep 2009 17:35:03 GMT


 n Sep 17, 4:24pm, Jean-Baptiste Queru <j...@android.com> wrote:

THANKS JBQ!! That's something we can work in the next future




I'll check the kernel headers ASAP.

About the conflicting types, ssize_t and int, I read the comment of
David Turner to the patch: he said they should be ssize_t cause it's
an ABI violation.

But in bionic/libc/include/sys/socket.h , the header states they are
"int" type. Can you clarify it?



Thank you very much

Jimmy

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Porting to SH4

by Jean-Baptiste Queru » Fri, 18 Sep 2009 20:53:57 GMT


 o be honest, I'm not aware of the deep details around the two socket
functions or why there seems to be a disagreement about whether those
should return int or ssize_t. The best place to have that discussion
is to directly comment on the code review site, since that will reach
the right people.

Because I'm not familiar with the mechanisms involved in putting the
syscalls together, I don't quite know where to look. My best guess is
that there's a mismatch between the bionic headers and the linux
syscall interface, but I'm not immediately in a position to research
the history of that mismatch. Hopefully I'll have more time for it in
the near future.

JBQ

On Fri, Sep 18, 2009 at 2:34 AM, Jimmy-Creupagu <jamai5...@gmail.com> wrote:



--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. DB Android Blogger & Android Developer

Hi,

What's the Difference Between Android Blogger & Android Developer?...


-- 
Thanks & Regards
Sasikumar.S

-- 

2. Keyboard Typing Error

Hi,


I have set my textview as editable.

When i try to type in textview with my PC keyboard its working fine.
When i tried with Android Keyboard it is showing

02-10 11:34:01.151: ERROR/AndroidRuntime(291): Uncaught handler: thread main
exiting due to uncaught exception
02-10 11:34:01.200: ERROR/AndroidRuntime(291):
java.lang.IndexOutOfBoundsException: getChars (-1 ... 0) starts before 0
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:949)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:847)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.text.TextUtils.getChars(TextUtils.java:69)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.text.TextUtils.substring(TextUtils.java:255)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.view.inputmethod.BaseInputConnection.getTextAfterCursor(BaseInputConnection.java:339)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:170)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:57)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.os.Handler.dispatchMessage(Handler.java:99)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.os.Looper.loop(Looper.java:123)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
android.app.ActivityThread.main(ActivityThread.java:4363)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
java.lang.reflect.Method.invokeNative(Native Method)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
java.lang.reflect.Method.invoke(Method.java:521)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-10 11:34:01.200: ERROR/AndroidRuntime(291):     at
dalvik.system.NativeStart.main(Native Method)


what's this actually?..

How can type using android keyboard.

-- 
Thanks & Regards
Sasikumar.S

-- 

3. GridView for Buttons, not images

4. Another flight information apk

5. eclipse help cant find canvas?

6. TextView with Clear Button

7. How can I draw a simple shape with shapedrawable?