Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0EA6A84D80 for ; Fri, 20 Oct 2023 16:13:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id N0QDexYCERg6 for ; Fri, 20 Oct 2023 16:13:04 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 6475085A4E for ; Fri, 20 Oct 2023 16:13:04 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5D326FADC; Fri, 20 Oct 2023 16:13:04 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 20 Oct 2023 16:13:04 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-10] src/sys/arch/evbarm To: source-changes@NetBSD.org Approved: for-source-only Reply-To: martin@netbsd.org X-Mailer: log_accum Message-Id: <20231020161304.5D326FADC@cvs.NetBSD.org> Module Name: src Committed By: martin Date: Fri Oct 20 16:13:04 UTC 2023 Modified Files: src/sys/arch/evbarm/evbarm [netbsd-10]: autoconf.c src/sys/arch/evbarm/fdt [netbsd-10]: fdt_machdep.c src/sys/arch/evbarm/include [netbsd-10]: types.h Log Message: Pull up following revision(s) (requested by mrg in ticket #431): sys/arch/evbarm/evbarm/autoconf.c: revision 1.24 sys/arch/evbarm/include/types.h: revision 1.16 sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.100 sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.101 fix root detection on evbarm when raid is involved there are several problems solved in this change: - - lots of work was re-done when we already have determined the device booted from, so several new early returns introduced if booted_device has been set - - due to the lack of cpu_bootconf(), raidframe softroot would override "root=xxx" on the boot command line (note that platforms that use eg, device_register() to detect the boot device are not affected by this issue as they find the boot device much earlier.) - - in the new cpu_bootconf(), switch the order of the platform boot-config with the set_root_device() call. this avoids a problem where "root=xxx" is checked after automated methods, and is thus ignored. - - in fdt_detect_root_device(), remove the code to add "root=xxx"" string to the boot_args[] that would be later parsed by the set_root_device() call, and simply set booted_device and, for mbr installs, booted_partition directly. also, for any successful call, perform an early return. - - define __HAVE_CPU_BOOTCONF so early boot calls cpu_bootconf(). tested on: - - rockpro64 booting from emmc, sata (big, and little endian) - - rockpro64 loading kernel from msdos partition - - rockpro64 booting from network (fails to auto-detect, with or without this change) - - quartz64 booting from nvme - - lx2k booting from nvme Locate wedges as boot device and also match a partition GUID. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.18.1 src/sys/arch/evbarm/evbarm/autoconf.c cvs rdiff -u -r1.99 -r1.99.2.1 src/sys/arch/evbarm/fdt/fdt_machdep.c cvs rdiff -u -r1.15 -r1.15.16.1 src/sys/arch/evbarm/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.