[Galaxy 3 Android Development] DerpyDerp:
YEAAHH... After a few more hours of trying I finally got it working :good:

I followed these instructions and my phone was finally booting a fresh kernel. Then I changed some lines in the "rtc-s3c.c" file that does the communication with the hardware clock. After flashing this one the clock-related things (alarms, notifications, screen locking after timeout, ...) are working!

But: (yes... there's always some bad news) It somehow failed to compile correct graphic drivers (OpenFIMG?, Samsung FIMG?). For now there are some features missing. So no camera and video playback, no screenshots and a full-white bootanimation.

It'd be great if someone can point me to the right spot to fix this one too. Maybe my build chain is somehow wrong. Here is what I do:

Get the "/proc/config.gz" from the running device. Place the ".config" in the "Kernel" directory of the github sources. (Modify "rtc-s3c.c"). Run "make -j4 zImage" (cross compile "gcc" from here). Create a tar file from "arch/arm/boot/zImage". Flash...

There are some kernel modules with "*.ko"-extension. But most of them are network related and none of them look like graphic stuff. Is there some magic trick to get the graphic working again (like on the "original" 1GHz kernel)?

Edit: (here are some adb debug messages and kernel logs while graphic bugs are happening)

[ flickering (green/white) on screen rotate ]

E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glRenderbufferStorageOES(GLenum, GLenum, GLsizei, GLsizei)
E/SurfaceFlinger( 2390): GL error 0x0505
I/WindowManager( 2390): Setting rotation to 1, animFlags=0

D/dalvikvm( 2390): GC_EXPLICIT freed 488K, 39% free 5646K/9223K, external 392K/887K, paused 152ms
E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glRenderbufferStorageOES(GLenum, GLenum, GLsizei, GLsizei)
E/SurfaceFlinger( 2390): GL error 0x0505
I/WindowManager( 2390): Setting rotation to 0, animFlags=0

[ white flickering on screen lock ]

E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)
E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)
D/libsgl ( 2390): GLES error GL_INVALID_FRAMEBUFFER_OPERATION_OES in void glClear(GLbitfield)
D/libsgl ( 2390): GLES error GL_INVALID_FRAMEBUFFER_OPERATION_OES in void glDrawArrays(GLenum, GLint, GLsizei)
D/libsgl ( 2390): GLES error GL_INVALID_FRAMEBUFFER_OPERATION_OES in void glDrawArrays(GLenum, GLint, GLsizei)
D/libsgl ( 2390): GLES error GL_INVALID_FRAMEBUFFER_OPERATION_OES in void glDrawArrays(GLenum, GLint, GLsizei)
D/libsgl ( 2390): GLES error GL_INVALID_FRAMEBUFFER_OPERATION_OES in void glDrawArrays(GLenum, GLint, GLsizei)
E/SurfaceFlinger( 2390): GL error 0x0506
I/power ( 2390): *** set_screen_state 0
D/SurfaceFlinger( 2390): About to give-up screen, flinger = 0xbd650

[ Blurred background of power menu ]

E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)
E/SurfaceFlinger( 2390): GL error 0x0505
D/dalvikvm( 2522): GC_EXPLICIT freed 24K, 52% free 2934K/6023K, external 0K/0K, paused 63ms
E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)
E/SurfaceFlinger( 2390): GL error 0x0505
E/libsgl ( 2390): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2390): GLES error GL_OUT_OF_MEMORY in void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)
E/SurfaceFlinger( 2390): GL error 0x0505

[ Camera, app crash after some green screens and a second of clear preview ]

I/ActivityManager( 2396): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera } from pid 2467
I/ActivityManager( 2396): Start proc com.android.camera for activity com.android.camera/.Camera: pid=3500 uid=10042 gids={1006, 1015}
E/libsgl ( 2396): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2396): GLES error GL_OUT_OF_MEMORY in void glRenderbufferStorageOES(GLenum, GLenum, GLsizei, GLsizei)
I/WindowManager( 2396): Setting rotation to 1, animFlags=1
E/SurfaceFlinger( 2396): GL error 0x0505
I/ActivityManager( 2396): Config changed: { scale=1.0 imsi=0/0 loc=de_DE touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34 uiMode=17 seq=8 themeResource=null}
I/PCKeyboard( 2474): onConfigurationChanged()
D/dalvikvm( 3419): GC_CONCURRENT freed 166K, 48% free 2929K/5575K, external 0K/0K, paused 15ms+4ms
D/dalvikvm( 3500): GC_EXTERNAL_ALLOC freed 65K, 50% free 2711K/5379K, external 0K/0K, paused 56ms
V/CameraHolder( 3500): open camera 0
I/StagefrightPlayer( 2298): setDataSource('/system/media/audio/ui/camera_click.ogg')
D/Camera ( 3500): app passed NULL surface
I/StagefrightPlayer( 2298): setDataSource('/system/media/audio/ui/VideoRecord.ogg')
D/CameraSettings( 3500): Parameters: [brightness-max=8, brightness-min=0, brightness=4, cam-mode=0, camera-id=1, contrast-max=4, contrast-min=0, contrast=2, effect-values=none,aqua,mono,negative,sepia,whiteboard, effect=none, exposure-compensation-step=0.5, exposure-compensation=0, focal-length=3.63, focus-mode-values=auto,macro, focus-mode=auto, gps-altitude=0, gps-latitude=0.0, gps-longitude=0.0, gps-timestamp=1199145600, horizontal-view-angle=51.2, iso-values=auto,50,100,200,400,800, iso=auto, jpeg-quality=80, jpeg-thumbnail-height=384, jpeg-thumbnail-quality=100, jpeg-thumbnail-size-values=512x384,0x0, jpeg-thumbnail-width=512, max-exposure-compensation=4, max-zoom=10, metering-values=spot,center,matrix, metering=center, min-exposure-compensation=-4, min-zoom=0, picture-format-values=jpeg, picture-format=jpeg, picture-size-values=2048x1536,1600x1200,1280x960,1024x768, picture-size=2048x1536, preview-format-values=yuv420sp, preview-format=yuv420sp, preview-frame-rate-values=15, preview-frame-rate=15, preview-size-values=320x240, preview-size=320x240, rotation=0, saturation-max=0, saturation-min=4, saturation=2, scene-mode-values=auto,back-light,beach,candlelight,dusk-dawn,fall-color,fireworks,landscape,night,party,portrait,snow,sports,sunset,text, scene-mode=night, sharpness-max=4, sharpness-min=0, sharpness=2, smooth-zoom-supported=false, vertical-view-angle=39.4, whitebalance-values=auto,cloudy-daylight,daylight,fluorescent,incandescent, whitebalance=auto, zoom-factors=100,130,160,190,220,250,280,310,340,360,400, zoom-ratios=100,130,160,190,220,250,280,310,340,360,400, zoom-supported=true, zoom=0]
V/camera ( 3500): startPreview
I/ActivityManager( 2396): Displayed com.android.camera/.Camera: +1s869ms (total +14s977ms)
W/IInputConnectionWrapper( 2467): showStatusIcon on inactive InputConnection
W/SurfaceComposerClient( 2396): Destroying surface while a transaction is open. Client 0xf4270: destroying surface 6, mTransactionOpen=1
D/BaseCamera( 3500): initializeTouchFocus
D/BaseCamera( 3500): enableTouchAEC: false
D/dalvikvm( 3500): GC_CONCURRENT freed 256K, 49% free 2879K/5639K, external 75K/520K, paused 4ms+6ms
D/libEGL ( 3500): loaded /system/lib/egl/libGLES_fimg.so
D/libfimg ( 3500): Opened /dev/s3c-g3d (48).
E/libsgl ( 3500): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 3500): EGL error EGL_BAD_ALLOC in virtual bool FGLAndroidWindowSurface::connect() in line 846
D/libfimg ( 3500): fimg3D: Closed /dev/s3c-g3d (48).
W/dalvikvm( 3500): threadid=10: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 3500): FATAL EXCEPTION: GLThread 12
E/AndroidRuntime( 3500): java.lang.RuntimeException: eglMakeCurrent failed: EGL_BAD_ALLOC
E/AndroidRuntime( 3500):	at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1081)
E/AndroidRuntime( 3500):	at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1073)
E/AndroidRuntime( 3500):	at android.opengl.GLSurfaceView$EglHelper.createSurface(GLSurfaceView.java:993)
E/AndroidRuntime( 3500):	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1336)
E/AndroidRuntime( 3500):	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1119)
W/ActivityManager( 2396): Force finishing activity com.android.camera/.Camera
V/camera ( 3500): stopPreview
E/S5P6442Camera( 2298): int android::fimc_poll(int, pollfd*)::poll(1000) doesnt return
E/S5P6442Camera( 2298): int android::S5P6442Camera::m_readCamera(unsigned char*, unsigned int, unsigned int*, int)::fimc_poll fail
E/S5P6442Camera( 2298): int android::S5P6442Camera::getPreview(unsigned char*, unsigned int, unsigned int*)::m_readCamera(115200, 0) fail
E/SecCameraHardware( 2298): int android::SecCameraHardware::m_previewThreadFunc()::t_camera->getPreview fail
D/dalvikvm( 2396): GC_EXPLICIT freed 505K, 36% free 5805K/8967K, external 599K/887K, paused 152ms
E/libsgl ( 2396): EGL: Could not open PMEM device (No such file or directory)
D/libsgl ( 2396): GLES error GL_OUT_OF_MEMORY in void glRenderbufferStorageOES(GLenum, GLenum, GLsizei, GLsizei)
I/WindowManager( 2396): Setting rotation to 0, animFlags=1
E/SurfaceFlinger( 2396): GL error 0x0505
I/ActivityManager( 2396): Config changed: { scale=1.0 imsi=0/0 loc=de_DE touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=9 themeResource=null}
I/PCKeyboard( 2474): onConfigurationChanged()
D/dalvikvm( 2459): GC_CONCURRENT freed 374K, 49% free 3163K/6087K, external 305K/512K, paused 5ms+34ms
W/SurfaceComposerClient( 2396): Destroying surface while a transaction is open. Client 0xf4270: destroying surface 7, mTransactionOpen=1
I/Process ( 3500): Sending signal. PID: 3500 SIG: 9
I/ActivityManager( 2396): Process com.android.camera (pid 3500) has died.
W/InputManagerService( 2396): Got RemoteException sending setActive(false) notification to pid 3500 uid 10042

[ Camera, as above - kernel messages from /proc/kmsg ]

<7>s3c_jpeg_open: JPG_open
<6>power_supply battery: s3c_bat_store: camera = 1
<7>s3c-fimc s3c-fimc.0: fimc_s_input: index 1
<6>s3c-fimc s3c-fimc.0: clock for camera: 24000000
<4>s5k4ca cam power on
<7>s3c-fimc s3c-fimc.0: fimc_s_fmt_vid_capture
<7>s3c-fimc s3c-fimc.0: 12bpp
<7>s3c-fimc s3c-fimc.0: fimc_reqbufs_capture: requested 4 buffers
<7>s3c-fimc s3c-fimc.0: fimc_querybuf_capture: 118784 bytes with offset: 0
<7>s3c-fimc s3c-fimc.0: fimc_querybuf_capture: 118784 bytes with offset: 4096
<7>s3c-fimc s3c-fimc.0: fimc_querybuf_capture: 118784 bytes with offset: 8192
<7>s3c-fimc s3c-fimc.0: fimc_querybuf_capture: 118784 bytes with offset: 12288
<7>s3c-fimc s3c-fimc.0: fimc_cropcap_capture
<7>s3c-fimc s3c-fimc.0: fimc_s_ctrl_capture
<7>s3c-fimc s3c-fimc.0: fimc_s_ctrl_capture
<7>s3c-fimc s3c-fimc.0: fimc_s_ctrl_capture
<7>s3c-fimc s3c-fimc.0: fimc_s_ctrl_capture
<7>s3c-fimc s3c-fimc.0: fimc_streamon_capture
<7>s3c-fimc s3c-fimc.0: fimc_start_capture
<4>s5k4ca_skip_green_frame = 7
<7>s3c-fimc s3c-fimc.0: fimc_streamoff_capture
<7>s3c-fimc s3c-fimc.0: fimc_stop_capture
<7>s3c_jpeg_release: JPG_Close
<4>s5k4ca cam power off
<6>s3c-fimc s3c-fimc.0: fimc_release: successfully released
<6>power_supply battery: s3c_bat_store: camera = 0

Edit2: Just adding that it's not the Camera itself that crashes. I've got another camera app (AsciiCam) that has fine preview and captures correctly.