From nobody Tue Jul 12 05:16:44 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 581E117FAE39 for ; Tue, 12 Jul 2022 05:16:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-8.consmr.mail.gq1.yahoo.com (sonic316-8.consmr.mail.gq1.yahoo.com [98.137.69.32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lhprw0DYsz3sTZ for ; Tue, 12 Jul 2022 05:16:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657603006; bh=DJcV/XnsvCYbI1z5caxNI95w7KaYQH7zpEHTni5UHns=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=py0iWxcxl+KoJWrSG8hsxsGR+9kCt8GIhdsjiD1CWDXtz9U98c4mOTZdo+qJWdlbSmgRhdqFp4+7Z0xkl52QFswmkG3AQYMxZPIOD7STHr0RGS0ol6Jctxd4pjj2faFs5ZJ98+gvnIdlJe+j7/HUZebTtgt5wwxcJCp6qwK+Jfj27iDcxEZItL40Im78/ubzHFzeBRXQN9nmGLDsVaYCoOoXH5saEcQNO8KxWR+wetHIkGD1ES9zR73hogHfc2VOuIaPApPKYRd6bzCjRxool2nzv7lAnU5ugEHCOgKSrbrKZoHnflFWy8VyO362yboBtIKebbDFI0Z5iiV+63JRHA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657603006; bh=AFS9nIdlnHbtprXrxPM4qGpBfMYcofSzwavgSgQAsOV=; h=X-Sonic-MF:From:Subject:Date:To:From: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OvKeC9Pn1s4yxIvTEpFTfwjsXJJsVaJ SRSnXp_D9QH3Hm22z3XekphcIAl0O74l3rGxWKLyGLAtaj3p6kaqeIn99diN_7ichdahgghxSQ8G 5lcJ9RPfh3KpPnZcriakM1uXciC.bd0O8cYc.RFUGkr0pmNF07FleRYpyjgcpDTEwT19hOkwbCvN 1lFKfhfWKasMkSVL6nlQk9Hk7tn7Qll0FIy2vD3Ex8NpoWkRLretRfsuNacz5G082PPzVoNv_K_q otR9bUw16.11kdc3.sXHKlch1TumAZzqvKZH4VFx8TxEqi6vBUP.UiUWVZj04MEZKyrAEO7cjqe5 mvRZYJdY8O2E20xmX5geWI8Qp24m7isRh2lk4RnnvtOhAdG.M9B7LA7KLcDGYDzh9CkFuJ8NiaFm kXypT46BIUQXEPcy2al.YZaOsHIfiB709XdsUp79Jwfq9fMrYhGE0ZbCYknA1Z_7EvAr1ewPOz70 EpHDjzPAaHf8IXjnv92kY6u97zNRZk3sGrtAlZJKuOWuorShWIgX7SS0Iudj0LBz6F0Gl3n8yIKo kiA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Tue, 12 Jul 2022 05:16:46 +0000 Received: by hermes--production-gq1-56bb98dbc7-b6h6x (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 43538254ff072f2eb55fb66c09abfec9; Tue, 12 Jul 2022 05:16:44 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: path for overlays Message-Id: Date: Mon, 11 Jul 2022 22:16:44 -0700 Cc: freebsd-arm To: nick@i11.co X-Mailer: Apple Mail (2.3654.120.0.1.13) References: X-Rspamd-Queue-Id: 4Lhprw0DYsz3sTZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=py0iWxcx; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.37 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.87)[-0.873]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.32:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.32:from] X-ThisMailContainsUnwantedMimeParts: N Nick Kostyria wrote on Date: Tue, 12 Jul 2022 03:27:25 UTC : > On Mon, 11 Jul 2022 00:18:59 -0300 > "Dr. Rolf Jansen" wrote: >=20 >=20 > >=20 > > Anyway, for enabling I2C5 (we may choose from I2C3, I2C4, I2C5 and = I2C6) on a Raspberry Pi 4, we do: > >=20 > > # fetch = https://github.com/raspberrypi/linux/blob/rpi-5.15.y/arch/arm/boot/dts/ove= rlays/i2c5-overlay.dts > > # dtc -I dts -O dtb -b0 -@ -o /boot/msdos/overlays/i2c5.dtbo = i2c5-overlay.dts > >=20 > > Then we add the following 2 lines to /boot/msdos/config.txt: > >=20 > > gpio=3D12,13=3Da5 > > dtoverlay=3Di2c5,pins_12_13 > >=20 >=20 > Hello. >=20 > I see you use /boot/msdos/overlays/ for overlays. > I have a question for a long time and I can't find an answer. >=20 > What is the difference between /boot/msdos/overlays/ and = /boot/dtb/overlays/ (fdt_overlays in /boot/loader.conf). [I've written these notes to presume a RPi* context based on U-Boot, not EDK2 UEFI/ACPI or the like, and not for other platforms.] Some of this is just convention, and these notes are from memory, but: A) If the partitioning is MBR, /boot/msdos is a mount point where the msdosfs is mounted by FreeBSD. The RPi* firmware has access to the msdosfs (MS-DOS file system). The FreeBSD loader gets a copy in the msdosfs (that is started by U-Boot, which in turn is started by the RPi* firmware) but the rest of FreeBSD does not go in the msdosfs. B) If the partitioning is GPT /boot/efi is a mount point where the msdosfs is mounted by FreeBSD. The RPi* firmware has access to the msdosfs (MS-DOS file system). The FreeBSD loader gets a copy in the msdosfs (that is started by U-Boot, which in turn is started by the RPi* firmware) but the rest of FreeBSD does not go in the msdosfs. C) /boot/dtb is not used as such a mount point. It is part of the UFS (or ZFS) file system. The RPi* firmware and U-Boot do not have access into the UFS or ZFS file systems. This is a reason why a copy of an appropriate FreeBSD loader is put on the msdosfs. The FreeBSD loader, in turn, can access UFS or ZFS. (A)/(B) are used for the dtb files so that the RPi* firmware loads and sets up the dtb material to be in the DeviceTree, well before FreeBSD is involved. The RPi* firmware and U-Boot hand over a version of that DeviceTree to the FreeBSD loader and, from there the FreeBSD kernel sees it. (C) would be for only the FreeBSD kernel seeing/using the dtb. FreeBSD does not have full control of the RPi* and some types of overlays have to be processed by the RPi* firmware, if I understand right. For RPi*'s /boot/dtb/ use is likely rare. Do not presume all the content of these notes apply to other types of FreeBSD platforms. > What is more correct? > What should be used? >=20 > /boot/msdos/overlays/ or /boot/dtb/overlays/ > /boot/msdos/config.txt or /boot/loader.conf config.txt is for the RPi* firmware use, not FreeBSD's direct use. loader.conf is for FreeBSD's direct use, not RPi* firmware use (nor U-Boot). Nothing says that the notations used in the two files would be compatible. Moving text correct for one file to the other (but unchanged) is not likely to work. In this case, the config.txt text "dtoverlay=3Di2c5" is tied to the file placement (as seen via FreeBSD's /boot/msdos mount point): /boot/msdos/overlays/i2c5.dtbo and "pins_12_13" is a configuration parameter of some sort. The "gpio=3D12,13=3Da5" is also defined for and handled by the RPi* firmware, not directly by FreeBSD. The lack of a /boot/msdosfs/ prefix (or, possibly, /boot/efi/ prefix) is a clue that loader.conf is just for FreeBSD's use. I'll note that the RPi* firmware accesses the msdosfs long before FreeBSD starts. The FreeBSD mount point use (for access to the msdosfs from FreeBSD) happens later. =3D=3D=3D Mark Millard marklmi at yahoo.com