Aosp in hikey board can't boot corretly


#1

Hi,

I am download current aosp repository(20181024 repo sync) to build image for Hikey.

I have flash image to the board.
But it stuck in boot stage.

Thanks for any suggest.

Below is kernel log, zygote and other service received signal 9 and terminate.

   45.470852] init: Untracked pid 2732 exited with status 0
[   45.476666] init: Service 'surfaceflinger' (pid 2712) received signal 11
[   45.482434] binder: release 2712:2712 transaction 5189 in, still active
[   45.482440] binder: release 2712:2712 transaction 5186 out, still active
[   45.482446] binder: send failed reply for transaction 5189 to 2698:2698
[   45.482882] binder: 2698:2698 transaction failed 29189/0, size 4-0 line 2945
[   45.482933] binder: send failed reply for transaction 5186, target dead
[   45.517900] init: Sending signal 9 to service 'surfaceflinger' (pid 2712) process group...
[   45.526701] libprocessgroup: Successfully killed process cgroup uid 1000 pid 2712 in 0ms
[   45.535435] init: Sending signal 9 to service 'zygote' (pid 2682) process group...
[   45.569657] libprocessgroup: Successfully killed process cgroup uid 0 pid 2682 in 26ms
[   45.579030] init: Service 'zygote' (pid 2682) received signal 9
[   45.585978] init: Command 'write /sys/power/state on' action=onrestart (<Service 'zygote' onrestart>:2) took 0ms and failed: Unable to write to file '/sys/power/state': Unable to write file contents: Invalid argument
[   45.605568] init: Sending signal 9 to service 'audioserver' (pid 2709) process group...
[   45.624835] libprocessgroup: Successfully killed process cgroup uid 1041 pid 2709 in 10ms
[   45.633598] init: Sending signal 9 to service 'cameraserver' (pid 2715) process group...
[   45.647410] libprocessgroup: Successfully killed process cgroup uid 1047 pid 2715 in 5ms
[   45.655949] init: Sending signal 9 to service 'media' (pid 2716) process group...
[   45.669135] libprocessgroup: Successfully killed process cgroup uid 1013 pid 2716 in 5ms
[   45.677651] init: Sending signal 9 to service 'netd' (pid 2684) process group...
[   45.691566] libprocessgroup: Successfully killed process cgroup uid 0 pid 2684 in 6ms
[   45.699861] init: Sending signal 9 to service 'wificond' (pid 2722) process group...
[   45.713267] libprocessgroup: Successfully killed process cgroup uid 1010 pid 2722 in 5ms
[   45.723399] init: Service 'netd' (pid 2684) received signal 9
[   45.729481] init: Sending signal 9 to service 'zygote_secondary' (pid 2683) process group...
[   45.765262] libprocessgroup: Successfully killed process cgroup uid 0 pid 2683 in 27ms
[   45.774328] init: Service 'zygote_secondary' (pid 2683) received signal 9
[   45.783076] init: Service 'vendor.hwcomposer-2-1' (pid 2698) received signal 11
[   45.790548] init: Sending signal 9 to service 'vendor.hwcomposer-2-1' (pid 2698) process group...
[   45.799963] libprocessgroup: Successfully killed process cgroup uid 1000 pid 2698 in 0ms
[   45.810616] init: Service 'audioserver' (pid 2709) received signal 9
[   45.817139] init: Sending signal 9 to service 'vendor.audio-hal-2-0' (pid 2685) process group...
[   45.831686] libprocessgroup: Successfully killed process cgroup uid 1041 pid 2685 in 5ms
[   45.840318] init: Command 'restart audio-hal-2-0' action=onrestart (<Service 'audioserver' onrestart>:2) took 0ms and failed: service audio-hal-2-0 not found
[   45.855913] init: Service 'vendor.audio-hal-2-0' (pid 2685) received signal 9
[   45.864474] init: Service 'cameraserver' (pid 2715) received signal 9
[   45.871988] init: Service 'media' (pid 2716) received signal 9
[   45.878961] init: Service 'wificond' (pid 2722) received signal 9
[   45.885953] init: Untracked pid 2734 exited with status 0
[   45.891535] init: Untracked pid 2769 exited with status 0
[   45.897244] init: Untracked pid 2771 exited with status 0
[   45.903123] init: Untracked pid 2735 received signal 9
[   45.908505] init: Untracked pid 2686 received signal 9
[   45.914003] init: Untracked pid 2687 received signal 9
[   45.920331] init: processing action (init.svc.zygote=stopping) from (/system/etc/init/bootstat.rc:66)

And below is logcat msg, it seems failure occurred in initial HAL.

01-01 00:03:35.044  5847  5847 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:03:35.044  5847  5847 F DEBUG   : Build fingerprint: 'Android/hikey/hikey:Q/PI/yuhsien10250957:userdebug/test-keys'
01-01 00:03:35.044  5847  5847 F DEBUG   : Revision: '0'
01-01 00:03:35.044  5847  5847 F DEBUG   : ABI: 'arm64'
01-01 00:03:35.045  5847  5847 F DEBUG   : pid: 5773, tid: 5814, name: HwBinder:5773_2  >>> /vendor/bin/hw/android.hardware.graphics.composer@2.1-service <<<
01-01 00:03:35.045  5847  5847 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
01-01 00:03:35.045  5847  5847 F DEBUG   : Cause: null pointer dereference
01-01 00:03:35.045  5847  5847 F DEBUG   :     x0  00000071ee87a700  x1  0000000000000000  x2  0000000000000001  x3  0000000000000000
01-01 00:03:35.045  5847  5847 F DEBUG   :     x4  0064657374000000  x5  0000000080000000  x6  1101041300000000  x7  0000008013040111
01-01 00:03:35.045  5847  5847 F DEBUG   :     x8  00000071ee830c40  x9  ecf92170a970d70b  x10 000000716d24fc80  x11 000000000000001b
01-01 00:03:35.045  5847  5847 F DEBUG   :     x12 000000716d24fdb8  x13 0000000000000003  x14 0000000000000008  x15 00001192b2aaa378
01-01 00:03:35.045  5847  5847 F DEBUG   :     x16 00000071ee476ef0  x17 00000071ee46a670  x18 0000000000000000  x19 0000000000000000
01-01 00:03:35.045  5847  5847 F DEBUG   :     x20 00000071ee87a700  x21 00000071ee850200  x22 0000000000000001  x23 000000716d250588
01-01 00:03:35.045  5847  5847 F DEBUG   :     x24 00000071ee830c80  x25 00000071ee830c40  x26 000000716d34e588  x27 00000071eee5cfc0
01-01 00:03:35.045  5847  5847 F DEBUG   :     x28 0000000000000000  x29 000000716d2501b0
01-01 00:03:35.045  5847  5847 F DEBUG   :     sp  000000716d250150  lr  00000071ee46a720  pc  0000000000000000
01-01 00:03:35.068  5847  5847 F DEBUG   :
01-01 00:03:35.068  5847  5847 F DEBUG   : backtrace:
01-01 00:03:35.068  5847  5847 F DEBUG   :     #00 pc 0000000000000000  <unknown>
01-01 00:03:35.068  5847  5847 F DEBUG   :     #01 pc 000000000001c71c  /vendor/lib64/hw/hwcomposer.drm.so (android::DrmHwcTwo::RegisterCallback(int, void*, void (*)())+172)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #02 pc 000000000001e7b0  /vendor/lib64/hw/hwcomposer.drm.so (_ZN7android9DrmHwcTwo10DeviceHookIiMS0_FN4HWC25ErrorEiPvPFvvEEXadL_ZNS0_16RegisterCallbackEiS4_S6_EEJiS4_S6_EEET_P11hwc2_deviceDpT2_+8)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #03 pc 0000000000007c4c  /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (android::hardware::graphics::composer::V2_1::passthrough::detail::HwcHalImpl<android::hardware::graphics::composer::V2_1::hal::ComposerHal>::unregisterEventCallback()+36)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #04 pc 000000000000bbbc  /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (android::hardware::graphics::composer::V2_1::hal::detail::ComposerClientImpl<android::hardware::graphics::composer::V2_1::IComposerClient, android::hardware::graphics::composer::V2_1::hal::ComposerHal>::~ComposerClientImpl()+100)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #05 pc 000000000000bb3c  /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (_ZTv0_n24_N7android8hardware8graphics8composer4V2_13hal6detail18ComposerClientImplINS3_15IComposerClientENS4_11ComposerHalEED0Ev+36)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #06 pc 000000000000f540  /system/lib64/vndk-sp-Q/libutils.so (android::RefBase::decStrong(void const*) const+112)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #07 pc 000000000007bf08  /system/lib64/vndk-sp-Q/libhidltransport.so (android::hidl::base::V1_0::BnHwBase::~BnHwBase()+192)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #08 pc 000000000003697c  /system/lib64/vndk-Q/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerClient::~BnHwComposerClient()+196)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #09 pc 0000000000036adc  /system/lib64/vndk-Q/android.hardware.graphics.composer@2.1.so (_ZTv0_n24_N7android8hardware8graphics8composer4V2_118BnHwComposerClientD0Ev+36)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #10 pc 000000000000f540  /system/lib64/vndk-sp-Q/libutils.so (android::RefBase::decStrong(void const*) const+112)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #11 pc 0000000000015fd8  /system/lib64/vndk-sp-Q/libhwbinder.so (android::hardware::IPCThreadState::processPendingDerefs()+88)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #12 pc 000000000001610c  /system/lib64/vndk-sp-Q/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+60)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #13 pc 0000000000020e30  /system/lib64/vndk-sp-Q/libhwbinder.so (android::hardware::PoolThread::threadLoop()+24)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #14 pc 0000000000013638  /system/lib64/vndk-sp-Q/libutils.so (android::Thread::_threadLoop(void*)+296)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #15 pc 00000000000a6894  /system/lib64/libc.so (__pthread_start(void*)+36)
01-01 00:03:35.068  5847  5847 F DEBUG   :     #16 pc 0000000000046c8c  /system/lib64/libc.so (__start_thread+68)
01-01 00:03:39.646  5909  5909 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:03:39.646  5909  5909 F DEBUG   : Build fingerprint: 'Android/hikey/hikey:Q/PI/yuhsien10250957:userdebug/test-keys'
01-01 00:03:39.646  5909  5909 F DEBUG   : Revision: '0'
01-01 00:03:39.646  5909  5909 F DEBUG   : ABI: 'arm64'
01-01 00:03:39.646  5909  5909 F DEBUG   : pid: 5865, tid: 5865, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
01-01 00:03:39.646  5909  5909 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
01-01 00:03:39.646  5909  5909 F DEBUG   : Cause: null pointer dereference
01-01 00:03:39.646  5909  5909 F DEBUG   :     x0  0000007e8543c3c0  x1  0000007ff1d09970  x2  0000000000000004  x3  0000000000000003
01-01 00:03:39.647  5909  5909 F DEBUG   :     x4  0000000000000000  x5  8080800000800000  x6  fefeff7e05ff7164  x7  7f7f7f7f7f7f7f7f
01-01 00:03:39.647  5909  5909 F DEBUG   :     x8  0000000000000000  x9  0000007f05c21728  x10 0000007ff1d09b20  x11 0000000000000037
01-01 00:03:39.647  5909  5909 F DEBUG   :     x12 0000007ff1d09c58  x13 ffffffffffffffff  x14 0000000000000004  x15 ffffffffffffffff
01-01 00:03:39.647  5909  5909 F DEBUG   :     x16 0000007f064da398  x17 0000007f06be54c0  x18 0000000000000000  x19 0000007e85513000
01-01 00:03:39.647  5909  5909 F DEBUG   :     x20 0000000000000000  x21 0000007e85513610  x22 00000000ffffffff  x23 0000007f0762a580
01-01 00:03:39.647  5909  5909 F DEBUG   :     x24 0000000000000000  x25 0000000000000060  x26 0000007e8547cc6c  x27 0000007f0669d008
01-01 00:03:39.647  5909  5909 F DEBUG   :     x28 0000007e8545b000  x29 0000007ff1d0a160
01-01 00:03:39.647  5909  5909 F DEBUG   :     sp  0000007ff1d0a110  lr  0000007f065cb328  pc  0000007f065cb334
01-01 00:03:39.673  5909  5909 F DEBUG   :
01-01 00:03:39.673  5909  5909 F DEBUG   : backtrace:
01-01 00:03:39.673  5909  5909 F DEBUG   :     #00 pc 0000000000084334  /system/lib64/libsurfaceflinger.so (android::FramebufferSurface::FramebufferSurface(android::HWComposer&, int, android::sp<android::IGraphicBufferConsumer> const&)+292)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #01 pc 00000000000bf5f0  /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::processDisplayChangesLocked()+2256)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #02 pc 00000000000b7184  /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::processDisplayHotplugEventsLocked()+1020)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #03 pc 00000000000b91c8  /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::onHotplugReceived(int, unsigned long, HWC2::Connection)+344)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #04 pc 0000000000088ab4  /system/lib64/libsurfaceflinger.so (_ZN4HWC212_GLOBAL__N_122ComposerCallbackBridge9onHotplugEmN7android8hardware8graphics8composer4V2_117IComposerCallback10ConnectionE$a5b8efe6c13b353e4aafd2b294349a04+36)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #05 pc 0000000000028020  /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerCallback::_hidl_onHotplug(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+208)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #06 pc 0000000000028ba8  /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerCallback::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+680)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #07 pc 0000000000015a34  /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::executeCommand(int)+508)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #08 pc 000000000001668c  /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::waitForResponse(android::hardware::Parcel*, int*)+148)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #09 pc 0000000000012554  /system/lib64/libhwbinder.so (android::hardware::BpHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+132)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #10 pc 000000000002e2b8  /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BpHwComposerClient::_hidl_registerCallback(android::hardware::IInterface*, android::hardware::details::HidlInstrumentor*, android::sp<android::hardware::graphics::composer::V2_1::IComposerCallback> const&)+392)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #11 pc 000000000007b894  /system/lib64/libsurfaceflinger.so (android::Hwc2::impl::Composer::registerCallback(android::sp<android::hardware::graphics::composer::V2_1::IComposerCallback> const&)+44)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #12 pc 00000000000851b8  /system/lib64/libsurfaceflinger.so (HWC2::Device::registerCallback(HWC2::ComposerCallback*, int)+200)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #13 pc 00000000000b64d8  /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+1000)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #14 pc 00000000000036a4  /system/bin/surfaceflinger (main+316)
01-01 00:03:39.674  5909  5909 F DEBUG   :     #15 pc 00000000000d3844  /system/lib64/libc.so (__libc_init+100)

#2

Hi @yuhsien-chen,

Which kernel version are you using?

BTW, should note that sometimes when update images, you need to update boot.img, system.img and vendor.img (I missed vendor.img before so I encountered issue but this was on Hikey960).

You could try the snapshot building images firstly [1], If still see the issue with snapshot building, please report back, thanks.

[1] http://snapshots.linaro.org/96boards/hikey/linaro/aosp-master/latest/


#3

Hi, @leo-yan

Thanks for your reply.
I’ll try the snapshot building soon.

Thanks.


#4

Hi @leo-yan

We have tried the kernel version.
4.9.134-09908-g0ac6bd98d060 for flash this boot-4.9-0ac6bd98d060.img.xz.
And
4.9.124-09042-gbbab5cb for boot.img.xz.

Neither works.

By the way, we flash image by use device/linaro/hikey/installer/hikey/flash-all.sh
That’ll flash all images that need, include vendor.img.

Thanks for your help.


#5

Corrected: I can reproduce your issue now with linaro-hikey repository [1], will follow up for this.

Thanks for reporting this issue and sorry for just now my confused replying.

Updated: have filed bug to track this: https://bugs.96boards.org/show_bug.cgi?id=791

[1] https://android.googlesource.com/device/linaro/hikey


#6

Hi @leo-yan

Thanks for your help.


#7

Hi @yuhsien-chen,

Please try to insert HDMI cable.

At my side I can see after inserting HDMI cable can dismiss this issue. Though I don’t think this is a final fixing but hope this can let you have a workable environment.


#8

This issue has been reported both in internal bug tracking system and on forum for Hikey/Hikey960 for the display crash loop if without connecting HDMI cable, the workaround for this issue is we can use vfb:

Enable kernel config CONFIG_FB_VIRTUAL=y and set "video=vfb:640x480-32@30 vfb.videomemorysize=3145728 " in the kernel command line.


#9

Hi @leo-yan,

Thanks for your support.
I have 2 questions.

  1. If we enable CONFIG_FB_VIRTUAL=y, we don’t need connect HDMI cable?
  2. set "video=vfb:640x480-32@30 vfb.videomemorysize=3145728 " in the kernel command line.
    => Does this means adb shell to control hikey board, and type video=vfb:640x480-32@30 vfb.videomemorysize=3145728 in command line?

Thanks.


#10

Hi @leo-yan,

Thanks for your support.
I have 2 questions.

  1. If we enable CONFIG_FB_VIRTUAL=y, we don’t need connect HDMI cable?

Yes, after enable VFB so don’t neey connect HDMI cable.

  1. set "video=vfb:640x480-32@30 vfb.videomemorysize=3145728 " in the kernel command line.
    => Does this means adb shell to control hikey board, and type video=vfb:640x480-32@30 vfb.videomemorysize=3145728 in command line?

No, I mean when kernel boot up, we can pass kernel command line so
kernel can do initialization based on these parameters in kernel
command line.

You could refer this in the Android doc to change kernel command line:
https://source.android.com/setup/build/devices#620hikey

“Edit device/linaro/hikey/hikey/BoardConfig.mk parameter
BOARD_KERNEL_CMDLINE and configure the video setting.”


#11

Hi @leo-yan,

Got it!
Thanks for reply.
We’ll try it soon.


#12

Hi @leo-yan,

We had tried the workaround method, the problem still.


#13

Hi @yuhsien-chen, I will try it at my side and will let you know the result.