Got stuck when booting

29 views
Skip to first unread message

Kiki

unread,
Sep 28, 2009, 5:28:22 AM9/28/09
to android-porting
Hi all,
I was trying to port ffmpeg onto Android, but I got stuck when
booting with my "system.img".
I built libavutil, libavcodec and libavforbat first;
And I wrote a simple ffmpeg player (changed libmediaplayerservice);
Log and prelink map attaching.

Seems loading "libavformat.so" failed.
09-28 09:13:19.046: INFO/DalvikVM(593): Unable to dlopen(/system/lib/
libandroid_servers.so): Cannot load library: link_image[1638]: 553
could not load needed library 'libsystem_server.so' for
'libandroid_servers.so' (link_image[1638]: 553 could not load needed
library 'libmediaplayerservice.so' for
'libsystem_server.so' (link_image[1638]: 553 could not load needed
library 'libavformat.so' for
'libmediaplayerservice.so' (reserve_mem_region[711]: OOPS: 553
prelinked library 'libavformat.so' mapped at 0x44b74000, not at
0x2f500000)))

How to fix it? (prelinked library 'libavformat.so' mapped at
0x44b74000, not at 0x2f500000)
I addressed libavformat at 0x2f500000 in prelink map.

Kiki

unread,
Sep 29, 2009, 5:25:26 AM9/29/09
to android-porting
Hi All,

Good news!I can boot the emulator now.
I add several logs to linker.c, and the output info surprised me.
All these 3 so size are bigger than built lib size more than 50%!
That is to say, "libavcodec.so" under /out/target/product/generic/
obj/
lib is 2M,
but you can see its real size is more than 6M when running!
I gave the libavcodec.so a slot in "prelink-linux-arm.map" with the
size of 3M only, so it got stuck when booting-_-//
When I changed the slot size to 7M, booting successfully!
I hope this case can help other people.


Nevertheless, who can tell me why the lib size became so large when
running?


09-29 04:14:23.993: DEBUG/Linker(554): mmap prelinked lib
libavutil.so
at 0x33800000, size = 45056
09-29 04:14:23.993: DEBUG/Linker(554): libavutil.so is mapped to
0x33800000
09-29 04:14:23.993: DEBUG/Linker(554): mmap prelinked lib
libavcodec.so at 0x33100000, size = 6950912
09-29 04:14:23.993: DEBUG/Linker(554): libavcodec.so is mapped to
0x33100000
09-29 04:14:24.162: DEBUG/Linker(554): mmap prelinked lib
libavformat.so at 0x33000000, size = 737280
09-29 04:14:24.162: DEBUG/Linker(554): libavformat.so is mapped to
0x33000000
Reply all
Reply to author
Forward
0 new messages