From nobody Sun May 30 08:55:29 2021 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 EA273DF65FC for ; Sun, 30 May 2021 08:55:38 +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.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 4FtC1j6pSmz3w4K for ; Sun, 30 May 2021 08:55:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622364935; bh=KiGFADURygBdqPfFncQF81v3vuW7d6iyk7H7UP6nkvA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=AT2GitHBpFNnREesRMzxHacRX1WfrYAkSIydZ8ntBI4kiZzfEkeMkN4NifHPm8g98TbG38iciAq4X6HSJsOikWCTVZFlSOBZ8OP6cBca8kA2ji+y/iAkcK+NmBLu775GimEwyWZaRyueKrVLG9sYMQXIlM+2H7CReOF0vilkNvCov+DkrWHXipSP5Zcs7gbgm8qsum8G5T2HUvb5Id8TZIsn7dIoo0ybOKNGN35n2I742DDq+z7R2Gs/qNpoS4jaZw8zCtuMQIDEAW/19305elidCmMHiC4G6/mF/06Z1MfRRvLhho1EWzZKhWRxzuKj5qMNz4jpBFHLF1c8cLUV+A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622364935; bh=r4xj6OAoF2NsKhklHFnlUuUwil8Fn9mbo1et/hC2DPh=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=ZGOfaXswuR+IHGh+q0DCvniwdIUprPn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lU BM5run.NWnqmUvUG0l9ZmluxUbF6_GuJga1_WpNK5MnEQIM56QbpJmNqJPepnSdP4QhNMOpqrZ2z 9N87u8AhCWlLS5jk080KVobQcr8R8GDkQ5nyBaQB2wDp8AzE4kBTcUuwxqp8lHXZIKkJRf06mA_d Fl58SZiyGLbHl.qXfnxFUw52gjIMKdLtFUq22ZZzHceS4GVm_RXTCIZtAQ.4KH2ubBgk.qSbSa9I tZUNAi3FsSCUm0JXOi4QwvXsP6XObGykVn8ZqcqAtRItuxihVDzZBBpzM3k6mU39zhIZ33Uy5H29 8S_a63heEWDf17TMhLkYUO8MhJCmXIHSGLt1Kg1B8Rvf4rJNLd2BjIULKloGtuGuVf3gI4AK3ZHd ercC1K5aSq_j2c3XIAOZqlX0XNsbhchwH1VbFCMkxASo4NzRRrJez5xvOnd2E.0U7.OmHryBrXVR fcuHnvSRmEl7oTUZtyj1s.BU7nvPIeuH8nN5HOHOZWpTkQ9F5lLd6RrmakY7OVYigtC2dOWwvEK1 NwiHYAULrQVIHhmZ0XE4MeHiImdN3WqniwIeK06l6YjtRDrODiDnUxsS1aMAInWTjpJd8VHXBNb0 mOOsqSdk7EKYst683vHR5RWAmcpXziHOT.JOyuq_44OU1cIevc8ZUqcMV_.vvw.2bM0jZqBhKjE7 FqHX5gEIwPNXWk7jDEjZFSJk4GsO1ZifdphKZ465W5qmfjjl9Kbk2wV_WVMhop5R8IcC9.o8ZenX CAGQnhlydkGhsDf7qXIhwYsX9B_ZVbxIa66qJlYXOCr99mCI6JQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Sun, 30 May 2021 08:55:35 +0000 Received: by kubenode512.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 1a0b6f3ec7b021ac3b421b2bf683043d; Sun, 30 May 2021 08:55:31 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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.80.0.2.43\)) Subject: Re: Boot from USB on RPi4 8GB? In-Reply-To: <4F3EE8D2-649B-4522-AD5A-7C308291802F@dsllsn.net> Date: Sun, 30 May 2021 01:55:29 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <43FAEEAC-EE36-4810-88AA-FF82AFBCC128@yahoo.com> References: <4F3EE8D2-649B-4522-AD5A-7C308291802F@dsllsn.net> To: William Carson X-Mailer: Apple Mail (2.3654.80.0.2.43) X-Rspamd-Queue-Id: 4FtC1j6pSmz3w4K X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=AT2GitHB; 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 [-2.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.69.32:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.69.32:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.32:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.32:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] Reply-To: marklmi@yahoo.com From: Mark Millard via freebsd-arm X-Original-From: Mark Millard X-ThisMailContainsUnwantedMimeParts: N On 2021-May-29, at 22:17, William Carson wrote: > Hello Mark, sorry to unicast you but I keep getting rejected from = freebsd-arm@. I was hoping you could give me some guidance, as it seems = you've made quite a bit of progress in this area. >=20 > Is there any documentation or a howto in order to get FreeBSD to boot = from a USB3 disk on the RPi4 8GB? I dd'd the latest 13.0-RELEASE image = (FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img) to the USB3 SSD, but it = does not boot. (The same image works just fine when written to the = sdcard.) It looks like it's unable to locate the USB disk and then gets = stuck in a loop trying for network boot. When I get to U-Boot prompt, it = says there are no USB storage devices. If I issue "usb start", there are = still no devices. You report: > If I try "usb reset", it seems to find it, but then it displays an = error ("scanning bus xhci_pci for devices... Setup ERROR address device = command for slot 1. USB device not accepting new address = (error=3D80000000)" and then locks up. I checked that I have the latest = bootloader: (I assume no microsd card was in the microsd card slot.) I've not seen or heard of that U-Boot report before. But you made it to U-Boot so the RPi4B firmware worked for getting U-Boot from the USB3 drive. This suggests the U-Boot stage is having the problem. So I've no specific solutions, not having seen the kind of report before. I've just more generic notes and questions. [I'll note that I've had no problem with USB3 SSD booting the RPi4B's that I have access to (no microsd card involved).] One test is to use the microsd card that boots via the microsd card slot and instead put it in a USB3 microsd card reader, plug the reader into a USB3 port, and try to boot from just that. If that boots, then there would seem to be some device incompatibility with your specific USB3 "boot" drive. If, instead, booting via the reader fails, then things are rather odd. (See later notes about SOC vintages.) > # rpi-eeprom-update > BOOTLOADER: up to date > CURRENT: Thu 29 Apr 16:11:25 UTC 2021 (1619712685) > LATEST: Thu 29 Apr 16:11:25 UTC 2021 (1619712685) > RELEASE: stable (/lib/firmware/raspberrypi/bootloader/stable) > Use raspi-config to change the release. >=20 > VL805_FW: Using bootloader EEPROM > VL805: up to date > CURRENT: 000138a1 > LATEST: 000138a1 Since you got to U-Boot the RPI4B's bootloader worked. The above is what I currently use in the RPi4B's, 8 GiBYte and 4 GiByte ones. > If I dd Raspberry Pi OS (2021-05-07-raspios-buster-armhf-lite.img) to = the same disk, it boots up no problem. I'm thinking this is a = U-Boot/rpi-firmware problem, but I don't really know where to begin. FYI: if you ever want to use both a 64-bit kernel and a 64-bit user space, there are BETA's of such (Debian Buster based): https://downloads.raspberrypi.org/raspios_lite_arm64/images/ https://downloads.raspberrypi.org/raspios_arm64/images/ (I'm not claiming any gain from such for the problem at hand.) > I tried building my own image using crochet, https://wiki.freebsd.org/arm/ reports about crochet: "Alternatively, images for many boards can be built by crochet = (deprecated) or using FreeBSD's release build infrastructure." There were no commits at https://github.com/freebsd/crochet between 2019-Oct-06 and 2021-Apr-23. But there are some on 2021-Apr-24. I do my own builds based on using make commands but I do not use the release scripts for building. I build for a variety of systems. > but that didn't work either. > I'm also not sure whether I should be using sysutils/u-boot-rpi4 (I = used this) or sysutils/u-boot-rpi-arm64? Either should generally work. (But see later notes about RPi4B SOC vintages.) FreeBSD-13.0-RELEASE-arm64-aarch64-RPI.img was based on sysutils/u-boot-rpi-arm64 . I've historically built and used a variant of sysutils/u-boot-rpi4 but my history goes back before sysutils/u-boot-rpi-arm64 existed. I do not do anything were the configuration variations involved matter so I'm not familiar with the distinctions. I've used both a previous 2020.10 based U-Boot and a more recent 2021.04 based U-Boot. > After installing sysutils/rpi-firmware (1.20210303.g20210303), should = I just copy /usr/local/share/rpi-firmware/* to the boot partition and = rename config_rpi4.txt to config.txt? I assume you mean the msdos file system partition when you reference "boot partition". The msdos file system needs to contain: A) copies of /usr/local/share/rpi-firmware/* materials, using config_rpi4.txt content as the config.txt content. The copy should be recursive, to pick up the likes of the overlay/ subdirectory tree. B) a copy of an appropriate u-boot.bin ( from /usr/local/share/u-boot/u-boot-rpi-arm64/ or /usr/local/share/u-boot/u-boot-rpi4/ ). (See later notes as well.) C) A copy of /boot/loader.efi (the FreeBSD loader) placed at/as efi/boot/bootaa64.efi in teh msdos file system. I use a USB3 SSD that has small enough power requirements to not require a powered hub. (I also use a 5.1V 3.5A power supply as part of that context.) I've never tried spinning rust or higher powered USB3 media. It is unclear what the dd command details were like for the transfer to the USB3 media. So I just assume that it was okay. You may want to have an empty file named timeout in the msdos file system. It allows for extra time. (I doubt it helps, since U-Boot did load and start.) What does: # rpi-eeprom-config=20 [all] BOOT_UART=3D0 WAKE_ON_GPIO=3D1 POWER_OFF_ON_HALT=3D0 DHCP_TIMEOUT=3D45000 DHCP_REQ_TIMEOUT=3D4000 TFTP_FILE_TIMEOUT=3D30000 ENABLE_SELF_UPDATE=3D1 DISABLE_HDMI=3D0 BOOT_ORDER=3D0xf41 report in your context? (An equivalent command is "vcgencmd bootloader_config". I show example output above.) Can you see the top of the SOC? Or is there a heatsink or some such on it? (There is something there to read if it can be seen.) One possibility is that you have newer hardware that the normal U-Boot vintages that FreeBSD has used do not handle. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255080 is about someone that instead of having only: QUOTE Old Pi has the following identifying marks on the SOC package: BROADCOM 2711ZPKFSB06BOT TE1919 045-23 B3 W END QUOTE the person also had an example of a 2 GiByte: QUOTE New Pi has the following identifying marks on the SOC package: BROADCOM 2711ZPKFSB06C0T TA2105 054-05 B3 W END QUOTE The: 2711ZPKFSB06BOT vs. 2711ZPKFSB06C0T is significant. If you have a 8GiByte "C0T" RPi4B it would be the first known example. In such a case, you might want to try the u-boot referenced in Comment 15 of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255080 . It got the 2 GiByte "C0T" to boot. (But that context could not even boot via the microsd card slot with the normal media content from 13.0-RELEASE .) I do not know if the 2021.04 U-Boot that the since updated port now provides would work for this context or not. I've no access to any "C0T" RPi4B's (or any Pi400's or CM4's). There is a category of USB device that U-Boot still does not support as far as I know: those where the one device has multiple storage LUNs (instead of just one Logical Unit Number identifying storage). https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253983 is about such a context, where we eventially figured out the "multiple storage LUN" issue. But the error messages from the U-Boot of the time was not what you report. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)