All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: systemd-devel@lists.freedesktop.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Systemd-boot not properly loading device tree, when loaded by U-boot (ARM64, tested on RK3399)
Date: Fri, 17 Sep 2021 18:45:06 +0800	[thread overview]
Message-ID: <c83cf1a8-835e-7256-2c0d-dc131bcc1dbb@gmx.com> (raw)

Hi,

I'm recently testing booting my RK3399 boards with the following boot
sequence:

U-boot -> systemd-boot (EFI payload) -> kernel

Which provides much more flex than plain extlinux conf from U-boot.
(More choice, easier to write config, runtime kernel change).

So far "kernel" and "initramfs" key work fine.

But I notice that "devicetree" key is not working properly.

The Uboot fdt search path doesn't include "/dtbs" which is used by my
distro, and my entry config specify the device-tree file like this:

title		ManjaroARM boot from nvme
linux		/Image
devicetree	/dtbs/rockchip/rk3399-rockpro64.dtb
initrd		/initramfs-linux.img
options		console=ttyS2,1500000 root=/dev/arm_nvme/root rw loglevel=7

Thus if systemd-boot doesn't load the correct device-tree, kernel will
use the default fdt passed from Uboot, which is already out-of-date and
can cause problems for the upstream kernel I used.

Unfortunately, with above config, after booting the kernel, the fdt is
the fallback one from Uboot, not loading the proper one specified by
systemd-boot config.

The proof I went is checking the opp table.
I have replaced the "/dtbs/rockchip/rk3399-rockpro64.dtb" with a custom
dtb which uses op1 tables.
But the kernel only sees a very out-of-dated fdt, which some opp is even
invalid.

How could I continue debugging the missing link?
Like what systemd-boot needs to load the device-tree? Or U-boot EFI
environment lacks certain facility to support systemd-boot?

Thanks,
Qu

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-09-17 10:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 10:45 Qu Wenruo [this message]
2021-09-17 11:25 Systemd-boot not properly loading device tree, when loaded by U-boot (ARM64, tested on RK3399) Qu Wenruo
2021-09-17 11:25 ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c83cf1a8-835e-7256-2c0d-dc131bcc1dbb@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=systemd-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.