From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD4D5C433F5 for ; Fri, 17 Sep 2021 11:55:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6630060EE2 for ; Fri, 17 Sep 2021 11:55:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6630060EE2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poettering.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b3jozrsgEMEwJEwpMkniOdWDBm5WhoNfUsFb6W9HTpg=; b=Tdzjb1lX7qd5QC Mt1Q83iZrk3fSAc6QjI+1tmkGbo8NAvWPg4LxSbXRbxaZa9x7dfZBQDBbHZ7F1RgtIFo5AxerMy3J yC50VrX4ISZSZKJG51z8dx3dnVG5jNJ//XUczKJUHCwMuh86C90xIhgf1WPSZrlfGUvIGvUVa3t4r 14e1+43PTT+D8HS84eTt+vZQWlo1yMcjm0W5izCEoRnoJckbe4imFhIjmMOhqRmwldQ1C4Sh8z8Qo 6QDMJcdPOnvK6Pu2D4FPMwGmXWCr2pF172dO15eSUOrYbAnlqZzjt17Ec/KwFyW6NAHX+Rqq02D0f PH5KgCt6sazRRV+LQWow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRCR6-00Du9v-E3; Fri, 17 Sep 2021 11:53:44 +0000 Received: from gardel.0pointer.net ([2a01:238:43ed:c300:10c3:bcf3:3266:da74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRCR2-00Du9S-3R for linux-arm-kernel@lists.infradead.org; Fri, 17 Sep 2021 11:53:41 +0000 Received: from gardel-login.0pointer.net (gardel-mail [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74]) by gardel.0pointer.net (Postfix) with ESMTP id AFA24E80930; Fri, 17 Sep 2021 13:45:53 +0200 (CEST) Received: by gardel-login.0pointer.net (Postfix, from userid 1000) id 5DF5B160E58; Fri, 17 Sep 2021 13:45:53 +0200 (CEST) Date: Fri, 17 Sep 2021 13:45:53 +0200 From: Lennart Poettering To: Qu Wenruo Cc: systemd-devel@lists.freedesktop.org, U-Boot-Denx , Linux ARM Subject: Re: [systemd-devel] Systemd-boot not properly loading device tree, when loaded by U-boot (ARM64, tested on RK3399) Message-ID: References: <9e1e6e74-32a0-2f47-c530-63c42eaf4b19@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9e1e6e74-32a0-2f47-c530-63c42eaf4b19@suse.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210917_045340_330996_335A7CDF X-CRM114-Status: GOOD ( 18.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fr, 17.09.21 19:25, Qu Wenruo (wqu@suse.com) wrote: > 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? Did you see this: https://github.com/systemd/systemd/pull/19417 (and maybe this: https://github.com/systemd/systemd/pull/20601) maybe that addresses your issues? Lennart -- Lennart Poettering, Berlin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3DCDC433EF for ; Fri, 17 Sep 2021 12:07:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17EE461029 for ; Fri, 17 Sep 2021 12:07:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 17EE461029 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poettering.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4BE4C8320D; Fri, 17 Sep 2021 14:07:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=poettering.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5E78883217; Fri, 17 Sep 2021 13:45:57 +0200 (CEST) Received: from gardel.0pointer.net (gardel.0pointer.net [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0C56B8320D for ; Fri, 17 Sep 2021 13:45:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=poettering.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=lennart@poettering.net Received: from gardel-login.0pointer.net (gardel-mail [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74]) by gardel.0pointer.net (Postfix) with ESMTP id AFA24E80930; Fri, 17 Sep 2021 13:45:53 +0200 (CEST) Received: by gardel-login.0pointer.net (Postfix, from userid 1000) id 5DF5B160E58; Fri, 17 Sep 2021 13:45:53 +0200 (CEST) Date: Fri, 17 Sep 2021 13:45:53 +0200 From: Lennart Poettering To: Qu Wenruo Cc: systemd-devel@lists.freedesktop.org, U-Boot-Denx , Linux ARM Subject: Re: [systemd-devel] Systemd-boot not properly loading device tree, when loaded by U-boot (ARM64, tested on RK3399) Message-ID: References: <9e1e6e74-32a0-2f47-c530-63c42eaf4b19@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e1e6e74-32a0-2f47-c530-63c42eaf4b19@suse.com> X-Mailman-Approved-At: Fri, 17 Sep 2021 14:07:50 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fr, 17.09.21 19:25, Qu Wenruo (wqu@suse.com) wrote: > 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? Did you see this: https://github.com/systemd/systemd/pull/19417 (and maybe this: https://github.com/systemd/systemd/pull/20601) maybe that addresses your issues? Lennart -- Lennart Poettering, Berlin