AOSP built from sources fails on HiKey960

Hi all,

I’m trying to build AOSP 9.0 from sources and run it on my HiKey960 (Ver. B). I’m following the official AOSP instructions [1]. I deviate from the instructions in that I’m building a release build:

$ repo init --depth=1 -u -b android-9.0.0_r34

Also, I use a modified version of that pull the images from our build server to the local machine connected to the board. Apart from that it should be identical.

Android userland is not being run, instead I get repeated errors of this sort:

[   17.222356] Pending event is same --> ignore this event 2
[   17.228065] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[   21.935057] [I/hisi_pd] PE:TYPE-C Only Charger!^M
[   21.939999] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[   21.946016] [I/hisi_pd] pd_dpm_report_pd_sink_vbus : Sink 5000 mV, 500 mA
[   21.953024] [E/hisi_pd] pd_dpm_vbus_notifier_call: pd_dpm_vbus_notifier_call!!!,++++
[   21.960957] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=8,+++
[   25.220298] ufshcd-hi3660 ff3b0000.ufs: ufshcd_issue_tm_cmd: task management cmd 0x80 timed-out
[   25.229318] ufshcd-hi3660 ff3b0000.ufs: ufshcd_abort: failed with err -110
[   25.236545] ufshcd-hi3660 ff3b0000.ufs: ufshcd_task_req_compl: failed, ocs = 0xf
[   25.244150] ufshcd-hi3660 ff3b0000.ufs: ufshcd_eh_device_reset_handler: failed with err 15
[   25.434971] ufshcd-hi3660 ff3b0000.ufs: ufshcd_read_desc_param: Failed reading descriptor. desc_id 0 param_offset 0 buff_len 31 ret 0
[   25.447414] ufshcd-hi3660 ff3b0000.ufs: ufs_get_device_info: Failed reading Device Desc. err = -22
[   25.456830] ufshcd-hi3660 ff3b0000.ufs: ufs_advertise_fixup_device: Failed getting device info. err = -22
[   25.469191] ufs final power mode: gear = 3, lane = 2, pwr = 1, rate = 2
[   25.476040] ufshcd-hi3660 ff3b0000.ufs: set TX_EQUALIZER 3.5db
[   25.486697] ufshcd-hi3660 ff3b0000.ufs: check TX_EQUALIZER DB value lane0 = 0x1
[   25.494619] ufshcd-hi3660 ff3b0000.ufs: check TX_EQUALIZER DB value lane1 = 0x1 

Looks like a problem accessing the flash. This worked without issues with the pre-installed image as well as well as a more recent factory image. The full logs from flashing and booting the device are here.

Ideas and suggestions are very welcome! Thanks!



That will be the root of your problem. Hikey960 is NOT supported on release branches. It is supported only on MASTER branch.

But be aware that at the moment, the master branch is broken due to;
with hackaround available;

My recommendation would be to exclusively use a known-good-manifest, available from here;

Think of a known-good-manifest as a somewhat tested snapshot of AOSP.

Thanks for the explanation and pointer to the good manifests repo.

Just to be sure: to get a good manifest closes to the android-9.0.0_r34 branch I’m interested in, what would I do? Looking when this branch was forked from master and pick a good manifest dated before the fork?

Out of curiosity: What is the reason for not supporting release branches? HiKey960 is a reference platform after all and this is a bit unexpected.



That’s not how the branches work in AOSP. AOSP master isn’t the “real” master, and AOSP release branches are NOT forked from AOSP master. They’re forked from Google’s private master. Its a bit of an annoying abuse of the name “master”, it really should be named “dev”. The relationships between these all works kind of like this;

Google internal master <–> Google internal dev
Google internal master --> AOSP release
Google internal dev <–> AOSP master

And it is actually a lot more complicated than that, since google has a bunch of internal dev branches.

In other words, don’t expect any relationship between master and release branches.

And similar to the naming of the AOSP dev branch as master, the Hikey960 is really a dev board, not so much a reference board.


the well-known manifests approach worked well and I have a working AOSP build now. Thanks for your support!

The meaning of AOSP branches is a bit non-intuitive indeed. Thanks for pointing this out. Is there any decent way to (roughly) map a manifest in the know-good repo to an Android release?


A known good manifests is just a snapshot of master at some particular point in time, which has been minimally tested to boot and for basic functionality. There is no relationship between it and release branches beyond what I’ve already described.