From nobody Mon Jul 12 09:50:10 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 4132D12415E9 for ; Mon, 12 Jul 2021 09:50:23 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GNfC26qb6z4h5N for ; Mon, 12 Jul 2021 09:50:22 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1626083415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H9LOATu7yU2t8ttZvyqSuDFUrzozlBUA1Wd2I3XJgL4=; b=g2QVRAQTP9OW0YSozD7SmVnsPc1nX/Oja0TkhkExLrPVRrI56cXJLH30OmGvKCXgqwGro0 +H5K361jIshP5u6FtZJXwwb6hs4p9+hn5dHqD4YTGkxsubpyEka8y6qUUxzuvn7lssAUgI ptwRfo60JMboLsvppin9Dom8Trc9+xs= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id b0b3a6fa (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 12 Jul 2021 09:50:15 +0000 (UTC) Date: Mon, 12 Jul 2021 11:50:10 +0200 From: Emmanuel Vadot To: "Herbert J. Skuhra" Cc: freebsd-arm@freebsd.org Subject: Re: git: 1dec3639fd0c - main - sysutils/u-boot: Update to 2021.07 Message-Id: <20210712115010.a405a8f5e313ec75142fa544@bidouilliste.com> In-Reply-To: <87mtqsn0we.wl-herbert@gojira.at> References: <202107071618.167GIvXd048504@gitrepo.freebsd.org> <874kd3390q.wl-herbert@gojira.at> <87o8b8n1rf.wl-herbert@gojira.at> <87mtqsn0we.wl-herbert@gojira.at> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4GNfC26qb6z4h5N X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Herbert, Took the last mail of the thread, it was easier. On Sun, 11 Jul 2021 20:47:13 +0200 "Herbert J. Skuhra" wrote: > On Sun, 11 Jul 2021 20:28:36 +0200, "Herbert J. Skuhra" wrote: > > > > On Fri, 09 Jul 2021 15:35:17 +0200, "Herbert J. Skuhra" wrote: > > > > > > With u-boot 2021.07 two of my RPis no longer boot: > > > > > > Raspberry Pi 3 Model B V1.2: mmc not detected; tries to boot over the network. > > > > With u-boot 2021.04 I get: > > > > > mmc list > > mmc@7e300000: 0 (SD) > > > > > mmc part > > > > Partition Map for MMC device 0 -- Partition Type: DOS > > > > Part Start Sector Num Sectors UUID Type > > 1 2048 102400 5fd0f4e4-01 0c Boot > > 2 104448 124631040 5fd0f4e4-02 a5 > > > > > mmcinfo > > Device: mmc@7e300000 > > Manufacturer ID: 3 > > OEM: 5344 > > Name: SC64G > > Bus Speed: 25000000 > > Mode: MMC legacy > > Rd Block Len: 512 > > SD version 3.0 > > High Capacity: Yes > > Capacity: 59.5 GiB > > Bus Width: 4-bit > > Erase Group Size: 512 Bytes > > > > But with u-boot 2021.07 (starting with rc1) I get: > > > > > mmc list > > mmc@7e300000: 2 (SD) > > > > > mmc part > > MMC Device 0 not found > > no mmc device at slot 0 > > > > > mmc info > > MMC Device 0 not found > > no mmc device at slot 0 > > > > I have to run > > > > > mmc dev 2 > > > > Afterwards 'mmc part' and 'mmc info' show the above output. > > But how do I boot from mmc dev 2? And how can I change this > > permanently? > > My RPi3 boots if I run: > > U-Boot> setenv boot_targets 'mmc2' > U-Boot> setenv bootcmd_mmc2 'devnum=2; run mmc_boot' > U-Boot> boot > > -- > Herbert > So I took the latest snapshot image available on the ftp (FreeBSD-14.0-CURRENT-arm-armv7-GENERICSD-20210701-c5f4772c66d-247671.img) and dd u-boot for the nanopi_m1plus on it. The snapshot already have the u-boot for BeagleBone and RPI* No problems on the BBB No problems on the NanoPi M1Plus I do see the hang on the RPI2 though (RPI2 v1.1) Commit 60a376b09332a0cf061b3 in u-boot removes CONFIG_EFI_GRUB_ARM32_WORKAROUND from the RPI2 defconfig but we do re-add it in the ports tree (see https://cgit.freebsd.org/ports/tree/sysutils/u-boot-master/Makefile#n215 and https://cgit.freebsd.org/ports/tree/sysutils/u-boot-master/files/FreeBSD_Fragment#n2) So if you bisected from u-boot tree directly and didn't use a fragment that's normal to get this commit as the first bad one. Note that the images don't have a boot.scr (u-boot script) for a long time now, we rely on EFI. (See commit https://cgit.freebsd.org/src/commit/?id=33bec6889a0957d1c06c36378157a46a95fcb004) For your mmc problem this can be that you are not using the dtoverlay that switches between the sdhost controller and the sdhci. Using this rewrite the mmc number for u-boot. Cheers, -- Emmanuel Vadot