This is a cache of https://discuss.96boards.org/t/aosp-op-tee-build-and-sync-issue-in-hikey960/9959. It is a snapshot of the page at 2024-11-01T13:20:45.697+0000.
AOSP+OP-TEE build and sync issue in Hikey960 - HiKey 960 - 96Boards Forum

AOSP+OP-TEE build and sync issue in Hikey960

Hi,
I’m trying to build AOSP + OPTEE in hikey

My board is hikey960 with 4GB RAM and host machine is VMware Linux ubuntu 16.04.
I have followed the steps mentioned in the following Link.
https://optee.readthedocs.io/en/latest/building/aosp/aosp.html

Here are my rough steps
1.clone optee android
git clone https://github.com/linaro-swg/optee_android_manifest [-b <release_tag>]
2.Sync and build
./sync-p-hikey960.sh
./build-p-hikey960.sh

While downloading the source, I am facing an issue of invalid SHA1
ERROR:error: Cannot fetch 96boards-hikey/OpenPlatformPkg.git (GitError: 96boards-hikey/OpenPlatformPkg.git update-ref: fatal: 76bbfcc0bfa4184ed5991fe89c8d7039f8ffeb46^0: not a valid SHA1)

Can anyone suggest a way to fix the issue???

This has been fixed in [1]. Please pull the latest master branch or use tag 3.8.3. Please note though that this build currently has issues booting to the home screen, although it doesn’t seem to be an OP-TEE related issue. Adb and command line are ok.

[1] https://github.com/linaro-swg/optee_android_manifest/commit/5092c2b8ecabd72e99f2da2841c4a7b2c0c92cd8

Thank You Vchong for quick reply.
I was able to execute the sync with release tag you mentioned ,and prior to sync done there were 2 error message
error: no such remote ref f0307d7030c59c4f1844b1ddb324a476e053e6d2.
error: no such remote ref 6dd684c1b860a42fe339265c9dc16849a32dab76.
Can you please suggest a stable release of AOSP+OP-TEE which will be working fine in hikey960?

it seems sync error by compile tools .
~/workspace/optee_android_manifest/.repo/manifests$ grep f0307d7030c59c4f1844b1ddb324a476e053e6d2 -nrsi .
./pinned-manifest_hikey960_v9r34_v3.8.2_20200501.xml:700: project clone-depth=“1” name=“prebuilts/gcc/linux-x86/aarch64/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu” path=“prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-7.3-linaro” remote=“linaro-android” revision=“f0307d7030c59c4f1844b1ddb324a476e053e6d2” upstream=“master”
~/workspace/optee_android_manifest/.repo/manifests$ grep 6dd684c1b860a42fe339265c9dc16849a32dab76 -nrsi .
./pinned-manifest_hikey960_v9r34_v3.8.2_20200501.xml:701: project clone-depth=“1” name=“prebuilts/gcc/linux-x86/arm/gcc-linaro-7.3.1-2018.05-x86_64_arm-eabi” path=“prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-7.3-linaro” remote=“linaro-android” revision=“6dd684c1b860a42fe339265c9dc16849a32dab76” upstream=“master”
check the internet connection to “https://android-git.linaro.org/git/” or download the tools manually.
by the way .what’s your purpose of using OPTEE+AOSP?

@liuyunli Thanks for the reply!

Thank you liuyunli and Vchong for the support.Sync completed without any error.I have downloaded the compile tools and it worked fine,and build is in progress.

I am researcher,as part of it i am trying to do AOSP+OP-TEE in Hikey960.

Please notethis build currently has issues booting to the home screen。Hope you can resolve this problem.

Hi,
I was able to build and flash AOSP+OP-TEE in Hikey960,and ADB is working fine.
Display is stuck at the android boot logo,Is this the issue you mentioned in the build while booting to the homescreen?

Can anyone please suggest a stable AOSP+OP-TEE for hikey960 ?

I wonder if there is a recent issue created by drm_hwcomposer? I’m also having a “display stuck” issue on db820c. Although it could also be something entirely unrelated. I am always able to get to UI, and it “mostly” works, but graphics lock up when switching programs or adding an additional layer for composition (like softkey).

Maybe you could provide a dump of your logcat and dmesg from immediately after the lockup?

Thank you for the reply.
Please find the logcat

android.hardware.keymaster@3.0-service.optee to keymaster@3.0-service.optee.
01-01 00:00:18.977 2450 2450 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:18.977 2442 2442 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.049 2504 2504 I ServiceManagement: Removing namespace from process name android.hidl.allocator@1.0-service to allocator@1.0-service.
01-01 00:00:19.049 2504 2504 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.055 1556 1556 I kworker/7:2: type=1400 audit(0.0:16): avc: denied { read } for name=“wl18xx-conf.bin” dev=“sdd11” ino=176 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=1
01-01 00:00:19.055 1556 1556 I kworker/7:2: type=1400 audit(0.0:17): avc: denied { open } for path="/vendor/firmware/ti-connectivity/wl18xx-conf.bin" dev=“sdd11” ino=176 scontext=u:r:kernel:s0 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=1
01-01 00:00:19.055 2505 2505 I health@2.0/: health@2.0/backup: Hal starting main loop…
01-01 00:00:19.055 2505 2505 I health@2.0/: health@2.0/backup Hal is starting up…
01-01 00:00:19.055 2505 2505 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.077 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.health@1.0::IHealth/default in either framework or device manifest.
01-01 00:00:19.078 2505 2505 I health@2.0/: health@2.0/backup: Hal init done
01-01 00:00:19.080 2508 2508 I ServiceManagement: Removing namespace from process name android.hardware.bluetooth@1.0-service.btlinux to bluetooth@1.0-service.btlinux.
01-01 00:00:19.080 2508 2508 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.087 2516 2516 I android.hardware.power@1.1-service.hikey-common: Power HAL Service 1.1 for HiKey-common is starting.
01-01 00:00:19.087 2516 2516 E HiKeyPowerHAL: Error opening /sys/devices/system/cpu/cpufreq/interactive/timer_rate: No such file or directory
01-01 00:00:19.087 2516 2516 I ServiceManagement: Removing namespace from process name android.hardware.power@1.1-service.hikey-common to power@1.1-service.hikey-common.
01-01 00:00:19.088 2516 2516 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.088 2516 2516 I android.hardware.power@1.1-service.hikey-common: Power Service is ready
01-01 00:00:19.093 2515 2515 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.100 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: allowing syscall: connect
01-01 00:00:19.100 2513 2513 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.100 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: allowing syscall: fcntl
01-01 00:00:19.100 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: allowing syscall: sendto
01-01 00:00:19.100 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: allowing syscall: socket
01-01 00:00:19.100 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: allowing syscall: writev
01-01 00:00:19.101 2510 2510 W /vendor/bin/hw/android.hardware.configstore@1.1-service: libminijail[2510]: logging seccomp filter failures
01-01 00:00:19.101 2510 2510 I ServiceManagement: Removing namespace from process name android.hardware.configstore@1.1-service to configstore@1.1-service.
01-01 00:00:19.101 2510 2510 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.102 2520 2520 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.102 2515 2515 I ServiceManagement: Removing namespace from process name android.hardware.memtrack@1.0-service to memtrack@1.0-service.
01-01 00:00:19.102 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.thermal@1.1::IThermal/default in either framework or device manifest.
01-01 00:00:19.102 2520 2520 W thermalserviced: Unable to get Thermal HAL V1.1, vendor thermal event notification not available
01-01 00:00:19.103 2514 2514 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.103 2515 2515 I android.hardware.memtrack@1.0-service: Registration complete for android.hardware.memtrack@1.0::IMemtrack/default.
01-01 00:00:19.106 2511 2511 D android.hardware.drm@1.0-service: android.hardware.drm@1.0-service starting…
01-01 00:00:19.107 2511 2511 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.114 2512 2512 D android.hardware.gatekeeper@1.0-service.optee: Checking gk connection to optee_os
01-01 00:00:19.119 2514 2514 I hwc-drm-device: Failed to set writeback cap -1
01-01 00:00:19.124 2511 2511 I ServiceManagement: Removing namespace from process name android.hardware.drm@1.0-service to drm@1.0-service.
01-01 00:00:19.125 2511 2511 I android.hardware.drm@1.0-service: Registration complete for android.hardware.drm@1.0::IDrmFactory/default.
01-01 00:00:19.125 2511 2511 I ServiceManagement: Removing namespace from process name android.hardware.drm@1.0-service to drm@1.0-service.
01-01 00:00:19.125 2511 2511 I android.hardware.drm@1.0-service: Registration complete for android.hardware.drm@1.0::ICryptoFactory/default.
01-01 00:00:19.135 2509 2509 D android.hardware.cas@1.0-service: android.hardware.cas@1.0-service starting…
01-01 00:00:19.135 2509 2509 I ServiceManagement: Removing namespace from process name android.hardware.cas@1.0-service to cas@1.0-service.
01-01 00:00:19.135 2509 2509 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.144 2513 2513 I ServiceManagement: Removing namespace from process name android.hardware.graphics.allocator@2.0-service to allocator@2.0-service.
01-01 00:00:19.145 2513 2513 I android.hardware.graphics.allocator@2.0-service: Registration complete for android.hardware.graphics.allocator@2.0::IAllocator/default.
01-01 00:00:19.164 2506 2506 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.165 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio@4.0::IDevicesFactory/default in either framework or device manifest.
01-01 00:00:19.167 2506 2506 E audiohalservice: Could not get passthrough implementation for android.hardware.audio@4.0::IDevicesFactory/default.
01-01 00:00:19.173 2506 2506 I ServiceManagement: Removing namespace from process name android.hardware.audio@2.0-service to audio@2.0-service.
01-01 00:00:19.173 2506 2506 I audiohalservice: Registration complete for android.hardware.audio@2.0::IDevicesFactory/default.
01-01 00:00:19.174 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio.effect@4.0::IEffectsFactory/default in either framework or device manifest.
01-01 00:00:19.174 2506 2506 E audiohalservice: Could not get passthrough implementation for android.hardware.audio.effect@4.0::IEffectsFactory/default.
01-01 00:00:19.202 2519 2519 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.203 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::startGraphicsAllocatorService retrieved: 0
01-01 00:00:19.205 2506 2506 I audiohalservice: Registration complete for android.hardware.audio.effect@2.0::IEffectsFactory/default.
01-01 00:00:19.205 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.soundtrigger@2.1::ISoundTriggerHw/default in either framework or device manifest.
01-01 00:00:19.206 2506 2506 E audiohalservice: Could not get passthrough implementation for android.hardware.soundtrigger@2.1::ISoundTriggerHw/default.
01-01 00:00:19.207 2506 2506 E SoundTriggerHalImpl: couldn’t load sound trigger module sound_trigger.primary (No such file or directory)
01-01 00:00:19.208 2506 2506 I audiohalservice: Registration complete for android.hardware.soundtrigger@2.0::ISoundTriggerHw/default.
01-01 00:00:19.208 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload/default in either framework or device manifest.
01-01 00:00:19.208 2506 2506 E audiohalservice: Could not get passthrough implementation for android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload/default.
01-01 00:00:19.208 2506 2506 W audiohalservice: Could not register Bluetooth audio offload 1.0
01-01 00:00:19.209 2519 2519 I SurfaceFlinger: Using HWComposer service: ‘default’
01-01 00:00:19.209 2519 2519 I SurfaceFlinger: SurfaceFlinger is starting
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::vsyncEventPhaseOffsetNs retrieved: 1000000 (default)
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs retrieved: 1000000 (default)
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasSyncFramework retrieved: 1
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs retrieved: 0
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::useHwcForRGBtoYUV retrieved: 0
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::maxVirtualDisplaySize retrieved: 0 (default)
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::useVrFlinger retrieved: 0 (default)
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers retrieved: 2 (default)
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-01 00:00:19.210 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.configstore@1.1::ISurfaceFlingerConfigs/default in either framework or device manifest.
01-01 00:00:19.210 2519 2519 I ConfigStore: android::hardware::configstore::V1_1::ISurfaceFlingerConfigs::primaryDisplayOrientation retrieved: ORIENTATION_0 (default)
01-01 00:00:19.210 2519 2519 I SurfaceFlinger: Enabling HWC virtual displays
01-01 00:00:19.210 2519 2519 I SurfaceFlinger: Disabling Triple Buffering
01-01 00:00:19.210 2519 2519 I SurfaceFlinger: Treble testing override: ‘false’
01-01 00:00:19.210 2519 2519 I SurfaceFlinger: SurfaceFlinger’s main thread ready to run. Initializing graphics H/W…
01-01 00:00:19.210 2519 2519 I SurfaceFlinger: Phase offest NS: 1000000
01-01 00:00:19.250 2512 2512 D OpteeGateKeeper: getConnected 47 connected_ = 1
01-01 00:00:19.250 2512 2512 I android.hardware.gatekeeper@1.0-service.optee: Loading…
01-01 00:00:19.250 2512 2512 I ServiceManagement: Removing namespace from process name android.hardware.gatekeeper@1.0-service.optee to gatekeeper@1.0-service.optee.
01-01 00:00:19.250 2512 2512 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.274 2519 2519 D libEGL : loaded /vendor/lib64/egl/libGLES_mali.so
01-01 00:00:19.298 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-01 00:00:19.299 2519 2519 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: EGL information:
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: vendor : Android
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: version : 1.4 Android META-EGL
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_get_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_ANDROID_get_frame_timestamps EGL_EXT_surface_SMPTE2086_metadata EGL_EXT_surface_CTA861_3_metadata EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_colorspace EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_KHR_create_context EGL_KHR_config_attribs EGL_KHR_surfaceless_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_KHR_wait_sync EGL_ANDROID_recordable EGL_KHR_partial_update EGL_KHR_mutable_render_buffer EGL_IMG_context_priority EGL_KHR_no_config_context
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: Client API: OpenGL_ES
01-01 00:00:19.303 2519 2519 I SurfaceFlinger: EGLSurface: 8-8-8-8, config=0x73a11b6008
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: OpenGL ES informations:
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: vendor : ARM
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: renderer : Mali-G71
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: version : OpenGL ES 3.2 v1.r10p0-01rel0.18d0462009affd05c324ea67886ec08c
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: extensions: GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisamp
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: GL_MAX_TEXTURE_SIZE = 8192
01-01 00:00:19.304 2519 2519 I SurfaceFlinger: GL_MAX_VIEWPORT_DIMS = 8192
01-01 00:00:19.305 2519 2519 I ServiceManagement: getService: Trying again for android.hardware.graphics.composer@2.1::IComposer/default…
01-01 00:00:19.334 2517 2517 I FastMixerState: sMaxFastTracks = 8
01-01 00:00:19.335 2514 2514 E hwc-drm-plane: Could not get zpos property for plane 27
01-01 00:00:19.335 2514 2514 E hwc-drm-plane: Could not get rotation property
01-01 00:00:19.335 2514 2514 I hwc-drm-plane: Could not get alpha property
01-01 00:00:19.335 2514 2514 I hwc-drm-plane: Could not get pixel blend mode property
01-01 00:00:19.341 2517 2517 V MediaUtils: physMem: 4069113856
01-01 00:00:19.341 2517 2517 V MediaUtils: requested limit: 536870912
01-01 00:00:19.341 2517 2517 V MediaUtils: actual limit: 536870912
01-01 00:00:19.341 2517 2517 V MediaUtils: original limits: 4294967295/4294967295
01-01 00:00:19.341 2517 2517 V MediaUtils: new limits: 536870912/4294967295
01-01 00:00:19.344 2567 2567 I audioserver: ServiceManager: 0xebb9c100
01-01 00:00:19.345 2567 2567 W BatteryNotifier: batterystats service unavailable!
01-01 00:00:19.345 2567 2567 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.345 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio@4.0::IDevicesFactory/default in either framework or device manifest.
01-01 00:00:19.348 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio@2.0::IDevicesFactory/msd in either framework or device manifest.
01-01 00:00:19.348 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio.effect@4.0::IEffectsFactory/default in either framework or device manifest.
01-01 00:00:19.350 2567 2567 I AudioFlinger: Using default 3000 mSec as standby time.
01-01 00:00:19.352 2567 2567 E APM::Serializer: deserialize: Could not parse /odm/etc/audio_policy_configuration.xml document.
01-01 00:00:19.359 2506 2570 W DeviceHAL: Error from HAL Device in function get_master_volume: Function not implemented
01-01 00:00:19.359 2506 2570 W DeviceHAL: Error from HAL Device in function get_master_mute: Function not implemented
01-01 00:00:19.359 2506 2570 W DeviceHAL: Error from HAL Device in function set_master_volume: Function not implemented
01-01 00:00:19.359 2506 2570 W DeviceHAL: Error from HAL Device in function set_master_mute: Function not implemented
01-01 00:00:19.359 2567 2567 I AudioFlinger: loadHwModule() Loaded primary audio interface, handle 10
01-01 00:00:19.359 2567 2567 I AudioFlinger: openOutput() this 0xebbbe000, module 10 Device 0x2, SamplingRate 48000, Format 0x000001, Channels 0x3, flags 0x2
01-01 00:00:19.361 2506 2570 I audio_hw_hikey: adev_open_output_stream selects channels=2 rate=48000 format=0
01-01 00:00:19.361 2567 2567 I AudioFlinger: HAL output buffer size 1024 frames, normal sink buffer size 1024 frames
01-01 00:00:19.363 2442 2442 W hwservicemanager: getTransport: Cannot find entry android.hardware.audio.effect@4.0::IEffectsFactory/default in either framework or device manifest.
01-01 00:00:19.365 2506 2570 E EffectsConfig: Could not parse effect configuration in any of the default locations.
01-01 00:00:19.365 2506 2570 E EffectsFactoryConfigLoader: Failed to parse XML configuration file
01-01 00:00:19.365 2506 2570 W EffectsFactory: Failed to load XML effect configuration, fallback to .conf
01-01 00:00:19.371 2567 2567 I BufferProvider: found effect “Multichannel Downmix To Stereo” from The Android Open Source Project
01-01 00:00:19.372 2567 2581 I AudioFlinger: AudioFlinger’s thread 0xeb003ac0 tid=2581 ready to run
01-01 00:00:19.372 2567 2581 W AudioFlinger: no wake lock to update, system not ready yet
01-01 00:00:19.372 2567 2567 I AudioFlinger: Using module 10 as the primary audio interface
01-01 00:00:19.372 2506 2570 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.372 2567 2581 W AudioFlinger: no wake lock to update, system not ready yet
01-01 00:00:19.372 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.372 2506 2582 W DeviceHAL: Error from HAL Device in function set_voice_volume: Function not implemented
01-01 00:00:19.372 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.373 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 8 lines
01-01 00:00:19.373 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.373 2567 2567 W AudioFlinger: moveEffects() bad srcOutput 0
01-01 00:00:19.374 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.375 2567 2583 I AudioFlinger: AudioFlinger’s thread 0xeae83dc0 tid=2583 ready to run
01-01 00:00:19.383 2567 2567 I bt_a2dp_hw: adev_open: adev_open in A2dp_hw module
01-01 00:00:19.383 2567 2567 I AudioFlinger: loadHwModule() Loaded a2dp audio interface, handle 18
01-01 00:00:19.384 2567 2567 I AudioFlinger: loadHwModule() Loaded usb audio interface, handle 26
01-01 00:00:19.385 2506 2506 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.386 2506 2582 I r_submix: adev_open(name=audio_hw_if)
01-01 00:00:19.386 2506 2582 I r_submix: adev_init_check()
01-01 00:00:19.386 2506 2582 W DeviceHAL: Error from HAL Device in function set_master_mute: Function not implemented
01-01 00:00:19.386 2567 2567 I AudioFlinger: loadHwModule() Loaded r_submix audio interface, handle 34
01-01 00:00:19.386 2506 2582 D r_submix: adev_open_input_stream(addr=0)
01-01 00:00:19.386 2506 2582 D r_submix: submix_audio_device_create_pipe_l(addr=0, idx=9)
01-01 00:00:19.386 2506 2582 D r_submix: now using address 0 for route 9
01-01 00:00:19.387 2567 2584 I AudioFlinger: AudioFlinger’s thread 0xeae83940 tid=2584 ready to run
01-01 00:00:19.387 2506 2582 D r_submix: adev_close_input_stream()
01-01 00:00:19.387 2506 2582 D r_submix: submix_audio_device_release_pipe_l(idx=9) addr=0
01-01 00:00:19.387 2506 2582 D r_submix: submix_audio_device_destroy_pipe_l(): pipe destroyed
01-01 00:00:19.387 2567 2567 E EffectsConfig: Could not parse effect configuration in any of the default locations.
01-01 00:00:19.387 2567 2567 W AudioPolicyEffects: Failed to load XML effect configuration, fallback to .conf
01-01 00:00:19.388 2567 2567 I : Waiting for activity service
01-01 00:00:19.395 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.571 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 16 lines
01-01 00:00:19.582 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.586 2586 2587 I adbd : initializing functionfs
01-01 00:00:19.586 2586 2587 I adbd : opening control endpoint /dev/usb-ffs/adb/ep0
01-01 00:00:19.593 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.604 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.606 2586 2587 I adbd : functionfs successfully initialized
01-01 00:00:19.606 2586 2587 I adbd : registering usb transport
01-01 00:00:19.606 2586 2589 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:19.617 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.617 2514 2514 E hwc-drm-display-compositor: Create blob_id 31
01-01 00:00:19.623 2514 2514 I ServiceManagement: Removing namespace from process name android.hardware.graphics.composer@2.1-service to composer@2.1-service.
01-01 00:00:19.625 2514 2514 I android.hardware.graphics.composer@2.1-service: Registration complete for android.hardware.graphics.composer@2.1::IComposer/default.
01-01 00:00:19.628 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.840 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 19 lines
01-01 00:00:19.851 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:19.857 2519 2519 E HWComposer: getSupportedPerFrameMetadata: getSupportedPerFrameMetadata failed for display 0: Unsupported (8)
01-01 00:00:19.857 2519 2519 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
01-01 00:00:19.858 2519 2519 I HWC2 : Hotplug connecting an already connected display. Clearing old display state.
01-01 00:00:19.863 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.444 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 52 lines
01-01 00:00:20.456 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.464 2519 2519 D SurfaceFlinger: shader cache generated - 24 shaders in 380.439087 ms
01-01 00:00:20.466 2519 2519 D SurfaceFlinger: Set power mode=2, type=0 flinger=0x73a1055000
01-01 00:00:20.467 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.476 2519 2519 D SurfaceFlinger: Finished set power mode=2, type=0
01-01 00:00:20.477 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.729 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 23 lines
01-01 00:00:20.740 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.747 2620 2622 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 00:00:20.751 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.763 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.770 2620 2622 D libEGL : loaded /vendor/lib64/egl/libGLES_mali.so
01-01 00:00:20.774 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.785 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.790 2620 2622 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-01 00:00:20.790 2620 2622 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
01-01 00:00:20.791 2620 2622 D mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
01-01 00:00:20.794 2620 2622 D BootAnimation: BootAnimationShownTiming start time: 12654ms
01-01 00:00:20.796 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.841 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 4 lines
01-01 00:00:20.852 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.858 2519 2539 W SurfaceFlinger: Timed out waiting for hw vsync; faking it
01-01 00:00:20.863 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.874 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:20.884 2513 2513 W gralloc : Failed to find GPU block configuration in libGLES_mali.so. Using static build configuration.
01-01 00:00:20.884 2513 2513 E ion : ioctl c0044901 failed with code -1: Not a typewriter
01-01 00:00:20.885 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:21.132 2506 2582 I chatty : uid=1041(audioserver) HwBinder:2506_2 identical 22 lines
01-01 00:00:21.143 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:00:21.147 2519 2519 I SurfaceFlinger: Enter boot animation
01-01 00:00:21.151 2514 2514 E hwc-drm-two: Failed to import layer, ret=-22
01-01 00:00:21.152 2519 2519 W HwcComposer: command 0x2000000 generated error 8
01-01 00:00:21.154 2506 2582 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted

These three lines appear to be the key. I don’t know what their significance is.

Hi, @sreegink,

I tried AOSP+OP-TEE for hikey960(4GB) with v3.4.2, after resolve display issue, it works fine.

Now I’m trying to upgrade it to v3.8.3, but TEE OS panic(as described in this issue, even if I applied the patch for 4GB, it still get panic. I’m wondering how did you flash the AOSP+OP-TEE on Hikey960? Even if only adb works, it should be helpful.

Thank you!

Hi,
Did you solve the display issue by using a specific display,can you be specific on the issue in 3.4.2.? [Flashing steps using adb]
configure the hikey board to fastboot mode

fastboot flash ptable prm_ptable.img
fastboot flash xloader hisi-sec_xloader.img
fastboot reboot-bootloader

fastboot flash fastboot l-loader.bin
fastboot flash fip fip.bin
fastboot flash nvme hisi-nvme.img
fastboot flash fw_lpm3 hisi-lpm3.img
fastboot flash trustfirmware hisi-bl31.bin
fastboot reboot-bootloader

fastboot flash ptable prm_ptable.img
fastboot flash xloader hisi-sec_xloader.img
fastboot flash fastboot l-loader.bin
fastboot flash fip fip.bin

fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img

fastboot reboot

Revert the board to normal Mode.
Above steps worked fine for me,hope this will be helpful

Hi, @sreegink,

The display issue I run into was on 3.4.2 that the Android kernel can’t generate the correct frequency for my monitor, it was resolved by the patch, if you check out
3.8.3, you will see it has already been patched.

My current problem is that after I compile 3.8.3 and flash it onto my Hikey960-4G board, it does not boot. I checked the TEE log,

D/TC:0 0 dump_mmap_table:732 type TEE_RAM_RW va 0x3f063000..0x3f1fffff pa 0x3f 063000..0x3f1fffff size 0x0019d000 (smallpg)
E/TC:0 0 Panic at core/arch/arm/mm/core_mmu_lpae.c:366 <check_nsec_ddr_max_pa>
E/TC:0 0 TEE load address @ 0x3f000000
E/TC:0 0 Call stack:
E/TC:0 0 0x000000003f00b6ac

I find the issue on github, and the author said it can be solved by apply the patch for "Issue#3083: "HiKey960: fix for 4G boards and support 6G boards ". I applied the patch, but it does not work. I am wondering which version of optee_android_manifest are you using?

Thank you!

i’m also looking for a stable version with adb and the ui working is 3.4.2 stable out of the box?

3.4.2 works fine with the patch for the display issue as I mentioned. You can give it a try. Make sure you change the optee-os config for 4G RAM(default is 3G). Hope it helps~

Hi,@quincysquarrel,
I was using 3.8.3.As the folder structure of 3.8.3 is entirely different from 3.4.2,i am wondering how you applied the patch?

Hi @Zacchaeus_Liang,
Have you tried 3.4.2?Is it working Fine??

it’s built but i have flashing issues

Hi @sreegink,
For the display related patch, I find the driver code and change it according to the patch. For the optee-os patch about CFG_CORE_ARM64_PA_BITS, I also change it manually by adding the related code as below.

Display patch:

kernel/linaro/hisilicon-4.14/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
diff --git a/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c b/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
index 728d004..1df8509 100644
--- a/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
+++ b/drivers/gpu/drm/hisilicon/kirin960/kirin_drm_overlay_utils.c
@@ -23,7 +23,7 @@
#include "kirin_drm_dpe_utils.h"
#include "kirin_drm_drv.h"

-#define ROUND1(x, y)   ((x) / (y) + ((x) % (y)  ? 1 : 0))
+//#define ROUND1(x, y) ((x) / (y) + ((x) % (y)  ? 1 : 0))
#define DSS_CHN_MAX_DEFINE (DSS_COPYBIT_MAX)
static int mid_array[DSS_CHN_MAX_DEFINE] = {0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x5, 0x4, 0x2, 0x1, 0x3, 0x0};

@@ -705,7 +705,7 @@ static int hisi_dss_rdma_config(struct dss_hw_ctx *ctx,
       u32 afbcd_header_stride = 0;
       u32 afbcd_payload_addr = 0;
       u32 afbcd_payload_stride = 0;
-       u32 h_display = 0;
+       //u32 h_display = 0;

       if (!ctx) {
               DRM_ERROR("ctx is NULL!\n");
@@ -800,12 +800,13 @@ static int hisi_dss_rdma_config(struct dss_hw_ctx *ctx,
               set_reg(rdma_base + CH_CTL, 0xf005, 32, 0);
       } else {
               stretch_size_vrt = rdma_oft_y1 - rdma_oft_y0;
-               h_display = (rect->right - rect->left) + 1;
-               if (h_display % 64) {
-                       rdma_stride = ROUND1(h_display, 64) * 64 * bpp / DMA_ALIGN_BYTES;
-               } else {
-                       rdma_stride = h_display * bpp / DMA_ALIGN_BYTES;
-               }
+                rdma_stride = ((rect->right - rect->left) + 1) * bpp / DMA_ALIGN_BYTES;
+               //h_display = (rect->right - rect->left) + 1;
+               //if (h_display % 64) {
+               //      rdma_stride = ROUND1(h_display, 64) * 64 * bpp / DMA_ALIGN_BYTES;
+               //} else {
+               //      rdma_stride = h_display * bpp / DMA_ALIGN_BYTES;
+               //}

               set_reg(rdma_base + CH_REG_DEFAULT, 0x1, 32, 0);
               set_reg(rdma_base + CH_REG_DEFAULT, 0x0, 32, 0);

The optee-os patch

#in optee_os/core/arch/arm/plat-hikey/conf.mk

# Hikey960 4G/6G versions have physical addresses above 4G range
ifneq (,$(filter 4 6,$(CFG_DRAM_SIZE_GB)))
$(call force,CFG_CORE_ARM64_PA_BITS,36)
endif

V3.8.3, android can’t fully boot, it get stuck at android logo. But adb shell can be used to access the board.