From nobody Sat Dec 18 23:56:04 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 7BE7B18E5E6F for ; Sat, 18 Dec 2021 23:56:13 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JGjRc4Tp8z4WKx for ; Sat, 18 Dec 2021 23:56:12 +0000 (UTC) (envelope-from mafsys1234@gmail.com) Received: by mail-pf1-x432.google.com with SMTP id k64so5381111pfd.11 for ; Sat, 18 Dec 2021 15:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=tN9Xv7vfsHxqOOajFmmKsfsVoYpcktPWY9lNXKSG1mo=; b=eWncEGU2oVS4amIQZ6fpCGCrppIX31jbT5N5ghBE/XEpLXQlbVZCep3Qc9kUzCv7+b mQJdNQtc074S+mcfafVXp20E3t4m0ZaH/PDU+3BqBhmL3oL2ELkhN1u8TxSHEnwcVb3U M0LbsXbteoOofyAhR2wqfYiJ9HdXrrpDmOFHtaJOTKgADVHLUZZZqtZcMFCgb+0GPNVJ 4TKS43WUUcYKsOckakrqzoC21IXJvcZqqRQeNud+4dX2i6bn8SVzbAkCenJ/Gh9CLoEW /MCPs4GATA4qs+IYVl0mBfnb8QT1Pp3FMWFpjoLNrVqp1OFX9h6XMQpiymWAmn04c8K6 rA3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tN9Xv7vfsHxqOOajFmmKsfsVoYpcktPWY9lNXKSG1mo=; b=jYvQ1xrznSI1yyoLdQnexNG4D/ipcXSyYxw0aP7+W+xwYbUoaekbJqxgOvPxavgBtr SvqRY+pl8E1DVNApIkkZoTV2o3SqA3TxeaUNqVCMv7w45/45bIaZeChuiCT+xj6bzwvY WZ92ekQjeceTjok4wcc15YNuIheR81Tmv/TJrNxkoS2/K11ZOIVY/NchLErUzafCex4k GHbtcNhdsfc9loo628FFr5cR22V+5bYtNmw6+rrEeaAc1PNf1ilIQOJcyZSAkcTTnX30 1+nNxx3Rh6aULXVh7kWRncS3gzjI4llhkQLRiAfgLbAjcBKX9pRND9HHvdAzk2Rt99GC 0FrQ== X-Gm-Message-State: AOAM533Wr1RwK4zGCzikHMmEhiPbeWbUM63el2kE5/+QMIxowQZf/UUj LChZZtYCXC9TiVaN2cniqcC/z4/xmp86IQ== X-Google-Smtp-Source: ABdhPJyo3Q+++dkAvx250kjOLCOuf4+zqUoJxzC2YMK9BeaJIz1OdYafdfpHKs2DFjptYKTOCJGiIg== X-Received: by 2002:a63:dc0b:: with SMTP id s11mr8888722pgg.272.1639871771529; Sat, 18 Dec 2021 15:56:11 -0800 (PST) Received: from [192.168.1.10] ([115.69.53.183]) by smtp.gmail.com with ESMTPSA id m10sm11982511pgv.75.2021.12.18.15.56.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Dec 2021 15:56:11 -0800 (PST) Subject: Re: Dealing with slow USB disks, was: Re: Saving environment variables in u-boot To: freebsd-arm@freebsd.org References: <20211216180704.GA4173@www.zefox.net> <214132DD-A095-4349-BB81-B79CB8CF6B0C@yahoo.com> <20211217013613.GA4452@www.zefox.net> <20211218005946.GA7670@www.zefox.net> <5C44D0E6-2FF1-4EEB-B21A-83333D6FCF46@yahoo.com> <9D416106-660F-40BB-98D2-1354B53D2FEF@yahoo.com> <20211218223543.GA9484@www.zefox.net> From: MJ Message-ID: <6105a8a6-e760-2183-72fd-92e5a60aa8df@gmail.com> Date: Sun, 19 Dec 2021 10:56:04 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 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 In-Reply-To: <20211218223543.GA9484@www.zefox.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-AU Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4JGjRc4Tp8z4WKx X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=eWncEGU2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mafsys1234@gmail.com designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=mafsys1234@gmail.com X-Spamd-Result: default: False [-1.98 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.999]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::432:from]; NEURAL_HAM_SHORT(-0.98)[-0.976]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: N On 19/12/2021 9:35 am, bob prohaska wrote: > [subject modified to reflect changed emphasis, much snippage] > > On Fri, Dec 17, 2021 at 09:20:36PM -0800, Mark Millard wrote: >>>> Until "1 Storage Device(s) found" is automatic this >>>> later-stage material is too late to yet be relevant >>>> or to have an appropriate context. >>>> >>>> I'm staying focused on getting the "1 Storage Device(s) >>>> found" to be automatic. Absent that you are likely stuck >>>> with doing something similar to be Rock64 e.MMC way of >>>> working --where /boot/loader.conf and /boot/kernel/kernel >>>> and /etc/hostid for early activity is from a UFS >>>> partition on the microsd card. > > Agreed entirely. > >>>>>> It is not so much that these would be sufficient, >>>>>> but they do establish some context before U-Boot >>>>>> is even active. It could be important to >>>>>> understand that context. (Unsure at this point.) >>>>>> >>>>>> >>>>>>>> But that was for the u-boot-rpi4 or u-boot-rpi-arm64 ports. >>>>>>>> (They also later mentioned using "usb_pgood_delay=2000\0" >>>>>>>> instead, a figure they found in a bunch of configrations.) >>>>>>>> > > It does appear that usb_pgood_delay is in milliseconds, not seconds > as I initially thought. At present I don't think it helps. > > >>>> >>>> This gets back into the use of a config.txt with a >>>> bootcode_delay assignment also being in the MSDOSFS >>>> on the microsd card and the file timeout also being >>>> in the MSDOSFS on the microsd card. Only if those >>>> delays together can lead to the USB drive being >>>> accessible will it get any farther. >>>> >>>> I'd suggest such experiments. The vintage of bootcode.bin >>>> matters as I understand. >>>> >> >> One point for testing that could be a simplification >> initially: booting just from a microsd card with the >> USB drive powered and attached already, even though >> the USB drive is not boot-media for this kind of test. >> > > So far all experiments have been done with the USB drive > on a powered hub which is kept on. Until the USB drive is > discovered it's hard to imagine how what's on the disk can > matter, no? My suggestion: Have you tried directly connecting the USB into the RPI4? I've had previous run-ins with RPI3B and powered hubs where it seems to be very slow to enumerate the hub and therefore the devices attached. Having said that, I have a RPI2 with 13R and two USB flash drives attached and it's a pure lottery for one of them to be recognized at boot (always the same one, an old transcend 16GB). Mark