From nobody Sun Jun 13 03:17:14 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 E0B3C11C9CCD for ; Sun, 13 Jun 2021 03:17:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-20.consmr.mail.gq1.yahoo.com (sonic301-20.consmr.mail.gq1.yahoo.com [98.137.64.146]) (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 4G2frw4mqBz4p2W for ; Sun, 13 Jun 2021 03:17:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1623554239; bh=8AUvgUtHhHzLOf1mHKP5xQtqJAtelUpdfReP/bpjOrs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=o43ShCVYyKFIHwVbHdZ6hTZYQwfOTVoYaqRINM8Z8gWoDKwkTw/MG5YkpVQqXsg8OuqL7yjZgv4zr6Y+5sETfZ/iKXQ3Z/WhL/fYIEXM/YIs1cPeTonJSZtnb6W0ohe1dwTQ6n3huo3qnYoL4TC3zsZojBC+sK6NnS0xfbEseSwtiC/aanqu+giGNeME6hsFu0R3L1K0fA+wIAXdKTi1XBBPNu0shN5AluXNC8PX+a9047y3OmAWxRJ79aY9gG8Y5iTwPBE/CZMjn0nKPQIPeqdM8IHO6hxCx9+dhD29PhLrZZpHxA1oLFDcfAnnJ7Zu2x32L9OAhb59b5nUs6Ztyg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1623554239; bh=GjkvqOcM6nn32+IEAqXcnrlyOk6O0AFfEvOkWJbmomS=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b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wZwNCkKBrtJf9rhVLrHQKSg k7rs1NMR0.sgZBGMhncQJ_R5Z8UIia4V6Nn0ReOGVSkXgedEspLiJ4IXlguQbO7yH7v6DyYuTwTs 6w8Z2jtY.ZkHiYpmG4nfK9bwIVBgY1jC0Xr1Fo0AisitK3UGjd2Fjug0xKX1eWU936ZuulV3GDUs fCbNESeuIyiWAqvQC9kjGRCrgMeh.bkD.7.Mj1JZCw_DV8XoG5akwsKFYK3xpEVXpmTQr2uY8MRG vbgOhBGNyUIg9G3uxEV1c3CVg_ZhYo6YLLBC37HI_8dGFVy2ibd7eu9eky2LIR_WVwZnYJQHhrRd UKxZBwwsY7INxz3wXXdOMx9q3i3zzgOa8PweUb1TylGH.pFg_jQfCDd7j1S4RR_U4rWAnainqXbc Y2mqzMTP.UzA7i.XNL80wvY_s3ND3dsGNK_FPG_qbxNc8t.YySA1AKPLLfVweUrrGbgLfM6AEnj9 C8qSTwAItwv40AUUzz_gVDdcr15IWCxW44j2n3c_aTcDVqHSz1VhXMjEosopN4W8.5JV.eVUzdYR pMW1oqH6uOUCIc9.XsS7b9pCmPVEnrtcUMePKLWXAjIxIVS6GGUGxIv7lPkNOpqZRZ8e0bkFE4qc 16kc6_vX5AaiCTbtkk90GH6fAgLmCwU0q.fpy9FjgSURbrYjh46tFhct9kg9UnWbuKcpSC9f_R7x .BrM0hprHrJndT150ZJ_Gfe0dE.RtLBDnYgo_E0ev0.uHWu6fFXiSrQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Sun, 13 Jun 2021 03:17:19 +0000 Received: by kubenode561.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a5e2a6d640c4044927bdb80fd1b7f151; Sun, 13 Jun 2021 03:17:14 +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.100.0.2.22\)) Subject: Re: Boot from USB on RPi4 8GB? [SOLVED] In-Reply-To: <0E3E9A40-2E56-4C49-A992-247408A88EFD@dsllsn.net> Date: Sat, 12 Jun 2021 20:17:14 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <4F6B79E1-B087-4606-A4B8-663FD85105BD@yahoo.com> References: <4F3EE8D2-649B-4522-AD5A-7C308291802F@dsllsn.net> <43FAEEAC-EE36-4810-88AA-FF82AFBCC128@yahoo.com> <2F58272B-BD9C-464B-9A98-BF638971BA86@dsllsn.net> <0E3E9A40-2E56-4C49-A992-247408A88EFD@dsllsn.net> To: William Carson X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Rspamd-Queue-Id: 4G2frw4mqBz4p2W X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=o43ShCVY; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; 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)[-0.999]; 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.64.146:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; ARC_NA(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.64.146:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.146:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.146: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-Jun-12, at 18:18, William Carson wrote: > . . . >>=20 >>> Sadly, it also would not boot from either of my NVMe-USB adapters. >>=20 >> Is the failing behavior identical to before? If not, what >> evidence is it now producing when trying to boot? ("would >> not boot" leaves open all possible ways of failing.) >>=20 >> You previously reported getting: >>=20 >> QUOTE >> scanning bus xhci_pci for devices... Device NOT ready >> Request Sense returned 02 04 01 >> END QUOTE >>=20 >> Someone else recently was getting that and got around >> the problem while trying 3 U-Boot extra steps. They >> are listed below and I leave in the indication of which >> happened to work in that context. The point is to >> establish a configuration setting before U-Boot tries to >> scan the USB buses looking for the storage media. >> Otherwise a "usb reset" would need to happen after >> making the configuration change. >>=20 >> QUOTE >>> Looking around on the web I see reports of the: >>>=20 >>> Request Sense returned 02 04 01 >>>=20 >>> (and the matching Device NOT ready) mean that the >>> problem will occur and that repeating usb start >>> or usb reset again until it does not report that >>> leads to things working. >>>=20 >>> But I've also seen other, more complete information >>> indicating that there is a environment setting >>> (showing an example value): >>>=20 >>> usb_ready_retry=3D5 >>>=20 >>> to set up before the usb restart (or usb start) >>> command. It deals with the issue more explicitly >>> for slow devices. >>>=20 >>> Another one is (units: msec): >>>=20 >>> usb_pgood_delay=3D10000 >>>=20 >> Presto! using editenv usb_pgood_delay prompted for input, typing = 10000 >> and hitting return set the value and the disk was found. >>=20 >> It looks like the setting can only be saved to microSD. With >> no card saveenv reports >> Saving Environment to FAT... Card did not respond to voltage select! >> Failed (1) >>=20 >>> There are also device that have problems with >>> large transfers and require extra protocol to >>> deal with transfer problems before they will >>> work again, U-Boot not doing that. >>>=20 >>> usb_max_blk=3D20 >>>=20 >>> sets a old historical value that generally >>> just works for such devices form what I read. >>>=20 >>> I see no indication that other usb commands are >>> worthwhile until one has avoided that "Request >>> Sense returned 02 04 01" message for usb reset >>> (a.k.a. usb start). >>>=20 >>> The reports of this sort of thing are not limited >>> to RPi's and go back to at least 2014. >>>=20 >>> If I understand correctly, usb_ready_retry and >>> usb_pgood_delay and usb_max_blk are part of >>> normal U-Boot builds these days. But I'm not >>> certain of that. >>=20 >> END QUOTE >=20 > Ok, so in the scenario of SN550 + GeekWorm + USB3, when I'm at the = U-Boot> prompt, I did the following: >=20 > editenv usb_pgood_delay > edit: 10000 > editenv usb_ready_retry > edit: 5 > editenv usb_max_blk > edit: 20 > usb reset ; run usb_boot >=20 > And we have a successful USB3 boot all the way to the login prompt! = Unfortunately as indicated, I could not saveenv. I'm not going to bother = any more with the Samsung NVMes due to the power issue and not having = any way to provide external, dedicated power to them. >=20 > With this success, I figured I'd try adding these env values to my = u-boot build and go back to using my crochet image. I added this patch = to sysutils/u-boot-rpi4: >=20 > # cat files/patch-include_configs_rpi.h > --- include/configs/rpi.h.orig 2021-06-12 23:20:03.061510000 -0000 > +++ include/configs/rpi.h 2021-06-12 23:20:14.131306000 -0000 > @@ -209,6 +209,9 @@ > ENV_DEVICE_SETTINGS \ > ENV_DFU_SETTINGS \ > ENV_MEM_LAYOUT_SETTINGS \ > + "usb_pgood_delay=3D10000\0" \ > + "usb_ready_retry=3D5\0" \ > + "usb_max_blk=3D20\0" \ > BOOTENV I'd be surprised if all 3 assignments were required for your specific context: likely more than what is necessary for that context. But it might not be worth bothering to explore for a more minimal combination/singleton. > I built my new image, dd'ed it to the SN550, and booted with the = GeekWorm + USB3. I aborted the autoboot and did a printenv to confirm = the environment variables were set. They were. I pulled the power and = did a fresh boot, and we booted successfully all the way to the FreeBSD = login prompt! Problem solved indeed. Cool. > Thank you so much for all of your help and patience, Mark. I wonder if = maybe those defaults should be added to the u-boot-rpi4 or = u-boot-rpi-arm64 ports? (I won't pretend to know how this might impact = other users.) >=20 > Oh, also, I dropped usb_pgood_delay down to 2000, which seemed common = for other boards and worked just fine: Again: Cool. > -boot-2021.04/configs/teres_i_defconfig:CONFIG_PREBOOT=3D"setenv = usb_pgood_delay 2000; usb start" > u-boot-2021.04/include/configs/alt.h: "usb_pgood_delay=3D2000\0" > u-boot-2021.04/include/configs/aristainetos2.h: = "usb_pgood_delay=3D2000\0" \ > u-boot-2021.04/include/configs/beacon-rzg2m.h: = "usb_pgood_delay=3D2000\0" \ > u-boot-2021.04/include/configs/gw_ventana.h: = "usb_pgood_delay=3D2000\0" \ > u-boot-2021.04/include/configs/minnowmax.h: = "usb_pgood_delay=3D40\0" > u-boot-2021.04/include/configs/nitrogen6x.h: = "usb_pgood_delay=3D2000\0" \ > . . . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)