Kernel version 5.4.12 rootfs is failing for SD820 based custom board

Hi All,

I am porting the kernel version 5.4.12 for our SD820 based custom board.
We were using 4.14.89 kernel but we want to bring up the kernel-5.4.12.
I downloaded source code from the below link and the branch is release/qcomlt-5.4-db820c

https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=release/qcomlt-5.4-db820c

Root File Systems used was :

  1. initrd.img-4.14.0-qcomlt-arm64 downloaded from
    Linaro Snapshots

  2. I renamed the below file to initrd.img-5.4.12-qcomlt-arm64
    initrd.img-5.4.0-qcomlt-arm64 downloaded from
    https://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/latest/

But no success from both the above rootfs and ended up with the below message at the end while booting.

Please find the link below for the complete boot log from 5.4.12 kernel.

ALERT! /dev/disk/by-partlabel/rootfs does not exist. Dropping to a shell!
(initramfs)
(initramfs)

@danielt
@Loic

First of all, that kernel is missing a lot of what the 820 needs to be properly functional, HOWEVER, having said that, it should at least boot if matched with a proper rootfs and built with a sane defconfig.

You should try these from the latest snapshot;
[config-5.4.0-qcomlt-arm64]
[initrd.img-5.4.0-qcomlt-arm64]

Now your log has an awful lot of errors in it, some look like bad defconfig related errors. There have been a fair number of changes to required configs between 4.14 and 5.4 that it necessitates you making changes if you are still using the config from 4.14.

And since your board is not actually a db820c… does it have UFS or eMMC? I’m not seeing any storage device initialization in your logs, which would be required in order to be able to mount a partition from it.

I’d suggest trying my 5.4.20 from here;

You probably want to check it out around this commit, since beyond that is to handle Android and a custom mezzanine board; e2e8f9f3a2d7a8bd7b5af7bb93d3d2895e5cabd9

I also added a defconfig at this commit which may or may not run debian, but at least should give you an idea of what the hardware needs: 80fba461b681dd5ba3ef1c70eb376cc326d732b8

Thanks for your inputs.
I have tried all the above suggested ways. From my observations I believe there could be a problem in
ufshc/ufs driver. Kindly go through the logs attached below.
Please help us find the bug.

Boot log :

Device tree :

Regards,
Shiva Shankar K.

@doitright
@srini

It seems to be a problem with your specific board, we cannot reproduce this with dragonboard820c…

[   11.261524] ufshcd-qcom 624000.ufshc: ufs_qcom_init: required phy device. hasn't probed yet. err = -517

The UFS phy (phy@627000) is not enabled in your devicetree (status = “disabled”).

Hi Loic,

As suggested above, I am using 5.4.20 kernel.
All these days we have been working on ufshc detection fail issue and sorted out. We just used dragon board device tree for our reference and made it up but then we landed up into a different issue i.e.,

  1. we are getting command prompt post extraction of the rootfs while booting, but we could see some interim crash messages. We are clueless where it is emerging from. Please find the link below for the boot log showing the crash message :
  1. Also, we would like to know about those peripherals which have been brought up in this kernel or those peripherals reliably functioning on dragon board.

  2. Is this kernel stable on dragon board?

Regards,
Shiva Shankar K.

@doitright
@Loic

Is that the 5.4.20 from my repository? If it is, then;

  1. what commit did you grab it at?
  2. what are you using for a defconfig?
  3. what are the actual differences between your board an a dragonboard 820c?

Or if you’re trying to use upstream from kernel.org, then you’re definitely missing some critically needed commits.

Hi right,

We are using kernel from

Please find the inline replies below :

  1. what commit did you grab it at?
    Ans. : sourced kernel from commit id : e2e8f9f3a2d7a8bd7b5af7bb93d3d2895e5cabd9

  2. what are you using for a defconfig?
    Ans. : db820c_defconfig from commit id : 80fba461b681dd5ba3ef1c70eb376cc326d732b8

  3. what are the actual differences between your board an a dragonboard 820c?
    Ans.

Ram : LPDDR4 4gb Pop (Custom board )
LPDDR4 3gb Pop (dragon boaard)

sensor : 9-axis sensor (Custom board )
3-axis sensor (dragon boaard)

usb : 2 * 2.0 host (Custom board )
1 * 2.0 device (dragon board)

debug console : uart (custom board)
usb (dragon board)

Rest all the devices have been retained.

Regards,
Shiva Shankar K.

@doitright
@Loic

Ok, the first thing I have to point out is that that defconfig is really meant for Android. But having said that, it should work fine for everything up to at least starting init.

The log you provide is very different than what I would expect from that kernel running on an actual db820c. Obviously things will initialize differently when the hardware isn’t identical, but that string of irq-gic errors, and opp errors are not something I would expect to see, I also notice that it isn’t initializing the cpufreq driver. You’re still trying to run it on your own DTS? What would it do if you tried to run it on the db820c DTS?

And per your differences, db820c debug console is definitely on UART. I also notice from your logs, that you have a different UFS.