I'd like to ask you help about the basics of adding a new HAL (gralloc) lib to AOSP.
I've received the source code from the developers I mentioned below, but I'm having troubles integrating it for the final build. The build succeeds, but I have unexpected behaviour on the real device. First, I compiled leaving the default gralloc in place, so that I had both libgralloc.so and libgralloc.emxx.so built ("emxx" is the device name). Installing this buil on the deice, screen was shown but flashing repeatedly at each image refresh or update. So I thoght about removing the default gralloc from the build, by commenting out (in hardware/libhardware/Android.mk) the "modulesgrallc" line, like below: ---------------------------- diff --git a/Android.mk b/Android.mk index 967a096..7857b61 100644 --- a/Android.mk +++ b/Android.mk @@ -32,7 +32,6 @@ LOCAL_MODULE:= libhardware include $(BUILD_SHARED_LIBRARY) include $(addsuffix /Android.mk, $(addprefix $(LOCAL_PATH)/, \ - modules/gralloc \ tests \ )) - ---------------------------- This way I get these libs: ---------------------------- cd out/target/product/emev/ find . -name "*gralloc*so" ./obj/lib/gralloc.emxx.so ./obj/SHARED_LIBRARIES/gralloc.emev_intermediates/LINKED/gralloc.emxx.so ./symbols/system/lib/hw/gralloc.emxx.so ---------------------------- That didn't solved my problem, but the issue has now shifted to something I don't understand. With this new build, I can reach the init stages on the device and also connect to it with "adb shell". So, I can look at logcat, which keeps looping into the crash I report below. The critical message I think is: E/FramebufferNativeWindow( 1425): Couldn't get gralloc module which I don't understand. What could I be missing in my build? Complete logcat crash report: --------------- ... D/dalvikvm( 1417): GC_EXPLICIT freed 28K, 5% free 1403K/1475K, external 0K/0K, paused 46ms D/dalvikvm( 1417): GC_EXPLICIT freed 31K, 3% free 1442K/1475K, external 0K/0K, paused 47ms D/dalvikvm( 1417): GC_EXPLICIT freed 38K, 6% free 1459K/1539K, external 0K/0K, paused 47ms D/dalvikvm( 1417): GC_EXPLICIT freed 41K, 5% free 1474K/1539K, external 0K/0K, paused 691ms D/dalvikvm( 1417): GC_EXPLICIT freed 55K, 8% free 1487K/1603K, external 0K/0K, paused 49ms D/dalvikvm( 1417): GC_FOR_MALLOC freed 2889K, 57% free 2234K/5123K, external 0K/0K, paused 139ms D/dalvikvm( 1417): GC_EXPLICIT freed 2398K, 52% free 2483K/5123K, external 0K/0K, paused 128ms D/dalvikvm( 1417): GC_EXPLICIT freed 112K, 51% free 2541K/5123K, external 0K/0K, paused 91ms D/dalvikvm( 1417): GC_EXPLICIT freed 74K, 50% free 2566K/5123K, external 0K/0K, paused 93ms D/dalvikvm( 1417): GC_EXPLICIT freed 36K, 50% free 2583K/5123K, external 0K/0K, paused 93ms D/dalvikvm( 1417): GC_EXPLICIT freed 30K, 50% free 2607K/5123K, external 0K/0K, paused 93ms D/dalvikvm( 1417): GC_EXPLICIT freed 39K, 49% free 2629K/5123K, external 0K/0K, paused 93ms I/Zygote ( 1417): ...preloaded 1829 classes in 6818ms. E/Zygote ( 1417): setreuid() failed. errno: 17 D/dalvikvm( 1417): GC_EXPLICIT freed 19K, 49% free 2627K/5123K, external 0K/0K, paused 92ms I/Zygote ( 1417): Preloading resources... D/dalvikvm( 1417): GC_EXTERNAL_ALLOC freed <1K, 49% free 2629K/5123K, external 0K/0K, paused 92ms D/dalvikvm( 1417): GC_EXPLICIT freed 15K, 48% free 2668K/5123K, external 414K/521K, paused 93ms D/dalvikvm( 1417): GC_EXTERNAL_ALLOC freed 7K, 48% free 2679K/5123K, external 516K/521K, paused 94ms I/Zygote ( 1417): ...preloaded 51 resources in 884ms. I/Zygote ( 1417): ...preloaded 15 resources in 9ms. D/dalvikvm( 1417): GC_EXPLICIT freed 14K, 48% free 2703K/5123K, external 716K/1038K, paused 96ms D/dalvikvm( 1417): GC_EXPLICIT freed 8K, 48% free 2694K/5123K, external 716K/1038K, paused 96ms D/dalvikvm( 1417): GC_EXPLICIT freed 1K, 48% free 2693K/5123K, external 716K/1038K, paused 95ms I/dalvikvm( 1417): System server process 1425 has been created I/Zygote ( 1417): Accepting command socket connections E/BatteryService( 1425): batteryVoltagePath not found E/BatteryService( 1425): batteryTemperaturePath not found I/sysproc ( 1425): Entered system_init() I/sysproc ( 1425): ServiceManager: 0xef718 I/SurfaceFlinger( 1425): SurfaceFlinger is starting I/SurfaceFlinger( 1425): SurfaceFlinger's main thread ready to run. Initializing graphics H/W... E/FramebufferNativeWindow( 1425): Couldn't get gralloc module I/DEBUG ( 492): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 492): Build fingerprint: 'emxx/full_renesas_emev/emev: 2.3.6/GRK39F/eng.ffxx68.20120417.145606:eng/test-keys' I/DEBUG ( 492): pid: 1425, tid: 1433 >>> system_server <<< I/DEBUG ( 492): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000005c I/DEBUG ( 492): r0 0000d520 r1 441acdc4 r2 00000001 r3 00000000 I/DEBUG ( 492): r4 00090a78 r5 001e0388 r6 fffffec0 r7 00000000 I/DEBUG ( 492): r8 ac52c758 r9 000ed788 10 00100000 fp 00000001 I/DEBUG ( 492): ip ac52c7b4 sp 441acd68 lr af904a14 pc ac5190a0 cpsr 60000030 I/DEBUG ( 492): d0 0000000000000000 d1 69616d207327726d I/DEBUG ( 492): d2 646165726874206f d3 7420796461657264 I/DEBUG ( 492): d4 49202e6e7572206f d5 7a696c616974696e I/DEBUG ( 492): d6 7061726720676e69 d7 0000000073636968 I/DEBUG ( 492): d8 0000000000000000 d9 0000000000000000 I/DEBUG ( 492): d10 0000000000000000 d11 0000000000000000 I/DEBUG ( 492): d12 0000000000000000 d13 0000000000000000 I/DEBUG ( 492): d14 0000000000000000 d15 0000000000000000 I/DEBUG ( 492): d16 000000004050e220 d17 3fe999999999999a I/DEBUG ( 492): d18 42eccefa43de3400 d19 3fbc71c71c71c71c I/DEBUG ( 492): d20 4008000000000000 d21 3fd99a27ad32ddf5 I/DEBUG ( 492): d22 3fd24998d6307188 d23 3fcc7288e957b53b I/DEBUG ( 492): d24 3fc74721cad6b0ed d25 3fc39a09d078c69f I/DEBUG ( 492): d26 0000000000000000 d27 0000000000000000 I/DEBUG ( 492): d28 0000000000000000 d29 0000000000000000 I/DEBUG ( 492): d30 0000000000000000 d31 0000000000000000 I/DEBUG ( 492): scr 20000010 I/DEBUG ( 492): I/DEBUG ( 492): #00 pc 000190a0 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): #01 pc 000195c4 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): #02 pc 00024364 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): #03 pc 0001ca48 /system/lib/libutils.so I/DEBUG ( 492): #04 pc 0001cfba /system/lib/libutils.so I/DEBUG ( 492): #05 pc 00011920 /system/lib/libc.so I/DEBUG ( 492): #06 pc 000114ec /system/lib/libc.so I/DEBUG ( 492): I/DEBUG ( 492): code around pc: I/DEBUG ( 492): ac519080 ffb8f7ff edd06ca0 23000a0b 6ec7a917 I/DEBUG ( 492): ac519090 0a07edc4 0a0ced90 0450f8df 0a08ed84 I/DEBUG ( 492): ac5190a0 7a17edd7 edc44478 64e37a09 e86ef7fe I/DEBUG ( 492): ac5190b0 9817b940 024cf104 1434f8df 44796945 I/DEBUG ( 492): ac5190c0 4798682b e42cf8df 0924f10d ad182600 I/DEBUG ( 492): I/DEBUG ( 492): code around lr: I/DEBUG ( 492): af9049f4 e1853f92 e3530000 1afffffa e8bd8070 I/DEBUG ( 492): af904a04 e92d4070 e1a04000 e1a05001 ebffffd3 I/DEBUG ( 492): af904a14 e1950f9f e0802004 e1853f92 e3530000 I/DEBUG ( 492): af904a24 1afffffa e8bd8070 e1a01000 e3e00000 I/DEBUG ( 492): af904a34 eafffff2 e1a01000 e3a00001 eaffffef I/DEBUG ( 492): I/DEBUG ( 492): stack: I/DEBUG ( 492): 441acd28 001e03fc I/DEBUG ( 492): 441acd2c ab91ae3d /system/lib/libui.so I/DEBUG ( 492): 441acd30 ab92b1fd /system/lib/libui.so I/DEBUG ( 492): 441acd34 c60d2a83 I/DEBUG ( 492): 441acd38 00100000 I/DEBUG ( 492): 441acd3c afd13f03 /system/lib/libc.so I/DEBUG ( 492): 441acd40 00090a78 I/DEBUG ( 492): 441acd44 00000000 I/DEBUG ( 492): 441acd48 00090ac0 I/DEBUG ( 492): 441acd4c 001e0388 I/DEBUG ( 492): 441acd50 fffffec0 I/DEBUG ( 492): 441acd54 ac519005 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): 441acd58 00090a78 I/DEBUG ( 492): 441acd5c 001e0388 I/DEBUG ( 492): 441acd60 df002777 I/DEBUG ( 492): 441acd64 e3a070ad I/DEBUG ( 492): #00 441acd68 ac5267a6 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): 441acd6c a811cf29 /system/lib/libutils.so I/DEBUG ( 492): 441acd70 fffffff8 I/DEBUG ( 492): 441acd74 000edb20 I/DEBUG ( 492): 441acd78 00000000 I/DEBUG ( 492): 441acd7c 00094dc0 I/DEBUG ( 492): 441acd80 00000000 I/DEBUG ( 492): 441acd84 000edb20 I/DEBUG ( 492): 441acd88 00000001 I/DEBUG ( 492): 441acd8c a811ce33 /system/lib/libutils.so I/DEBUG ( 492): 441acd90 00000000 I/DEBUG ( 492): 441acd94 00000000 I/DEBUG ( 492): 441acd98 00000000 I/DEBUG ( 492): 441acd9c 00000000 I/DEBUG ( 492): 441acda0 00000000 I/DEBUG ( 492): 441acda4 00000001 I/DEBUG ( 492): 441acda8 00000000 I/DEBUG ( 492): 441acdac 00100000 I/DEBUG ( 492): 441acdb0 00001000 I/DEBUG ( 492): 441acdb4 00000000 I/DEBUG ( 492): 441acdb8 00000000 I/DEBUG ( 492): 441acdbc 001480f8 I/DEBUG ( 492): 441acdc0 00000000 I/DEBUG ( 492): 441acdc4 afd10d9c /system/lib/libc.so I/DEBUG ( 492): 441acdc8 00094db8 I/DEBUG ( 492): 441acdcc 00000001 I/DEBUG ( 492): 441acdd0 00000000 I/DEBUG ( 492): 441acdd4 ac5267a6 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): 441acdd8 00094dd4 I/DEBUG ( 492): 441acddc 00094dc4 I/DEBUG ( 492): 441acde0 00000000 I/DEBUG ( 492): 441acde4 a811cf1b /system/lib/libutils.so I/DEBUG ( 492): 441acde8 00000000 I/DEBUG ( 492): 441acdec 00094dc0 I/DEBUG ( 492): 441acdf0 a811ce79 /system/lib/libutils.so I/DEBUG ( 492): 441acdf4 00090ad0 I/DEBUG ( 492): 441acdf8 441ace84 I/DEBUG ( 492): 441acdfc 00141d20 I/DEBUG ( 492): 441ace00 00090a78 I/DEBUG ( 492): 441ace04 000ed788 I/DEBUG ( 492): 441ace08 00100000 I/DEBUG ( 492): 441ace0c ac51963b /system/lib/libsurfaceflinger.so I/DEBUG ( 492): 441ace10 00094df0 I/DEBUG ( 492): 441ace14 ac51964f /system/lib/libsurfaceflinger.so I/DEBUG ( 492): 441ace18 00094df0 I/DEBUG ( 492): 441ace1c a8114cf3 /system/lib/libutils.so I/DEBUG ( 492): 441ace20 00090a78 I/DEBUG ( 492): 441ace24 c60d2a83 I/DEBUG ( 492): 441ace28 ac52cc84 I/DEBUG ( 492): 441ace2c 00090a78 I/DEBUG ( 492): 441ace30 00000000 I/DEBUG ( 492): 441ace34 441ace84 I/DEBUG ( 492): 441ace38 00141d20 I/DEBUG ( 492): 441ace3c 00090a78 I/DEBUG ( 492): 441ace40 000ed788 I/DEBUG ( 492): 441ace44 00100000 I/DEBUG ( 492): 441ace48 00000001 I/DEBUG ( 492): 441ace4c ac5195c9 /system/lib/libsurfaceflinger.so I/DEBUG ( 492): #01 441ace50 00141c90 I/DEBUG ( 492): 441ace54 ac52b7f4 I/DEBUG ( 492): 441ace58 441ace84 I/DEBUG ( 492): 441ace5c ac524369 /system/lib/libsurfaceflinger.so D/Zygote ( 1417): Process 1425 terminated by signal (11) I/Zygote ( 1417): Exit zygote because system server (1425) has terminated I/ServiceManager( 44): service 'media.audio_flinger' died I/ServiceManager( 44): service 'media.audio_policy' died I/ServiceManager( 44): service 'media.player' died I/ServiceManager( 44): service 'media.camera' died I/Netd ( 1436): Netd 1.0 starting D/AndroidRuntime( 1437): D/AndroidRuntime( 1437): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<< D/AndroidRuntime( 1437): CheckJNI is ON D/dalvikvm( 1437): creating instr width table I/ ( 1435): ServiceManager: 0xad50 W/AudioHardwareInterface( 1435): Using stubbed audio hardware. No sound will be produced. D/AudioHardwareInterface( 1435): setMode(NORMAL) I/CameraService( 1435): CameraService started (pid=1435) I/AudioFlinger( 1435): AudioFlinger's thread 0xc638 ready to run I/SamplingProfilerIntegration( 1437): Profiler is disabled. I/Zygote ( 1437): Preloading classes... D/dalvikvm( 1437): GC_EXPLICIT freed 47K, 78% free 232K/1024K, external 0K/0K, paused 8ms D/dalvikvm( 1437): GC_EXPLICIT freed 1K, 73% free 282K/1024K, external 0K/0K, paused 8ms D/dalvikvm( 1437): GC_EXPLICIT freed 20K, 70% free 315K/1024K, external 0K/0K, paused 9ms D/dalvikvm( 1437): GC_EXPLICIT freed 17K, 66% free 353K/1024K, external 0K/0K, paused 10ms D/dalvikvm( 1437): GC_EXPLICIT freed 26K, 63% free 381K/1024K, external 0K/0K, paused 11ms D/dalvikvm( 1437): GC_EXPLICIT freed 22K, 58% free 440K/1024K, external 0K/0K, paused 12ms W/MediaProfiles( 1437): could not find media config xml file D/dalvikvm( 1437): GC_EXPLICIT freed 99K, 47% free 545K/1024K, external 0K/0K, paused 16ms ... On Friday, 13 April 2012 11:10:52 UTC+2, ffxx68 wrote: > > Hi experts. > > I've started a new project about porting AOSP (2.3.6 for the time being) > to a tablet which I own. I have created the git repositories and a > discussion group as well for this project: > > https://github.com/ffxx68 > https://groups.google.com/forum/?fromgroups#!forum/renesas-emev-osp > > I know that in order to complete such a project I need the hardware > drivers in the kernel as well as the HAL for Android. The Renesas EMMA EV2 > Kernel was made publicly available, but for a Development Board. So it > needs adaptation to my tablet hardware. For that, as as well as for the > HAL, I can luckily count on the help of people who have contributed to the > development of the platform, who can provide hints and already helped > checking in the LCD and touchscreen code. > > Now I'm coming to the more Android-build specific tasks, which I'm not an > expert about and I'd appreciate the help from you as well. > > My first point is: I've created a device/renesas/emev directory under the > AOSP structure (find it in GitHub), with some device-specific makefiles, > but I'm not sure if I have done all I should to build for the emulator, or > the real device. For example, I can't find as the outcome of the build, the > init.<device>.rc. Is this mandatory? Should I provide the same? > > Any other help or contribution is welcome! > > thanks > Fabio > -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting