From owner-freebsd-arm@freebsd.org Mon Apr 20 22:32:39 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C90BA2B2027 for ; Mon, 20 Apr 2020 22:32:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-8.consmr.mail.gq1.yahoo.com (sonic307-8.consmr.mail.gq1.yahoo.com [98.137.64.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 495hKL3cBsz4FY9 for ; Mon, 20 Apr 2020 22:32:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 082xhdkVM1n8HOmJSb5rUVWloJdnjDl9eU8m7Txe.TfL3xQqMxAiRsZNHxmVOIv EboTcZjwut5ix86.nzT9u3nfW1AoeptQTw5AF50RjG3L2UR0Q3TAhbEnK3Z2kk5zSyKo9ztGV7jF 5WyVbDoV2UGM_qf.iJeaS8T8xwlhq_KdtXxc9zV.7mmLHC7Fzi9dpUfEnFXSaZL7Cj2MFin_n4MP zbfrgLo5XbxkLS6YWbWRqAs_jkK9KBrX5ZMLJ.dZNo4BmJDjcDc_LbSq0QzpaESMtEqvDpktdB49 _n53moOuH562nsLe2Gf1Cc_pea82R.E8OY7fFy6llxe0wMfoUNcP1lcRrgcj5ztDh3tiBnANpvEy KRl_4ri8Rlmssz8BsuUTNY.lY9RRfNHTgr_9xC884Rj09iSuEU3tQxE633VmRA5rF_OsSlduoN.i zNbZRxqEyomC8JR8Ijt8pu9qIPRxPNVpMHkLo3jt3JN2Uw9RQKb1anBGjgvlmBuEqXvhXivvX7Pn 9d7GQAK7FPSPFJE1aTLoF7Nfx3TvhZ1NaiGVqXNP_YgPH7WQMLfD671Uu_XVBjdvrkg1YNNLNIt1 Ctu21mjEAwBm7mTaRQ4oulFHpT5nNTAQ0jbIsMVgKTOkrLm4Jbj2Tgguzc_P29zDhKGVCX3M0wJb 5HXSvudnVjozCRUASYnvdMcOkkId1zosRek3QeoM4_43bMYw9n8cqYUywDZufRCwLDROhjDs1MEL 4M1fEwEsRf8lCpJniFxzC.3kr3R_r.hrMy0Fwlp8pbL15Bz9yshqq8fNfS7Ep1oewr3J.1ImRMTC e3.BDWmDDeZXnorNraBEER8IDdjdoF1hnepz5NQ6Czui60ozLbYvos.IrnqADwSVvXQ92yZYF7NY dNW7o3HRNuxXbG76KF3_5ohq7YkYDdgJyXkCqdiTeYIm8CGQiSq4iPwAe_wJISHDx37q2x5U4Hw7 xBZQzU0y63YMNxHLKwR2KzCIuxIEm5zE1DY0ySbfJeJ7nf4_N05bY2CEy6h.Pp_DvWYHliBKEkDS BnbCspwAbiojRPC1M8azHXcO1Zuy0zjKPwgaWXTyBec1y8DwHds9bS5uBsVrn.ZFinJFuBRCAbM7 e6K9NkUndnNFL8lSMqLbm.d9lraucfBk860inl9Rl4bA.uqZZsFheeNRgS28qcS39yjiBftxamTr 7bIg83A9R8rFMYKFfmvv1QQdqLqVrw_1ypX5GfJIC2BX1iYloBNGYjXMHcA9vFYofKs.0McLeaXU 50Fq5UgkAvPoMWZ1GhVRJa5l7WNZeDuydRJkBAwbyuk3x_gCU887ZCHVswyUdt5_Xg9t8O5dWF1N rYHKYNH0y3NtVg.Ey9NdbkYd5mywx.A7S4tz59sztt1paHQ1PhBURbcfGLJFaJqtq7dGY0fM0Mbb 0TkwqKJmwbBKiN1N4PDVqVX0oaXDSqu_nRWdSiBtWbW_Uw9UWysjP8s9WP26I Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Mon, 20 Apr 2020 22:32:36 +0000 Received: by smtp407.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9e90aea6acc560efeadf58d1911a62fa; Mon, 20 Apr 2020 22:32:33 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Booting from USB on RPi3 From: Mark Millard In-Reply-To: <20200420220756.GC94315@www.zefox.net> Date: Mon, 20 Apr 2020 15:32:31 -0700 Cc: Jonathan Chen , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <39CD6D0A-AF9B-4E5E-95C9-11E343F02082@yahoo.com> References: <20200420172512.GA94315@www.zefox.net> <20200420220756.GC94315@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 495hKL3cBsz4FY9 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.79)[-0.793,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.98)[-0.977,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; RCVD_IN_DNSWL_NONE(0.00)[32.64.137.98.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (5.20), ipnet: 98.137.64.0/21(0.83), asn: 36647(0.67), country: US(-0.05)]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:32:39 -0000 On 2020-Apr-20, at 15:07, bob prohaska wrote: > On Tue, Apr 21, 2020 at 07:31:40AM +1200, Jonathan Chen wrote: >>=20 >> This is how I got my RPI3 running 12-STABLE to boot off USB. It does >> require a microSD card with u-boot, and the loader.efi built sometime >> after Sep 2019 though. However, my root-filesystem (and swap) lives = on >> an external USB drive. >>=20 >> 1. Copy the loader.efi to EFI/BOOT/bootaa64.efi >>=20 >> 2. Create a text file: EFI/FreeBSD/loader.env, this file contains a >> one-line directive to loader(8) on where to find a kernel to boot. >> Mine contains: >> rootdev=3Ddisk1p1: >> The disk entry should be the same as what loader(8) expects with your >> USB disk setup. Mine has a GPT partitioning scheme, with the root-fs >> on partition-1. >>=20 >> 3. All /etc/fstab entries should use symbolic name entries instead of = da0*. eg: >> 7:27am# cat /etc/fstab >> # Device Mountpoint FStype Options Dump = Pass# >> /dev/gpt/topaz-root / ufs rw 1 = 1 >> /dev/gpt/topaz-swap none swap sw 0 = 0 >>=20 >> Hope this helps. >> --=20 >=20 > Where is the kernel loading from? I gather it's been long-time > practice to load the kernel from microSD and then mount the USB > device as root; it that what you're doing? It appears that using > usbboot (correctly!) would eliminate that extra step. Looks to me like the rootdev assignment is controlling where the kernel is loaded from but the FreeBSD loader and its loader.env still are found on the microsd card and used from there. So if "extra step" means any use of a miscrosd card, then it would not meet what appear to be your criteria. But if you are okay with only needing a msdos file system based microsd card with appropriate materials added to the msdos file system (no freebsd partitions required), then it might be okay. I'm not sure if armv7's without an EFI-like context have a msdos file system path analogous to EFI/FreeBSD/loader.env to allow the same sort of rootdev-assignment technique or not. If your context is an example of: QUOTE in situations where a Pi 3 fails to boot (the latest bootcode.bin = includes additional bugfixes for the Pi 3B, compared to the boot code = burned into the BCM2837A0) END QUOTE then I'm not sure that you can avoid the microsd card being involved. But that would be testable in a normal RPi OS context: If you can boot Raspbian via USB-only in the normal USB-only manor, then the problem is elsewhere for doing so for FreeBSD. Going the other way: If you can not boot Raspbian via USB-only, then the microsd card is likely going to be involved for any OS for that specific RPi3. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)