Android booting issue with hikey960 board using tools-images-hikey960/build-from-source/README-build-from-source.md


#1

Hi,

I have created a partial build of boot.img and using the method mentioned in the link “https://github.com/96boards-hikey/tools-images-hikey960/blob/master/build-from-source/README-build-from-source.md

I have a complete built images including ramdisk.img for the build.

The kernel build is successful and the kernel commit id is

commit 0ac6bd98d0602f3d9ce291700a5c47d6d2c9d1b1
Merge: 649c5d1 a427932
Author: John Stultz john.stultz@linaro.org
Date: Thu Oct 18 12:27:13 2018 -0700

Merge remote-tracking branch 'mirror-android-4.9' into android-hikey-linaro-4.9

Change-Id: Iadcf5af86f6e8528ddba88718b5194b234d54f24
Signed-off-by: John Stultz <john.stultz@linaro.org>

and i was able to create boot.img using,

./mkbootimg --kernel Image.gz-dtb --ramdisk ramdisk.img --cmdline “loglevel=15 androidboot.hardware=hikey960 androidboot.selinux=permissive firmware_class.path=/system/etc/firmware” --base 0x0 --tags-addr 0x07A00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 --os_version 7.0 --os_patch_level 2016-08-05 --output boot.img

my board is set to uefi booting as I had tried booting debian along side.

The problem is when i boot the kernel it is not able to find fstab as below logs:

[ 7.751707] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[ 7.751709] wl18xx_driver wl18xx.2.auto: Falling back to user helper
[ 7.779635] rtc-efi rtc-efi: setting system clock to 1970-01-01 00:09:43 UTC (583)
[ 7.787701] ALSA device list:
[ 7.790696] #0: hikey-sndcard
[ 7.794793] Freeing unused kernel memory: 3264K
[ 7.801854] init: init first stage started!
[ 7.806158] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 7.813838] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 7.821258] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 7.828658] init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
[ 7.834476] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 7.834482] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 7.834758] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 7.834764] Pending event is same --> ignore this event 2
[ 7.834893] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 7.865291] init: Failed to read fstab from device tree
[ 7.870702] init: [libfs_mgr]fs_mgr_read_fstab_default(): failed to find device default fstab
[ 7.879391] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 7.886799] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 7.894194] init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
[ 7.901886] kvm: exiting hardware virtualization
[ 7.901947] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -11
[ 7.901948] wlcore: WARNING falling back to default config
[ 8.020148] usb usb2-port1: attempt power cycle
[ 8.145728] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 8.156635] leds wifi_active: led_trigger_set: Error sending uevent
[ 8.164781] wlcore: loaded
[ 8.341342] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 8.347247] xhci-hcd xhci-hcd.0.auto: remove, state 4
[ 8.352516] usb usb1: USB disconnect, device number 1
[ 8.358702] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[ 8.364721] [dwc3_otg_stop_host]-
[ 8.368174] [dwc3_suspend_device] +
[ 8.371886] [dwc3_suspend_device] -
[ 8.373795] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 8.377461] sd 0:0:0:2: [sdc] Synchronizing SCSI cache
[ 8.382761] sd 0:0:0:1: [sdb] Synchronizing SCSI cache
[ 8.386467] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 8.396701] [dwc3_otg_work]-
[ 8.399623] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 8.405397] [USB3][handle_event]hiusb_status: HOST -> OFF
[ 8.410893] [USB3][handle_event][handle_event] type: 0
[ 8.447477] reboot: Restarting system with command ‘bootloader’

and it enters into fastboot mode.
but the original build is able to successfully boot.

need help to get this setup working.


#2

I think the document is not updated to use abootimg, I file one bug to track this issue [1].

Please refer the link for build booting image with abootimg: How to install apt on rpb(hikey960)

[1] https://bugs.96boards.org/show_bug.cgi?id=790


#3

Hi Leo,

Thank you for the information, As I dont have the complete android build, Can you suggest where I should download the abootimg from?


#4

Hi Leo,

I installed abootimg from ubuntu package.

and built the image as suggested by you using abootimg, but the result is similar

[ 7.738776] hisi_i2s_plat soc:hisi_i2s_plat: Failed to get DMA channel capabilities, falling back to period counting: -6
[ 7.749790] asoc-simple-card soc:sound: virtual-dai <-> hisi_i2s0 mapping ok
[ 7.758500] otg_wakelock_init: No USB transceiver found
[ 7.764007] dwmmc_k3 ff3ff000.dwmmc2: card claims to support voltages below defined range
[ 7.764101] input: keys as /devices/platform/keys/input/input0
[ 7.772275] rtc-efi rtc-efi: setting system clock to 1970-01-01 00:05:45 UTC (345)
[ 7.772550] ALSA device list:
[ 7.772551] #0: hikey-sndcard
[ 7.793256] Freeing unused kernel memory: 3264K
[ 7.800472] init: init first stage started!
[ 7.803003] mmc_host mmc1: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0)
[ 7.805614] mmc1: new SDIO card at address 0001
[ 7.806642] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[ 7.806644] wl18xx_driver wl18xx.2.auto: Falling back to user helper
[ 7.836495] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 7.844446] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 7.851876] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 7.859273] init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
[ 7.866875] init: Failed to read fstab from device tree
[ 7.868431] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=6,+++
[ 7.868438] [I/hisi_pd] pd_dpm_handle_pe_event unkonw event
[ 7.868713] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=5,+++
[ 7.868719] Pending event is same --> ignore this event 2
[ 7.868848] [E/hisi_pd] pd_dpm_handle_pe_event:!!!,event=3,+++
[ 7.901311] init: [libfs_mgr]fs_mgr_read_fstab_default(): failed to find device default fstab
[ 7.910004] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition vendor
[ 7.917413] init: [libfs_mgr]dt_fstab: Skip disabled entry for partition system
[ 7.924807] init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
[ 7.932502] kvm: exiting hardware virtualization
[ 7.932726] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -11
[ 7.932727] wlcore: WARNING falling back to default config
[ 8.043954] usb usb2-port1: attempt power cycle
[ 8.214975] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 8.226123] leds wifi_active: led_trigger_set: Error sending uevent
[ 8.234217] wlcore: loaded
[ 8.364926] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[ 8.370771] xhci-hcd xhci-hcd.0.auto: remove, state 4
[ 8.376047] usb usb1: USB disconnect, device number 1
[ 8.382208] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[ 8.388223] [dwc3_otg_stop_host]-
[ 8.391673] [dwc3_suspend_device] +
[ 8.395375] [dwc3_suspend_device] -
[ 8.397286] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 8.400936] sd 0:0:0:2: [sdc] Synchronizing SCSI cache
[ 8.406239] sd 0:0:0:1: [sdb] Synchronizing SCSI cache
[ 8.411466] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 8.420161] [dwc3_otg_work]-
[ 8.423147] [USB3][hisi_dwc3_wake_unlock]usb otg wake unlock
[ 8.428892] [USB3][handle_event]hiusb_status: HOST -> OFF
[ 8.434371] [USB3][handle_event][handle_event] type: 0
[ 8.471217] reboot: Restarting system with command ‘bootloader’
hikey960 boarid:5301 xloader use UART6
scsysstat_value[8].
clear reset source
last_keypoint0,reboot_type1
secdbg not DCU.
SecDbgVer exit


#5

So we can assume it’s in ramfs phase, could you check you are using right ramdisk.img? Usually after the AOSP is upgraded, you also need to use updated ramdisk.img, otherwise it might have some compatibility issue.


#6

After Daniel reminded me, this is one common issue recently for AOSP change to move fstab into DT, so you need to update dtb file for boot.img. Also please check if have included the patch [1] for hikey960 dts changing.

In case you are interesting in detailed info, you could refer @Loic answer for this [2].

[1] https://android.googlesource.com/kernel/hikey-linaro/+/984ec0cd1188833c8ccac36c888a7524f916284e^!/#F0
[2] Hikey970 Android won't boot