Bootloop in db410c for Linaro AOSP using custom Kernel

Hi Guys. I’m trying to boot my db410 building aosp+kernel (linaro) using the instructions in https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/guides/aosp.md.html . Although the defconfig is not available, I’m using the procedure that imitates what your jenkins does at lt-qcom-linux-aosp.yaml - job/configs.git - (found this in a @anon91830841 answer for another post)
I’m not sure if this is a defconfig issue anyway, but comparing the serial output for the boot process using the prebuilt kernel (boots successfully) and the one using the custom built kernel (boot loop)., I see that the failed boot outputs:

 init: init first stage started!
 init: Using Android DT directory /proc/device-tree/firmware/android/
 init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
 init: Failed to read fstab from device tree
 init: [libfs_mgr]fs_mgr_read_fstab_default(): failed to find device default fstab
 init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
 init: First stage mount skipped (missing/incompatible/empty fstab in device tree)
 init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
 init: Loading SELinux policy
 selinux: SELinux:  Could not open /sepolicy:  No such file or directory     
 init: Failed to load monolithic SELinux policy: No such file or directory
 init: Unable to load SELinux policy
 init: Reboot ending, jumping to kernel

and this leads to a boot to fastboot mode (I don’t know why), while the good boot outputs:

 init: init first stage started!
 init: Using Android DT directory /proc/device-tree/firmware/android/
 init: [libfs_mgr]fs_mgr_read_fstab_default(): failed to find device default fstab
 init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/platform/soc/7824900.sdhci/by-name/system
 usb 1-1: new high-speed USB device number 2 using ci_hdrc
 EXT4-fs (mmcblk0p23): mounted filesystem without journal. Opts: (null)
 init: [libfs_mgr]__mount(source=/dev/block/platform/soc/7824900.sdhci/by-name/system,target=/system,type=ext4)=0: Success
 init: Skipped setting INIT_AVB_VERSION (not in recovery mode)
 init: Loading SELinux policy
 SELinux:  Class infiniband_pkey not defined in policy.
 SELinux:  Class infiniband_endport not defined in policy.
 SELinux: the above unknown classes and permissions will be denied
 SELinux:  policy capability network_peer_controls=1
 SELinux:  policy capability open_perms=1
 SELinux:  policy capability extended_socket_class=1
 SELinux:  policy capability always_check_network=0
 SELinux:  policy capability cgroup_seclabel=0
 SELinux:  policy capability nnp_nosuid_transition=1 

and continues OK.

Could this be related to the defconfig? Does any expert see something here?

could you share full log? (e.g. via pastebin)

Hi @Loic , here is the full log for the bad boot: https://pastebin.com/u60py10W

Thank you!

So Android init is unable to mount the system partition because there is no fstab found.

I think issue is due to this patch:
https://android-review.linaro.org/#/c/device/linaro/dragonboard410c/+/19611/
Which removes system part from fstab.

Now the system fstab entries need to be in the DTS. There is a patch for the prebuilt dtb:
https://android-review.linaro.org/#/c/device/linaro/dragonboard410c-kernel/+/19608/

I don’t see any related change in the QCOMLT kernel Linaro Git Hosting (release/android/qcomlt-4.14)
However change is available in android-git.linaro.org/kernel/linaro-android.git (wip/dragonboard-kernel):
linaro-android.git - Basic Linaro Android kernel (pristine + Android patchset)

I think some work is ongoing, and the qcomlt kernel has not been aligned yet.

So you can either use the prebuilt DTB available in device/linaro/dragonboard410c-kernel dir and regenerate your bootimg, or apply the DTS patch in your kernel and rebuild the dtb.

1 Like

That was the problem. Thank you @Loic