AOSP Automotive 9


#42

hi @ edward , doitright ,
My step of building android automotive is listed below

  1. Init AOSP repo
    repo init -u https://android.googlesource.com/platform/manifest -b master
  2. Sync with manifest 2018-12-10_16_40_49-pinned-manifest.xml
    repo sync -j8 -m 2018-12-10_16_40_49-pinned-manifest.xml
  3. Replace /device/linaro/hikey with
    git clone https://gitlab.com/HiKey960-Car/android_device_linaro_hikey.git -b master_091118_car96
    4.Build
    source build/envsetup.sh
    wget https://dl.google.com/dl/android/aosp/hisilicon-hikey960-OPR-3c243263.tgz
    tar xzf hisilicon-hikey960-OPR-3c243263.tgz
    ./extract-hisilicon-hikey960.sh
    lunch hikey960_car-userdebug
    UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=“1920x1080@60” m -j4

wildcard(out/target/product/hikey960/clean_steps.mk) was changed, regenerating…
[ 3% 3693/104925] build out/target/product/hikey960/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf
FAILED: out/target/product/hikey960/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf
/bin/bash -c “(m4 --fatal-warnings -D mls_num_sens=1 -D mls_num_cats=1024 -D target_build_variant=userdebug -D target_with_dexpreopt=true -D target_arch=arm64 -D target_with_asan=false -D target_full_treble=true -D target_compatible_property=false -D target_exclude_build_test= -s system/sepolicy/private/security_classes system/sepolicy/private/initial_sids system/sepolicy/private/access_vectors system/sepolicy/public/global_macros system/sepolicy/public/neverallow_macros system/sepolicy/private/mls_macros system/sepolicy/private/mls_decl system/sepolicy/private/mls system/sepolicy/private/policy_capabilities system/sepolicy/public/te_macros system/sepolicy/public/attributes system/sepolicy/public/ioctl_defines system/sepolicy/public/ioctl_macros system/sepolicy/public/adbd.te system/sepolicy/public/apexd.te system/sepolicy/public/app.te system/sepolicy/public/asan_extract.te system/sepolicy/public/audioserver.te system/sepolicy/public/blkid.te system/sepolicy/public/blkid_untrusted.te system/sepolicy/public/bluetooth.te system/sepolicy/public/bootanim.te system/sepolicy/public/bootstat.te system/sepolicy/public/bufferhubd.te system/sepolicy/public/cameraserver.te system/sepolicy/public/charger.te system/sepolicy/public/clatd.te system/sepolicy/public/cppreopts.te system/sepolicy/public/crash_dump.te system/sepolicy/public/device.te system/sepolicy/public/dex2oat.te system/sepolicy/public/dhcp.te system/sepolicy/public/display_service_server.te system/sepolicy/public/dnsmasq.te system/sepolicy/public/domain.te system/sepolicy/public/drmserver.te system/sepolicy/public/dumpstate.te system/sepolicy/public/e2fs.te system/sepolicy/public/ephemeral_app.te system/sepolicy/public/fastbootd.te system/sepolicy/public/file.te system/sepolicy/public/fingerprintd.te system/sepolicy/public/flags_heatlh_check.te system/sepolicy/public/fsck.te system/sepolicy/public/fsck_untrusted.te system/sepolicy/public/fwk_bufferhub.te system/sepolicy/public/gatekeeperd.te system/sepolicy/public/hal_allocator.te system/sepolicy/public/hal_atrace.te system/sepolicy/public/hal_audio.te system/sepolicy/public/hal_audiocontrol.te system/sepolicy/public/hal_authsecret.te system/sepolicy/public/hal_bluetooth.te system/sepolicy/public/hal_bootctl.te system/sepolicy/public/hal_broadcastradio.te system/sepolicy/public/hal_camera.te system/sepolicy/public/hal_cas.te system/sepolicy/public/hal_configstore.te system/sepolicy/public/hal_confirmationui.te system/sepolicy/public/hal_contexthub.te system/sepolicy/public/hal_drm.te system/sepolicy/public/hal_dumpstate.te system/sepolicy/public/hal_evs.te system/sepolicy/public/hal_fingerprint.te system/sepolicy/public/hal_gatekeeper.te system/sepolicy/public/hal_gnss.te system/sepolicy/public/hal_graphics_allocator.te system/sepolicy/public/hal_graphics_composer.te system/sepolicy/public/hal_health.te system/sepolicy/public/hal_health_storage.te system/sepolicy/public/hal_ir.te system/sepolicy/public/hal_keymaster.te system/sepolicy/public/hal_light.te system/sepolicy/public/hal_lowpan.te system/sepolicy/public/hal_memtrack.te system/sepolicy/public/hal_neuralnetworks.te system/sepolicy/public/hal_neverallows.te system/sepolicy/public/hal_nfc.te system/sepolicy/public/hal_oemlock.te system/sepolicy/public/hal_omx.te system/sepolicy/public/hal_power.te system/sepolicy/public/hal_secure_element.te system/sepolicy/public/hal_sensors.te system/sepolicy/public/hal_system_suspend.te system/sepolicy/public/hal_telephony.te system/sepolicy/public/hal_tetheroffload.te system/sepolicy/public/hal_thermal.te system/sepolicy/public/hal_tv_cec.te system/sepolicy/public/hal_tv_input.te system/sepolicy/public/hal_usb.te system/sepolicy/public/hal_usb_gadget.te system/sepolicy/public/hal_vehicle.te system/sepolicy/public/hal_vibrator.te system/sepolicy/public/hal_vr.te system/sepolicy/public/hal_weaver.te system/sepolicy/public/hal_wifi.te system/sepolicy/public/hal_wifi_hostapd.te system/sepolicy/public/hal_wifi_offload.te system/sepolicy/public/hal_wifi_supplicant.te system/sepolicy/public/healthd.te system/sepolicy/public/heapprofd.te system/sepolicy/public/hwservice.te system/sepolicy/public/hwservicemanager.te system/sepolicy/public/idmap.te system/sepolicy/public/incident.te system/sepolicy/public/incident_helper.te system/sepolicy/public/incidentd.te system/sepolicy/public/init.te system/sepolicy/public/inputflinger.te system/sepolicy/public/install_recovery.te system/sepolicy/public/installd.te system/sepolicy/public/iorapd.te system/sepolicy/public/isolated_app.te system/sepolicy/public/kernel.te system/sepolicy/public/keystore.te system/sepolicy/public/llkd.te system/sepolicy/public/lmkd.te system/sepolicy/public/logd.te system/sepolicy/public/logpersist.te system/sepolicy/public/mdnsd.te system/sepolicy/public/mediadrmserver.te system/sepolicy/public/mediaextractor.te system/sepolicy/public/mediametrics.te system/sepolicy/public/mediaprovider.te system/sepolicy/public/mediaserver.te system/sepolicy/public/mediaswcodec.te system/sepolicy/public/modprobe.te system/sepolicy/public/mtp.te system/sepolicy/public/net.te system/sepolicy/public/netd.te system/sepolicy/public/netutils_wrapper.te system/sepolicy/public/nfc.te system/sepolicy/public/otapreopt_chroot.te system/sepolicy/public/otapreopt_slot.te system/sepolicy/public/performanced.te system/sepolicy/public/perfprofd.te system/sepolicy/public/platform_app.te system/sepolicy/public/postinstall.te system/sepolicy/public/postinstall_dexopt.te system/sepolicy/public/ppp.te system/sepolicy/public/preopt2cachename.te system/sepolicy/public/priv_app.te system/sepolicy/public/profman.te system/sepolicy/public/property.te system/sepolicy/public/racoon.te system/sepolicy/public/radio.te system/sepolicy/public/recovery.te system/sepolicy/public/recovery_persist.te system/sepolicy/public/recovery_refresh.te system/sepolicy/public/runas.te system/sepolicy/public/sdcardd.te system/sepolicy/public/secure_element.te system/sepolicy/public/service.te system/sepolicy/public/servicemanager.te system/sepolicy/public/sgdisk.te system/sepolicy/public/shared_relro.te system/sepolicy/public/shell.te system/sepolicy/public/slideshow.te system/sepolicy/public/statsd.te system/sepolicy/public/su.te system/sepolicy/public/surfaceflinger.te system/sepolicy/public/swcodec_service_server.te system/sepolicy/public/system_app.te system/sepolicy/public/system_server.te system/sepolicy/public/tee.te system/sepolicy/public/thermalserviced.te system/sepolicy/public/tombstoned.te system/sepolicy/public/toolbox.te system/sepolicy/public/traced_probes.te system/sepolicy/public/traceur_app.te system/sepolicy/public/tzdatacheck.te system/sepolicy/public/ueventd.te system/sepolicy/public/uncrypt.te system/sepolicy/public/untrusted_app.te system/sepolicy/public/update_engine.te system/sepolicy/public/update_engine_common.te system/sepolicy/public/update_verifier.te system/sepolicy/public/usbd.te system/sepolicy/public/vdc.te system/sepolicy/public/vendor_init.te system/sepolicy/public/vendor_shell.te system/sepolicy/public/vendor_toolbox.te system/sepolicy/public/virtual_touchpad.te system/sepolicy/public/vndservice.te system/sepolicy/public/vndservicemanager.te system/sepolicy/public/vold.te system/sepolicy/public/vold_prepare_subdirs.te system/sepolicy/public/vr_hwc.te system/sepolicy/public/watchdogd.te system/sepolicy/public/webview_zygote.te system/sepolicy/public/wificond.te system/sepolicy/public/wpantund.te system/sepolicy/public/zygote.te packages/services/Car/car_product/sepolicy/public/carservice_app.te packages/services/Car/car_product/sepolicy/public/file.te packages/services/Car/car_product/sepolicy/public/service.te system/sepolicy/private/adbd.te system/sepolicy/private/apexd.te system/sepolicy/private/app.te system/sepolicy/private/app_neverallows.te system/sepolicy/private/asan_extract.te system/sepolicy/private/atrace.te system/sepolicy/private/audioserver.te system/sepolicy/private/binder_in_vendor_violators.te system/sepolicy/private/binderservicedomain.te system/sepolicy/private/blank_screen.te system/sepolicy/private/blkid.te system/sepolicy/private/blkid_untrusted.te system/sepolicy/private/bluetooth.te system/sepolicy/private/bluetoothdomain.te system/sepolicy/private/bootanim.te system/sepolicy/private/bootstat.te system/sepolicy/private/bpfloader.te system/sepolicy/private/bufferhubd.te system/sepolicy/private/cameraserver.te system/sepolicy/private/charger.te system/sepolicy/private/clatd.te system/sepolicy/private/coredomain.te system/sepolicy/private/cppreopts.te system/sepolicy/private/crash_dump.te system/sepolicy/private/dex2oat.te system/sepolicy/private/dexoptanalyzer.te system/sepolicy/private/dhcp.te system/sepolicy/private/dnsmasq.te system/sepolicy/private/domain.te system/sepolicy/private/drmserver.te system/sepolicy/private/dumpstate.te system/sepolicy/private/ephemeral_app.te system/sepolicy/private/fastbootd.te system/sepolicy/private/file.te system/sepolicy/private/fingerprintd.te system/sepolicy/private/flags_health_check.te system/sepolicy/private/fsck.te system/sepolicy/private/fsck_untrusted.te system/sepolicy/private/fwk_bufferhub.te system/sepolicy/private/gatekeeperd.te system/sepolicy/private/gpuservice.te system/sepolicy/private/hal_allocator_default.te system/sepolicy/private/hal_system_suspend_default.te system/sepolicy/private/halclientdomain.te system/sepolicy/private/halserverdomain.te system/sepolicy/private/healthd.te system/sepolicy/private/heapprofd.te system/sepolicy/private/hwservicemanager.te system/sepolicy/private/idmap.te system/sepolicy/private/incident.te system/sepolicy/private/incident_helper.te system/sepolicy/private/incidentd.te system/sepolicy/private/init.te system/sepolicy/private/inputflinger.te system/sepolicy/private/install_recovery.te system/sepolicy/private/installd.te system/sepolicy/private/iorapd.te system/sepolicy/private/isolated_app.te system/sepolicy/private/iw.te system/sepolicy/private/kernel.te system/sepolicy/private/keystore.te system/sepolicy/private/llkd.te system/sepolicy/private/lmkd.te system/sepolicy/private/logd.te system/sepolicy/private/logpersist.te system/sepolicy/private/mdnsd.te system/sepolicy/private/mediadrmserver.te system/sepolicy/private/mediaextractor.te system/sepolicy/private/mediametrics.te system/sepolicy/private/mediaprovider.te system/sepolicy/private/mediaserver.te system/sepolicy/private/mediaswcodec.te system/sepolicy/private/modprobe.te system/sepolicy/private/mtp.te system/sepolicy/private/net.te system/sepolicy/private/netd.te system/sepolicy/private/netutils_wrapper.te system/sepolicy/private/nfc.te system/sepolicy/private/otapreopt_chroot.te system/sepolicy/private/otapreopt_slot.te system/sepolicy/private/perfetto.te system/sepolicy/private/performanced.te system/sepolicy/private/perfprofd.te system/sepolicy/private/platform_app.te system/sepolicy/private/postinstall.te system/sepolicy/private/postinstall_dexopt.te system/sepolicy/private/ppp.te system/sepolicy/private/preloads_copy.te system/sepolicy/private/preopt2cachename.te system/sepolicy/private/priv_app.te system/sepolicy/private/profman.te system/sepolicy/private/racoon.te system/sepolicy/private/radio.te system/sepolicy/private/recovery.te system/sepolicy/private/recovery_persist.te system/sepolicy/private/recovery_refresh.te system/sepolicy/private/runas.te system/sepolicy/private/runas_app.te system/sepolicy/private/sdcardd.te system/sepolicy/private/secure_element.te system/sepolicy/private/service.te system/sepolicy/private/servicemanager.te system/sepolicy/private/sgdisk.te system/sepolicy/private/shared_relro.te system/sepolicy/private/shell.te system/sepolicy/private/slideshow.te system/sepolicy/private/stats.te system/sepolicy/private/statsd.te system/sepolicy/private/storaged.te system/sepolicy/private/su.te system/sepolicy/private/surfaceflinger.te system/sepolicy/private/system_app.te system/sepolicy/private/system_server.te system/sepolicy/private/system_server_startup.te system/sepolicy/private/thermalserviced.te system/sepolicy/private/tombstoned.te system/sepolicy/private/toolbox.te system/sepolicy/private/traced.te system/sepolicy/private/traced_probes.te system/sepolicy/private/traceur_app.te system/sepolicy/private/tzdatacheck.te system/sepolicy/private/ueventd.te system/sepolicy/private/uncrypt.te system/sepolicy/private/untrusted_app.te system/sepolicy/private/untrusted_app_25.te system/sepolicy/private/untrusted_app_27.te system/sepolicy/private/untrusted_app_all.te system/sepolicy/private/update_engine.te system/sepolicy/private/update_engine_common.te system/sepolicy/private/update_verifier.te system/sepolicy/private/usbd.te system/sepolicy/private/vdc.te system/sepolicy/private/vendor_init.te system/sepolicy/private/virtual_touchpad.te system/sepolicy/private/vold.te system/sepolicy/private/vold_prepare_subdirs.te system/sepolicy/private/vr_hwc.te system/sepolicy/private/wait_for_keymaster.te system/sepolicy/private/watchdogd.te system/sepolicy/private/webview_zygote.te system/sepolicy/private/wificond.te system/sepolicy/private/wpantund.te system/sepolicy/private/zygote.te packages/services/Car/car_product/sepolicy/private/carservice_app.te packages/services/Car/car_product/sepolicy/private/procfsinspector.te system/sepolicy/private/roles_decl system/sepolicy/public/roles system/sepolicy/private/users system/sepolicy/private/initial_sid_contexts system/sepolicy/private/fs_use system/sepolicy/private/genfs_contexts system/sepolicy/private/port_contexts > out/target/product/hikey960/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf ) && (sed ‘/^\sdontaudit.;/d’ out/target/product/hikey960/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf | sed ‘/^\s*dontaudit/,/;/d’ > out/target/product/hikey960/obj/ETC/plat_sepolicy.cil_intermediates/plat_policy.conf.dontaudit )”
/bin/bash: m4: command not found

[ 3% 3694/104925] build out/target/product/hikey960/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
FAILED: out/target/product/hikey960/obj/ETC/sepolicy_neverallows_intermediates/policy.conf

[ 3% 3695/104925] build out/target/product/hikey960/obj/ETC/sepolicy_neverallows_intermediates/policy_2.conf
FAILED: out/target/product/hikey960/obj/ETC/sepolicy_neverallows_intermediates/policy_2.conf


#43

“2018-12-10_16_40_49-pinned-manifest.xml”

Try again, but use the manifest with the correct date instead.

And don’t do this:
wget https://dl.google.com/dl/android/aosp/hisilicon-hikey960-OPR-3c243263.tgz
tar xzf hisilicon-hikey960-OPR-3c243263.tgz
./extract-hisilicon-hikey960.sh


#44

hi @doitright
Which manifest i should use (use the manifest with the correct date instead)?

I tried with 2018-09-11_15_49_35-pinned-manifest.xml, but error in repo sync

OUTPUT:

Username for ‘https://android.googlesource.com’: Password for ‘https://android.googlesource.com’:
fatal: Authentication failed for ‘https://android.googlesource.com/platform/vendor/aosp/linaro/hikey960/

error: Cannot fetch platform/vendor/aosp/linaro/hikey960

error: Exited sync due to fetch errors


#45

hi @Edward

Which manifest i should use for repo sync for Android Automotive in Hikey960 board?

(Known good manifests are kept here: https://github.com/96boards/aosp-known-good-manifests/tree/master/known-good/hikey960)


#46

@Jerry_John and @doitright ,

I’m still feature it out that I cannot repo sync with 2018-09-11_15_49_35-pinned-manifest.xml with the same authentication error and I’ve tried the solution mentioned in " Using Authentication" paragraph below which is still not work for me:
https://source.android.com/setup/build/downloading

However, I’m trying to sync the latest code and git reset hard to the revision defined in 2018-09-11_15_49_35-pinned-manifest.xml for building Hikye960 car as below:

build error

FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: system/netd/bpfloader/Android.bp:20:1: module “bpfloader” already defined
system/bpf/bpfloader/Android.bp:20:1 <-- previous definition here
error: external/bcc/Android.bp:37:1: module “libbpf_headers” already defined
system/netd/libbpf/Android.bp:17:1 <-- previous definition here
error: external/bcc/Android.bp:49:1: module “libbpf” already defined
system/netd/libbpf/Android.bp:29:1 <-- previous definition here
error: system/netd/bpfloader/Android.bp:50:1: module “bpf_kern.o” already defined
system/bpf/bpfloader/Android.bp:54:1 <-- previous definition here
error: frameworks/opt/gamesdk/samples/bouncyball/Android.bp:33:13: unrecognized property “jni_libs”
error: frameworks/opt/gamesdk/samples/device_info_app/Android.bp:13:11: unrecognized property “jni_libs”
16:23:44 soong bootstrap failed with: exit status 1


#47

try editing the known-good manifest and comment out or delete the line for “platform/vendor/aosp/linaro/hikey960” – I believe that the files in there are specifically for video decode acceleration, and shouldn’t otherwise impact the build. Seems that some of the repositories have been restructured since September.

Edit: appears to be the same files you can get from here: https://developers.google.com/android/drivers#hikey96020180628


#48

hi @ doitright
My step of building android automotive is listed below

  1. Init AOSP repo
    repo init -u https://android.googlesource.com/platform/manifest -b master
  2. Sync with manifest(default)
    repo sync -j8
  3. Replace /device/linaro/hikey with
    git clone https://gitlab.com/HiKey960-Car/android_device_linaro_hikey.git -b master_091118_car96
  4. Replaced “hi3660-hikey960.dtb-4.9” and “Image.gz-dtb-hikey960-4.9” with android_kernel_linaro_hikey(https://gitlab.com/HiKey960-Car/android_kernel_linaro_hikey)
    5.Build
    source build/envsetup.sh
    lunch hikey960_car-userdebug
    UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=“1920x1080@60” m -j4

plz chk this output

[ 0% 19/6026] Target boot image: out/target/product/hikey960/boot.img
FAILED: out/target/product/hikey960/boot.img
/bin/bash -c “(out/host/linux-x86/bin/mkbootimg --kernel out/target/product/hikey960/kernel --ramdisk out/target/product/hikey960/ramdisk.img --cmdline “androidboot.hardware=hikey960 console=ttyFIQ0 androidboot.console=ttyFIQ0 firmware_class.path=/vendor/firmware loglevel=15 efi=noruntime androidboot.bootreason=reboot video=HDMI-A-1:“1920x1080@60” overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab buildvariant=userdebug” --os_version Q --os_patch_level 2018-12-05 --base 0x0 --tags_offset 0x07a00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 --output out/target/product/hikey960/boot.img ) && (true )”
Traceback (most recent call last):
File “/XXX/WORKING_DIRECTORY/out/host/linux-x86/bin/mkbootimg/internal/stdlib/runpy.py”, line 174, in _run_module_as_main
File “/XXX/WORKING_DIRECTORY/out/host/linux-x86/bin/mkbootimg/internal/stdlib/runpy.py”, line 72, in _run_code
File “/XXX/WORKING_DIRECTORY/out/host/linux-x86/bin/mkbootimg/mkbootimg.py”, line 211, in
File “/XXX/WORKING_DIRECTORY/out/host/linux-x86/bin/mkbootimg/mkbootimg.py”, line 202, in main
File “/XXX/WORKING_DIRECTORY/out/host/linux-x86/bin/mkbootimg/mkbootimg.py”, line 79, in write_header
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 182: ordinal not in range(128)
12:34:21 ninja failed with: exit status 1

failed to build some targets (05:41 (mm:ss))

EDIT: Able to complete build by modifying to “UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=1920x1080@60 m -j4”

Able to flash, But not able to view anything in display(not able to see android bootscreen)


#49

Hi @Jerry_John,

Do not use default manifest !

Try below steps:

  1. Init AOSP repo
    repo init -u https://android.googlesource.com/platform/manifest -b master

  2. Sync with 2018-09-11_15:49:35-pinned-manifest.xml

  3. Build

    • delete the following two files
      packages/services/Car/car_product/overlay/frameworks/base/packages/SettingsLib/res/values/dimens.xml
      packages/services/Car/car_product/overlay/frameworks/base/packages/SettingsLib/res/values/styles.xml
    • . build/envsetup.sh
    • lunch hikey960_car-userdebug
    • UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=“1920x1080@60” m -j4

#50

I’d still like to know why you are all setting those variables that way for your builds.
I don’t even have the DMHD1000 hal adapted to Android 9 (because I’m not using that radio any more, they’re discontinued, very expensive, and can be difficult to find), so what possible reason would there be for enabling its build? And 1920x1080 is the DEFAULT resolution, you don’t need to specify a resolution unless you need to override the default. And are you using an actual UBLOX GPS (or clone)? If not, you would be better off with the serial GPS hal which will be compatible with a lot more GPS’s.


#51

If your hikey960 is too new, it may be failing to boot with that kernel. At some point I’m hoping to find time to bring the work up to a newer manifest version.


#52

hi @doitright

My board flash log
android out dir:./…/…/…/…/…//out/target/product/hikey960
target reported max download size of 471859200 bytes
sending ‘xloader’ (151 KB)…
OKAY [ 0.010s]
writing ‘xloader’…
FAILED (remote: flash write back vrl failure)
finished. total time: 0.377s
target reported max download size of 471859200 bytes
sending ‘ptable’ (196 KB)…
OKAY [ 0.012s]
writing ‘ptable’…
OKAY [ 0.023s]
finished. total time: 0.034s
target reported max download size of 471859200 bytes
sending ‘fastboot’ (3346 KB)…
OKAY [ 0.085s]
writing ‘fastboot’…
OKAY [ 0.047s]
finished. total time: 0.132s
rebooting into bootloader…
OKAY [ 0.012s]
finished. total time: 0.012s
sending ‘nvme’ (128 KB)…
FAILED (command write failed (Bad file descriptor))
finished. total time: 0.000s
< waiting for device >
target reported max download size of 471859200 bytes
sending ‘fw_lpm3’ (212 KB)…
OKAY [ 0.012s]
writing ‘fw_lpm3’…
OKAY [ 0.023s]
finished. total time: 0.035s
target reported max download size of 471859200 bytes
sending ‘trustfirmware’ (145 KB)…
OKAY [ 0.010s]
writing ‘trustfirmware’…
OKAY [ 0.013s]
finished. total time: 0.023s
target reported max download size of 471859200 bytes
sending ‘boot’ (0 KB)…
OKAY [ 0.007s]
writing ‘boot’…
OKAY [ 0.014s]
finished. total time: 0.021s
target reported max download size of 471859200 bytes
sending ‘dts’ (14 KB)…
OKAY [ 0.007s]
writing ‘dts’…
OKAY [ 0.015s]
finished. total time: 0.022s
target reported max download size of 471859200 bytes
sending sparse ‘system’ (460796 KB)…
OKAY [ 11.795s]
writing ‘system’…
OKAY [ 3.831s]
sending sparse ‘system’ (439996 KB)…
OKAY [ 11.396s]
writing ‘system’…
OKAY [ 3.474s]
sending sparse ‘system’ (372144 KB)…
OKAY [ 9.438s]
writing ‘system’…
OKAY [ 2.945s]
finished. total time: 42.880s
target reported max download size of 471859200 bytes
sending ‘vendor’ (194848 KB)…
OKAY [ 4.768s]
writing ‘vendor’…
OKAY [ 1.596s]
finished. total time: 6.364s
target reported max download size of 471859200 bytes
sending ‘cache’ (128 KB)…
OKAY [ 0.010s]
writing ‘cache’…
OKAY [ 0.035s]
finished. total time: 0.045s
target reported max download size of 471859200 bytes
sending ‘userdata’ (4292 KB)…
OKAY [ 0.108s]
writing ‘userdata’…
OKAY [ 0.183s]
finished. total time: 0.292s
rebooting…

finished. total time: 0.008s


#53

hi @doitright @Edward
is it the right way to build Android 9 for hikey960 board?

  1. Init AOSP repo
    repo init -u https://android.googlesource.com/platform/manifest -b master

  2. Sync with 2018-09-11_15:49:35-pinned-manifest.xml
    copy “https://github.com/96boards/aosp-known-good-manifests/tree/master/known-good/hikey960/2018-09-11_15:49:35-pinned-manifest.xml” to .repo/mainfests/
    remove “platform/vendor/aosp/linaro/hikey960” from 2018-09-11_15:49:35-pinned-manifest.xml"
    repo sync -m 2018-09-11_15:49:35-pinned-manifest.xml
    Replace /device/linaro/hikey with git clone https://gitlab.com/HiKey960-Car/android_device_linaro_hikey.git -b master_091118_car96

  3. Build
    delete the following two files
    packages/services/Car/car_product/overlay/frameworks/base/packages/SettingsLib/res/values/dimens.xml
    packages/services/Car/car_product/overlay/frameworks/base/packages/SettingsLib/res/values/styles.xml
    . build/envsetup.sh
    lunch hikey960_car-userdebug
    UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=“1920x1080@60” m -j4

Did i need any modification in the above steps?


#54

That looks approximately right.


#55

Hi @Jerry_John,

Did you still suffer from the following problem after synchronizing with 2018-09-11_15:49:35-pinned-manifest.xml?

FAILED: out/target/product/hikey960/boot.img
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 182: ordinal not in range
ninja failed with: exit status 1

Can you boot for hikey960 car now?

Hi @doitright,

I got two things to confirm with you below:

  1. Is there any way to resolve the following mentioned issue for making hikey960 car boot-able ? Can we build the latest kernel for boot.img and flash it ?
    “If your hikey960 is too new, it may be failing to boot with that kernel.”

  2. By the suggestion for setting build variables, we can use “m -j4” instead of “UBLOX_GPS_HAL=TRUE DMHD1000=TRUE HDMI_RES=“1920x1080@60” m -j4” in case we do not need UBLOX GPS, right?

Thanks~


#56
  1. newer kernel will likely not be compatible with older everything else. Best thing to do is to sync the latest good manifest, add my repos, pull the differences, resolve any conflicts, build, debug, etc.

Note the my device changes do NOT specifically require the kernel modifications. The kernel changes are there to support the hardware I am developing.

Eventually I’m going to get around to this myself, but probably not until after @jstultz gets the Bluetooth DMA working, which I’m expecting to offer a significant improvement in Bluetooth stability. Currently it is very easy to crash the Bluetooth by pushing a lot of data over the interface quickly, but it is pretty solid if you limit its use to voice.

  1. set the variables you need to set based on the hardware you are using. It certainly won’t help to set the dmhd1000. If you get your hands on a tef6686 (it should be connected to ls-i2c1), you can use TEF6686=TRUE to enable that. You only need to set the video mode if it tries to use the wrong mode. The kernel we have won’t necessarily pick the best resolution, so if the LCD controller offers scaling, the hikey960 will choose 1920x1080 over the panel’s native resolution. If that happens, set the native resolution with the video parameter.

But do note that there are $12 usb GPS modules that you can get from Amazon that are ublox compatible (probably clones). They work surprisingly well.


#57

@doitright: I’ve got patches pending on Gerrit to enable dma on the bluetooth uarts here:
https://android-review.googlesource.com/c/kernel/hikey-linaro/+/861359

If you have the time, do you mind giving it a whirl and letting me know if it does in fact improve things or if we have other issues to still chase? (Ha ha, of course we do - but maybe just in regard to the bt issues you’ve been seeing : )


#58

Thanks @jstultz , I’m not sure if I will have a chance before the weekend, but I will try to make some time to test it out.


#59

@doitright Thanks! Just as a heads up, I had some changeid trouble and the new URL is here: https://android-review.googlesource.com/c/kernel/hikey-linaro/+/863570


#60

hi @Edward, @doitright,

i was able to complete the build and flash the build to the hikey960 board and bring up Android automotive 9. i was able to test the audio(HDMI display speaker), wifi,BT(media play back) and Ublox gps.

Not able to hear BT call sounds in either sides – testing in progress
Can we able to bring up the radio, if we can select a better radio tunner and can we add in hal to Android 9

Thanks for the supports :slight_smile:


#61

Look in the audio hal. Remember that I work with specific custom hardware rather than general hardware, so you would have to adjust for that.

Calls should “just work” if you use my kernel with an I2S Mezzanine, currently on groupgets: https://groupgets.com/campaigns/485-i2s-mezzanine?mc_cid=c894d61819&mc_eid=365a235bb4

The I2S Mezzanine is a subset of the automotive board I am developing, which also has an amplifier, amfm radio, rtc, microcontroller, and more.

Currently, I am working on a custom radio tuner module, since neither of the previous tuners are acceptable. Dmhd is discontinued and not available in any volume or at a reasonable price, and tef6686 is not publicly documented, which means that there are some performance problems that I am not able to overcome. The new module uses the si4743 tuner ic, which does have public documentation.