From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 22 Nov 2023 15:24:09 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r5o9B-004SMZ-02 for lore@lore.pengutronix.de; Wed, 22 Nov 2023 15:24:09 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r5o9B-0004Hh-4o; Wed, 22 Nov 2023 15:24:09 +0100 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r5o9A-0004HT-1Z; Wed, 22 Nov 2023 15:24:08 +0100 Message-ID: <9afb1d8a-f90d-7d74-781d-c33f6b7a2efb@pengutronix.de> Date: Wed, 22 Nov 2023 15:24:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Roland Hieber References: <20231020090519.3320460-1-rhi@pengutronix.de> <20231020090519.3320460-3-rhi@pengutronix.de> <20231122141711.iudghqftvkpp7wf2@pengutronix.de> From: Ahmad Fatoum In-Reply-To: <20231122141711.iudghqftvkpp7wf2@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [DistroKit] =?utf-8?q?=5BPATCH_v3_3/6=5D_v7a=3A_barebox=3A_pass_?= =?utf-8?q?root=3DmmcblkXpN_instead_of_root=3DPARTUUID=3D=E2=80=A6_to_kern?= =?utf-8?q?el?= X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hello Roland, On 22.11.23 15:17, Roland Hieber wrote: > On Wed, Nov 22, 2023 at 02:27:00PM +0100, Ahmad Fatoum wrote: >> Hello Roland, >> >> On 20.10.23 11:05, Roland Hieber wrote: >>> Kernels prior to v5.10-rc1 could not ensure deterministic ordering for >>> MMC devices. For this reason, the default 'append-root' behaviour of >>> barebox for MMC block devices is to append a 'root=PARTUUID=XYZ' option >>> to the kernel command line. The PARTUUID is derived from the partition >>> table and is expected to be unique system-wide. This is however >>> susceptible to breakage if the exact same image is written to different >>> boot media in the system, e.g. SD and eMMC, so the PARTUUID will no >>> longer uniquely refer to a single partition. >>> >>> Newer kernel versions honor the numbering used for 'mmc' aliases, >>> which makes 'root=mmcblkXpN' deterministic as long as barebox and >>> kernel aliases are identical. Since we're using kernel 6.4, enable this >>> option in barebox. >> >> As you mention this feature requires that barebox and kernel aliases >> are identical. At least for the STM32MP157C-EV1, this is not the case >> as the kernel device tree has no aliases at all. > > Oh. How come? Can we patch the kernel DT to make them the same? Having aliases for everything is uncommon outside i.MX. I am in favor of adding aliases upstream to all DTs we support, but that would take a while. > >> Can you send a revert? > > I can send a revert, but I don't like the implications. Incidentally, > this topic was discussed in length last week on a systemd pull request > of mine [1], with the TL;DR that filesystem and partition UUIDs should > not generally be considered unique. While that might be the case in the > DistroKit test runs, we also have some boards with eMMCs that can hold > the same image as the SD cards that we boot from. I suspect this might > come back to bite us some time in the future. I don't mind restoring CONFIG_MMCBLKDEV_ROOTARG for devices whose aliases have been vetted to be identical between barebox and Linux, but right now, this breaks boot on at least one board. Cheers, Ahmad > > [1]: https://github.com/systemd/systemd/pull/29219#issuecomment-1812226959 > > - Roland > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |