This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Porting Android to Sitara AM3894, based board, video problem

Other Parts Discussed in Thread: AM3894

Hello,

I'm porting Android OS to board based on Sitara AM3894, and it seems to be a problem when loading video drivers (vpss, fb, hdmi...), when booting Linux. I'm using PSP that I downloaded from this website http://code.google.com/p/rowboat/wiki/TI81xxWithMultimediaAcceleration. This package works just fine on TI8168evm board, that we are using as reference system for our port, video drivers are loaded when Linux kernel is booted.

On log screen I don't get any error messages regarding video drivers, to let me know what could be a problem at start-up. Linux kernel is alive, because I get prompt and I can execute commands in it. In attachment I'm sending list of devices that are integrated in kernel after boot. 0652.list_of_devices.txt

Can you give me some tips/solutions were are potential problems regarding this issue?

Best regards,

Srdjan

  • Hi Srdjan,

    Please send complete boot log to debug this issue further.

    Did  you try with the prebuilt image mentioned in below link under "TI_Android_GingerBread_2.3_DevKit_2.0 Pre-built (compiled) Images" section?

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_DevKit_2_0/index_FDS.html

    Regards,

    Pankaj Bharadiya

  • Hi Pankaj,

    this is the boot log of kernel built with that PSP that I mentioned before: 8345.kernel boot log.txt.

    As you suggested, I tried prebuilt images from site. I listed drivers that are integrated in kernel and this is the list: 8231.devices loaded.txt. As I can see, video drivers are now loaded, but still there is no picture on monitor. Board is connected to monitor via HDMI connector!

    Boot log of prebuilt kernel is this: 3034.kernel log with prebuild images.txt

    Kind regards,

    Srdjan

  • Hi Srdjan,

    Prebuilt Image log said:

    init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
    init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
    # SysLink version : 02.00.00.67_alpha2
    SysLink module created on Date:Apr 26 2011 Time:11:44:28
    Entered KnlUtilsDrv_initializeModule
    traceMask value: 0x0
    Leaving KnlUtilsDrv_initializeModule 0x0
    omaplfb: OMAPLFB_Init: OMAPLFBInit failed

     

    From the prebuilt image log, it looks like SGX initialization is not happening properly.

    Please try the following.

    1. Unload SGX drivers if these are loaded already

       # rmmod pvrsrvkm.ko
       # rmmod omaplfb.ko

    2. Initialize and load SGX drivers.

       # /system/bin/devmem2 0x48180F04 w 0x0
       # /system/bin/devmem2 0x48180900 w 0x2
       # /system/bin/devmem2 0x48180920 w 0x2
       # insmod /system/bin/sgx/pvrsrvkm.ko
       # insmod /system/bin/sgx/omaplfb.ko
       # chmod 0666 /dev/pvrsrvkm
       # /system/bin/pvrsrvinit

    Kindly post error logs (if any), lsmod command output and logcat command output.

    Regards,

    Pankaj Bharadiya

  • Hi Pankaj,

    I tried the things you suggested and this is what I got as a response:

    1. after boot I typed lsmod and this my output:
      # lsmod
      omaplfb 10562 0 - Live 0xbf1ce000
      TI81xx_hdmi 11362 0 - Live 0xbf193000
      ti81xxfb 21154 1 - Live 0xbf187000
      vpss 59445 1 ti81xxfb, Live 0xbf165000
      pvrsrvkm 155728 31 omaplfb, Live 0xbf132000
      syslink 1051120 1 vpss, Live 0xbf000000

      It looks like the drivers are loaded properly. Then when I try to remove omaplfb I get thise message:
      omaplfb: OMAPLFBDeInitDev: Device 0: PVR Device 1: Couldn't remove device from PVR Services
      omaplfb: OMAPLFB_Cleanup: OMAPLFBDeInit failed

      And driver isn't removed at all. The scenario is same when I try to remove pvrsrvkm!

    2. Next thing I tried is to comment the line in init.rc script, that initially calls pvr service. So I can, by hand, execute commands that are loading SGX drivers. When boot is finished, when I type lsmod those two drivers are not loaded, as I wanted.

      TI81xx_hdmi 11362 0 - Live 0xbf158000
      ti81xxfb 21154 0 - Live 0xbf14c000
      vpss 59445 1 ti81xxfb, Live 0xbf132000
      syslink 1051120 1 vpss, Live 0xbf000000

      When I executed all those commands that you typed, nothing happened. After command /system/bin/devmem2 0x48180F04 w 0x0, I got this on terminal
      /dev/mem opened.
      Memory mapped at address 0x401ef000.
      Value at address 0x48180F04 (0x401eff04): 0x1
      Written 0x0; readback 0x0

      After those memory initialisation commands I load drivers successfully but still there is no output on monitors screen.  lsmod gives this output now:
      omaplfb 10562 0 - Live 0xbf12c000
      pvrsrvkm 155728 15 omaplfb, Live 0xbf103000
      TI81xx_hdmi 11362 0 - Live 0xbf158000
      ti81xxfb 21154 1 - Live 0xbf14c000
      vpss 59445 1 ti81xxfb, Live 0xbf132000
      syslink 1051120 1 vpss, Live 0xbf000000

    3. This is what I managed to capture from log screen 4810.logcat_output.txt

      Regards,

      Srdjan




  • Hi Srdjan,

    logcat output said:
    /libEGL  ( 1132): eglSetSwapRectangleANDROID:1816 error 3008 (EGL_BAD_DISPLAY)
    I/SurfaceFlinger( 1132): EGL informations:
    I/SurfaceFlinger( 1132): # of configs : 36
    I/SurfaceFlinger( 1132): vendor : Android
    I/SurfaceFlinger( 1132): version : 1.4 Android META-EGL
    I/SurfaceFlinger( 1132): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer EGL_ANDROID_swap_rectangle
    I/SurfaceFlinger( 1132): Client API: OpenGL ES
    I/SurfaceFlinger( 1132): EGLSurface: 8-8-8-8, config=0x1
    I/SurfaceFlinger( 1132): OpenGL informations:
    I/SurfaceFlinger( 1132): vendor : Imagination Technologies
    I/SurfaceFlinger( 1132): renderer : PowerVR SGX 530
    I/SurfaceFlinger( 1132): version : OpenGL ES-CM 1.1


    .
    .
    .

    D/dalvikvm( 1132): GC_CONCURRENT freed 205K, 45% free 3561K/6407K, external 716K/1038K, paused 2ms+2ms
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    W/AudioSystem( 1123): AudioFlinger not published, waiting...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...
    I/ServiceManager( 1123): Waiting for service media.audio_flinger...



    From the logcat output it looks like sgx drivers are loaded properly.
    System is stuck at "Waiting for service media.audio_flinger..." loop.

    1. Kindly reboot the board with same procedure as you followed earlier.
    2. If you still get "I/ServiceManager( 1123): Waiting for service media.audio_flinger..." log in logcat, then kill Service manager process.
    $ kill 1123

    Regards,
    Pankaj Bharadiya


  • Hi Pankaj,

    thanks on you help, this is what I tried:

    I rebooted the board, after that I typed all commands for loading SGX drivers. Drivers loaded just fine. Than I looked at logcat's output to find what is the PID of that "I/ServiceManager( 1123): Waiting for service media.audio_flinger..." process that jams the system. I've killed it and this is what I get on screen:

    arm_release: clear alarm, pending 0
    alarm_release: clear alarm, pending 0
    request_suspend_state: wakeup (0->0) at 182221483811 (1970-01-02 00:02:52.529590031 UTC)
    init: untracked pid 338 exited
    init: untracked pid 392 exited
    init: untracked pid 406 exited
    init: untracked pid 407 exited
    init: untracked pid 447 exited
    init: untracked pid 476 exited
    init: untracked pid 488 exited
    init: untracked pid 498 exited
    init: untracked pid 508 exited
    init: untracked pid 525 exited
    init: untracked pid 541 exited
    init: untracked pid 549 exited
     OMAPLFBManualSync Not Supported
    init: untracked pid 557 exited
    init: untracked pid 565 exited
    init: untracked pid 401 exited

    And it seems that nothing happened regarding monitor, there is not even I backlight on. Just in case, I'm sending you logcat output after I done all thing mentioned above 1067.logcat_andro.txt

    Best regards,

    Srdjan

  • Hi Srdjan,

    Logcat output said:
    W/AudioSystem(  342): AudioFlinger not published, waiting...
    I/ServiceManager( 488): Waiting for service media.player...
    I/ServiceManager( 342): Waiting for service media.audio_flinger...
    I/ServiceManager( 488): Waiting for service media.player...
    I/ServiceManager( 342): Waiting for service media.audio_flinger...
    D/Zygote ( 340): Process 342 terminated by signal (15)
    I/Zygote ( 340): Exit zygote because system server (342) has terminated
    E/installd( 57): eof
    E/installd( 57): failed to read size
    I/installd( 57): closing connection
    I/ServiceManager( 49): service 'media.audio_policy' died
    I/ServiceManager( 49): service 'isms' died
    I/ServiceManager( 49): service 'simphonebook' died
    I/ServiceManager( 49): service 'iphonesubinfo' died
    I/ServiceManager( 49): service 'phone' died
    I/ServiceManager( 49): service 'SurfaceFlinger' died
    I/ServiceManager( 49): service 'sensorservice' died
    .
    .
    .

    I/SurfaceFlinger( 581): Client API: OpenGL ES
    I/SurfaceFlinger( 581): EGLSurface: 8-8-8-8, config=0x1
    I/SurfaceFlinger( 581): OpenGL informations:
    I/SurfaceFlinger( 581): vendor : Imagination Technologies
    I/SurfaceFlinger( 581): renderer : PowerVR SGX 530
    I/SurfaceFlinger( 581): version : OpenGL ES-CM 1.1
    I/SurfaceFlinger( 581): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_sprite GL_OES_point_size_array GL_OES_matrix_palette GL_OES_draw_texture GL_OES_query_matrix GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_cube_map GL_OES_blend_subtract GL_OES_blend_func_separate GL_OES_blend_equation_separate GL_OES_stencil_wrap GL_OES_extended_matrix_palette GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_stencil8 GL_OES_compressed_ETC1_RGB8_texture GL_OES_mapbuffer GL_OES_EGL_image GL_EXT_multi_draw_arrays GL_OES_required_internalformat GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_IMG_texture_format_BGRA8888 GL_EXT_texture_format_BGRA8888 GL_IMG_texture_stream GL_OES_egl_sync GL_IMG_vertex_array_object
    I/SurfaceFlinger( 581): GL_MAX_TEXTURE_SIZE = 2048
    I/SurfaceFlinger( 581): GL_MAX_VIEWPORT_DIMS = 2048
    I/SurfaceFlinger( 581): flags = 00010000
    D/SensorService( 581): nuSensorService starting...
    E/SensorService( 581): couldn't load sensors module (No such file or directory)
    I/sysproc ( 581): System server: starting Android runtime.
    I/sysproc ( 581): System server: starting Android services.
    I/sysproc ( 581): System server: entering thread pool.
    I/SystemServer( 581): Entered the Android system server!
    I/SystemServer( 581): Entropy Service
    D/libEGL ( 592): loaded /system/lib/egl/libGLES_android.so
    D/libEGL ( 592): loaded /system/lib/egl/libEGL_POWERVR_SGX530_125.so
    E/SurfaceFlinger( 581): eglSwapBuffers: EGL error 0x3008 (EGL_BAD_DISPLAY)
    D/libEGL ( 592): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so
    I/SystemServer( 581): Power Manager
    .
    .
    .

    I/ActivityThread( 696): Pub call_log: com.android.providers.contacts.CallLogProvider
    I/ActivityThread( 696): Pub user_dictionary: com.android.providers.userdictionary.UserDictionaryProvider
    I/SurfaceFlinger( 581): Boot is finished (57050 ms)
    D/PowerManagerService( 581): bootCompleted
    D/OtaStartupReceiver( 666): Not a CDMA phone, no need to process OTA
    I/RecoverySystem( 581): No recovery log file
    I/SearchManagerService( 581): Building list of searchable activities
    I/ActivityManager( 581): Start proc com.android.providers.calendar for broadcast com.android.providers.calendar/.CalendarReceiver: pid=724 uid=10000 gids={3003}
    I/ActivityManager( 581): Start proc android.process.media for content provider com.android.providers.downloads/.DownloadProvider: pid=733 uid=10004 gids={1015, 2001, 3003}
    I/ActivityThread( 724): Pub com.android.calendar: com.android.providers.calendar.CalendarProvider2
    D/dalvikvm( 724): GC_CONCURRENT freed 412K, 54% free 2618K/5639K, external 716K/1038K, paused 2ms+2ms
    I/ActivityThread( 733): Pub media: com.android.providers.media.MediaProvider
    V/MediaProvider( 733): Attached volume: internal
    V/MediaProvider( 733): /mnt/sdcard volume ID: 1472384680
    D/dalvikvm( 733): GC_CONCURRENT freed 414K, 54% free 2611K/5639K, external 716K/1038K, paused 2ms+2ms
    D/dalvikvm( 672): GC_EXTERNAL_ALLOC freed 99K, 53% free 2691K/5639K, external 1562K/1572K, paused 69ms
    V/MediaProvider( 733): Attached volume: external
    I/ActivityThread( 733): Pub downloads: com.android.providers.downloads.DownloadProvider
    I/ActivityThread( 733): Pub drm: com.android.providers.drm.DrmProvider
    D/dalvikvm( 581): GREF has increased to 301
    I/ActivityManager( 581): Start proc com.android.bluetooth for broadcast com.android.bluetooth/.opp.BluetoothOppReceiver: pid=748 uid=10011 gids={3003, 3002, 3001, 1015}
    D/MediaScannerService( 733): start scanning volume internal
    D/Calendar( 724): missed alarms found: 0
    I/ActivityThread( 748): Pub com.android.bluetooth.opp: com.android.bluetooth.opp.BluetoothOppProvider
    I/ActivityManager( 581): Start proc com.android.email for broadcast com.android.email/.service.EmailBroadcastReceiver: pid=757 uid=10023 gids={3003, 1015}
    D/dalvikvm( 748): GC_CONCURRENT freed 402K, 54% free 2600K/5639K, external 716K/1038K, paused 2ms+2ms
    D/dalvikvm( 578): GC_EXPLICIT freed 10K, 54% free 2526K/5379K, external 716K/1038K, paused 103ms
    D/dalvikvm( 578): GC_EXPLICIT freed <1K, 54% free 2526K/5379K, external 716K/1038K, paused 90ms
    D/dalvikvm( 578): GC_EXPLICIT freed <1K, 54% free 2526K/5379K, external 716K/1038K, paused 60ms
    I/ActivityThread( 757): Pub com.android.email.provider: com.android.email.provider.EmailProvider
    D/dalvikvm( 757): GC_CONCURRENT freed 411K, 54% free 2621K/5639K, external 716K/1038K, paused 2ms+2ms
    I/ActivityThread( 757): Pub com.android.email.attachmentprovider: com.android.email.provider.AttachmentProvider
    I/ActivityThread( 757): Pub com.android.exchange.provider: com.android.exchange.provider.ExchangeProvider
    D/EAS SyncManager( 757): !!! EAS SyncManager, onCreate
    I/ActivityManager( 581): Start proc com.android.deskclock for broadcast com.android.deskclock/.AlarmInitReceiver: pid=775 uid=10024 gids={}
    D/Eas Debug( 757): Logging:
    D/EAS SyncManager( 757): !!! EAS SyncManager, onDestroy
    D/Email ( 757): BOOT_COMPLETED
    D/EAS SyncManager( 757): !!! EAS SyncManager, onCreate
    D/EAS SyncManager( 757): !!! EAS SyncManager, onStartCommand
    I/ActivityThread( 775): Pub com.android.deskclock: com.android.deskclock.AlarmProvider
    D/EAS SyncManager( 757): !!! EAS SyncManager, stopping self
    D/EAS SyncManager( 757): !!! EAS SyncManager, onDestroy
    I/ActivityManager( 581): Start proc com.android.quicksearchbox for broadcast com.android.quicksearchbox/.SearchWidgetProvider: pid=789 uid=10008 gids={3003}
    D/dalvikvm( 581): GC_FOR_MALLOC freed 787K, 47% free 3960K/7431K, external 2869K/3583K, paused 30ms
    I/ActivityThread( 789): Pub com.android.quicksearchbox.google: com.android.quicksearchbox.google.GoogleSuggestionProvider
    I/ActivityThread( 789): Pub com.android.quicksearchbox.shortcuts: com.android.quicksearchbox.ShortcutsProvider
    I/ActivityManager( 581): Start proc com.android.protips for broadcast com.android.protips/.ProtipWidget: pid=797 uid=10016 gids={}
    D/dalvikvm( 672): GC_CONCURRENT freed 204K, 50% free 2893K/5767K, external 1890K/2092K, paused 2ms+3ms
    D/dalvikvm( 672): GC_EXTERNAL_ALLOC freed 63K, 51% free 2857K/5767K, external 2084K/2092K, paused 22ms
    D/MediaScanner( 733): prescan time: 416ms
    D/MediaScanner( 733): scan time: 823ms
    D/MediaScanner( 733): postscan time: 0ms
    D/MediaScanner( 733): total time: 1239ms
    D/MediaScannerService( 733): done scanning volume internal
    D/dalvikvm( 672): GC_EXPLICIT freed 90K, 51% free 2833K/5767K, external 2003K/2488K, paused 22ms
    I/ActivityManager( 581): Start proc com.android.music for broadcast com.android.music/.MediaAppWidgetProvider: pid=807 uid=10032 gids={3003, 1015}
    I/ActivityManager( 581): Start proc com.cooliris.media for broadcast com.cooliris.media/com.cooliris.cache.BootReceiver: pid=815 uid=10025 gids={1015, 3003}
    I/ActivityThread( 815): Pub com.cooliris.picasa.contentprovider: com.cooliris.picasa.PicasaContentProvider
    D/dalvikvm( 815): GC_CONCURRENT freed 607K, 56% free 2616K/5831K, external 716K/1038K, paused 2ms+2ms
    I/BootReceiver( 815): Got intent with action android.intent.action.MEDIA_SCANNER_FINISHED




    By looking at logcat output, it looks like after killing jammed process Android has booted properly.

    1. Are you getting below logs after killing the process that jams the system?

    init: untracked pid 557 exited
    init: untracked pid 565 exited
    init: untracked pid 401 exited


    2. Which monitor are you connecting to board?

    3. Please use Android DDMS tool to capture the screen shot to ensure that display at Android layer is fine.

    Regards,
    Pankaj Bharadiya

  • Hi Pankaj,

    my answers will be numbered like your questions:

    1. Those logs only appear after I do kill -9 <PID>, and they stop appearing. Log message after that command I already posted (the whole length of it).
    2. I'm using monitor DELL 22'', it has native full HD resolution. This monitor is working just fine with TI816xevm board, just to know.
    3. For know, I can't provide you with screen shots from DDMS because I'm having a problem with setting up ethernet driver (PHY chip on my board isn't the same as one on the TI816xevm board), and there is no linux driver for it. But soon as I solve this problem I will send you some screen shots from DDMS.
    4. As you told, I do think Android has booted properly, when I type command ps in terminal I get this output 7183.ps_command_log.txt and it seems to me that Android has booted, but why I still don't get anything on screen I don't have a clue.

    King regards,

    Srdjan

  • Hi Srdjan,

    Yes. From the ps command output it looks like Android has booted properly. Moreover by referring to your logs and lsmod output it looks like all display related drivers (fb, vpss, syslink, hdmi) are loaded properly.

    Are there any schematic changes for HDMI on your custom board as compared with ti816xevm schematic?

    Just to be extra sure can you probe HDMI hardware path.

    Regards,

    Pankaj Bharadiya.

     

  • Hi Pankaj,

    you were right. I checked the schematic with my colleague from HW team and in deed there was some minor differences between two boards. After some modification we made HDMI hardware to match that one on TI816xevm board.

    Video is now working just fine!

    Thank you for your suggestions and help!

    Kind regards,

    Srdjan