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:


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
build/core/copy_headers.mk:15: warning: overriding commands for target
build/core/copy_headers.mk:15: warning: ignoring old commands for
target `out/target/product/generic/obj/include/libpv/



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)

## Is that a known issue??

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

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
bionic/libc/include/sys/socket.h:74: error: previous declaration of
'sendmsg' was here
bionic/libc/unistd/socketcalls.c:248: error: conflicting types for
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"

## 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?





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.


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



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




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.


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



Other Threads

1. Handling Orientation Changes that occur in another Activity

I am having an interesting problem and would appreciate any advice. My
app uses WebView as its primary view. Using a javascript hook, it can
launch the camera so the user can take a picture. The camera is
launched using

Intent i = new

When the camera starts, it makes sense to use landscape mode, so the
user naturally turns the phone on its side. After the user takes a
picture, control returns to my launching Activity (actually, my
Acitivity gets restarted because it usually gets destroyed to free up
memory for the camera on my Moto Droid). When my WebView gets
recreated, I restore its state from the Bundle I saved in

Now everything looks ok, except the phone is still in landscape mode.
However, when the user turns the phone upright bringing back into
portrait mode, my WebView takes up only half of the screen. Somewhere
along the way, the scale of my WebView got lost. This seems like such
a minor issue, but it is driving me crazy.

Does anyone have an idea why this might be happening? What is the
correct way to preserve the scale of my WebView? I am hesitant to hard
code any scale factors because what looks good on my device may not be
the same for another.



2. Android to PC communication trough USB

anybody knows a code example for communicate one android application to a
desktop java application to do something like update one desktop mysql
database for example? I want this connection trough usb cable (i think). I
dont wanna make this connection trough http.


Felipe Toms Ovalle / ftovalle
Desarrollo de Sistemas Java, Android, Php
Tel. 54 341 155 052447 -
www.ftovalle.com.ar -
Msn: ftova...@hotmail.com -
Skype: ftovalle


3. Call a service hosted in a windows service from Android

4. How to tell which permission are required?

5. Re[2]: Galaxy S

6. Android Display through Composite Output

7. (WTA) Motodroid no Sound