From owner-freebsd-arm@freebsd.org Mon Apr 20 17:25:19 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 0962F2A8978 for ; Mon, 20 Apr 2020 17:25:19 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 495YVj6Bt4z3DPS for ; Mon, 20 Apr 2020 17:25:17 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 03KHPDeb094535 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 20 Apr 2020 10:25:13 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 03KHPD0D094534; Mon, 20 Apr 2020 10:25:13 -0700 (PDT) (envelope-from fbsd) Date: Mon, 20 Apr 2020 10:25:12 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Re: Booting from USB on RPi3 Message-ID: <20200420172512.GA94315@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 495YVj6Bt4z3DPS X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [4.80 / 15.00]; ARC_NA(0.00)[]; FAKE_REPLY(1.00)[]; WWW_DOT_DOMAIN(0.50)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(0.05)[ip: (0.23), ipnet: 50.1.16.0/20(0.12), asn: 7065(-0.03), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.91)[0.910,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.94)[0.940,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MID_RHS_WWW(0.50)[]; RCVD_COUNT_TWO(0.00)[2] 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 17:25:19 -0000 Back on October 24, 2019 Mason Loring Bliss mason at blisses.org wrote in part: ----------begin excerpt---------- I'm struggling with how to boot FreeBSD 12 directly from a hard drive on an RPi3b+, with no MMC card. It happens automatically with a Raspbian image, and I got Devuan to boot this way by changing the right pointers in config.txt, but I'm struggling to figure out how to do it on FreeBSD. I'm not sure what dictates the boot behaviour. ----------end excerpt--------- The complete post is at: https://lists.freebsd.org/pipermail/freebsd-arm/2019-October/020608.html Far as I can tell there were no replies. In the meantime I've become interested (again) in trying to boot a Pi3B from a mechanical hard drive by using the "boot from USB" OTP feature on my Pi3B v.1.2. The feature has been set, according to the instructions at https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md but when the microSD card is removed nothing happens (no rainbow screen) on power-up. Presumably my Pi3B is too old. At some point the Raspberry Pi foundation introduced a new bootcode.bin as described in https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md which was intended to give older Pi2 and Pi3 models the ability to boot from USB at the price of keeping a minimal microSD card in place. All that's required on the card is the new version of bootcode.bin plus an empty file named timeout to give a mechanical drive time to spin up. Has anybody tried it? I wouldn't expect it to work "out of the box", but perhaps with some adjustments. In the meantime, I've gotten u-boot to the point of issuing a prompt and recognizing a usbboot command, but can't seem to get the syntax right. A usb reset command produces resetting USB... Bus usb@7e980000: scanning bus usb@7e980000 for devices... 8 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found and U-Boot> help usbboot usbboot - boot from USB device Usage: usbboot loadAddr dev:part The only command that doesn't cause a syntax error is U-Boot> usbboot 7e980000 0:1 Loading from usb device 0, partition 1: Name: usbda1 Type: U-Boot "Synchronous Abort" handler, esr 0x96000045 elr: 00000000000cd2f8 lr : 00000000000aef5c (reloc) elr: 000000003b3a92f8 lr : 000000003b38af5c x0 : 000000007e980000 x1 : 000000003af6d900 x2 : 0000000000000200 x3 : 0000000000000000 x4 : 0000000000000200 x5 : 0000000000000040 x6 : 2e34445342903ceb x7 : 000000003af7d9c1 x8 : 0000000000010041 x9 : 0000000000000008 x10: 0000000000000006 x11: 000000003af6b2e0 x12: 0000000000000820 x13: 0000000000000001 x14: 0000000000000001 x15: 00000000ffffffff x16: 0000000000000001 x17: 000000000000004b x18: 000000003af57de8 x19: 0000000000000001 x20: 000000003af6d900 x21: 0000000000000200 x22: 0000000000000200 x23: 0000000000000000 x24: 000000003af7db90 x25: 0000000000000000 x26: 0000000000000000 x27: 0000000000000200 x28: 000000003f980000 x29: 000000003af4ff60 Resetting CPU .. That seems to suggest I'm using the wrong address or address format. So far, I've not been able to find any docs beyond the help feature at the u-boot prompt. The usb drive is recognized as /dev/da0 when the machine boots 12.1-stable and has a 12.1 stable image on it. Thanks for reading, and any guidance! bob prohaska