GNU bug report logs - #45519
MLO failed to load u-boot.img on beaglebone black(AM335x)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>; dated Tue, 29 Dec 2020 03:50:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Dec 2020 05:07:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 29 00:07:51 2020
Received: from localhost ([127.0.0.1]:37402 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ku7Ec-0003RL-Oi
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2020 00:07:50 -0500
Received: from lists.gnu.org ([209.51.188.17]:49510)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1ku7EZ-0003RD-Vh
 for submit <at> debbugs.gnu.org; Tue, 29 Dec 2020 00:07:49 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:42982)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku7EZ-0000uc-RS
 for bug-guix@HIDDEN; Tue, 29 Dec 2020 00:07:47 -0500
Received: from cyberdimension.org ([80.67.179.20]:55736
 helo=gnutoo.cyberdimension.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku7ET-0007ri-Um
 for bug-guix@HIDDEN; Tue, 29 Dec 2020 00:07:47 -0500
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id 962f524d
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 05:01:12 +0000 (UTC)
Received: from primarylaptop.localdomain (localhost.localdomain [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 9311a5f7
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 05:01:12 +0000 (UTC)
Date: Tue, 29 Dec 2020 06:05:34 +0100
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: bug-guix@HIDDEN
Subject: Re: MLO failed to load u-boot.img  on beaglebone black(AM335x)
Message-ID: <20201229060534.33826161@HIDDEN>
In-Reply-To: <20201229053355.30ce920b@HIDDEN>
References: <20201229044725.3856df42@HIDDEN>
 <20201229053355.30ce920b@HIDDEN>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; i686-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/gtvfFR/dCVgOf=/aElgBnAm";
 protocol="application/pgp-signature"; micalg=pgp-sha256
Received-SPF: pass client-ip=80.67.179.20;
 envelope-from=GNUtoo@HIDDEN; helo=gnutoo.cyberdimension.org
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--Sig_/gtvfFR/dCVgOf=/aElgBnAm
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 29 Dec 2020 05:33:55 +0100
Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> wrote:

In addition I forgot that the patch I talked about was for omap3 and
not for AM335x.

Denis.

--Sig_/gtvfFR/dCVgOf=/aElgBnAm
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAl/quR4ACgkQX138wUF3
4mN3IQ/8DVcZnMoImQ5vZfkOGOLbmq+hXMV2BEav91IoNX38ZnDWpHAikzsF6Da3
oCmxZfChf8sHBfgltXfWq98VP0Vl6V7lV9+fz/lo/FC1aQHPUT4QYUL4UycZFmEG
P0JM1gMSOTIRyRGFpujr363b0+ZT86iZDVgSTgkph7SrYaO8jf3/A1CbhilLUuIP
02S6HvqlH12BB4Sqy2JPbdKo0rbkzWp2Xba61CPSZLOTuwpwBPV/m3ER65BRt+1d
KhT8BkRj+An+RYHO86YDAvpPv9ZOABM6FWWjtiFOTTKijfcXbyuGP0Vgd8LQ1Vz/
UnR9WGBveSRXTxvj2AUXXHPekLfsBQe4nAEixKWMR/9CN9T++/nwGvbEPYdcCq/O
otHEBAhcJNEvsq4lAKUJAHX5m0woD7aHq97752zXchJA1GeYp6eCTyTxf8WVz4cz
Va/KYADFgnifoX6o/xtp5SRJm7dWC7rhutsF6QR/kU/N5IVcfvCr8UnO+CS7dTg+
HCpcMnp0igtaLSjMR2Bw54PjIMRDUDwL7axWYTBO1UnryG2Fp7KWpdWIbzOQXdGc
s40l2w7HAdoBPYYSFwaAllC9tRyAvbIAbdsMY+gCLg7Zm2VZLRaAd5w0hADiEsSC
ZgEpU1osghGauglu8FhaQxXdYqtqvKlOrjZ8snJNvtuQMabqXvw=
=sU4j
-----END PGP SIGNATURE-----

--Sig_/gtvfFR/dCVgOf=/aElgBnAm--




Information forwarded to bug-guix@HIDDEN:
bug#45519; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Dec 2020 04:36:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 28 23:36:14 2020
Received: from localhost ([127.0.0.1]:37386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ku6k2-0002ds-Kp
	for submit <at> debbugs.gnu.org; Mon, 28 Dec 2020 23:36:14 -0500
Received: from lists.gnu.org ([209.51.188.17]:47432)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1ku6jy-0002dg-N7
 for submit <at> debbugs.gnu.org; Mon, 28 Dec 2020 23:36:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37932)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku6jy-0003AG-Gc
 for bug-guix@HIDDEN; Mon, 28 Dec 2020 23:36:10 -0500
Received: from cyberdimension.org ([80.67.179.20]:55680
 helo=gnutoo.cyberdimension.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku6jt-0001zy-R2
 for bug-guix@HIDDEN; Mon, 28 Dec 2020 23:36:10 -0500
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id 7d651eb9
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 04:29:38 +0000 (UTC)
Received: from primarylaptop.localdomain (localhost.localdomain [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 4113a80c
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 04:29:38 +0000 (UTC)
Date: Tue, 29 Dec 2020 05:33:55 +0100
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: bug-guix@HIDDEN
Subject: Re: MLO failed to load u-boot.img  on beaglebone black(AM335x)
Message-ID: <20201229053355.30ce920b@HIDDEN>
In-Reply-To: <20201229044725.3856df42@HIDDEN>
References: <20201229044725.3856df42@HIDDEN>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; i686-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/Ovq1qEpK.46KTwqMgZHoD7o";
 protocol="application/pgp-signature"; micalg=pgp-sha256
Received-SPF: pass client-ip=80.67.179.20;
 envelope-from=GNUtoo@HIDDEN; helo=gnutoo.cyberdimension.org
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--Sig_/Ovq1qEpK.46KTwqMgZHoD7o
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Tue, 29 Dec 2020 04:47:25 +0100
Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> wrote:
> > "/libexec/MLO")) (u-boot (string-append bootloader
> > "/libexec/u-boot.img"))) (write-file-on-device mlo (* 256 512)
> >                               image (* 256 512))
> >         (write-file-on-device u-boot (* 1024 512)
> >                               image (* 768 512)))))
Ah my bad, theses are in bytes (write-file-on-device uses seek which
looks like lseek).=20

So if u-boot.img is 600k, that's over the 512k.

MLO[1] is about 108k (108740 bytes), so that's under 128KiB.

So we could move u-boot.img at 256KiB instead of 384KiB.

This way we'll still have some margin for MLO but and increase the
space for u-boot.img to 768k.

References:
-----------
[1]/gnu/store/83rpk8q9bww0phl6z6zgpf06qhqs8cw6-u-boot-am335x-boneblack-2020=
.10/libexec/MLO

Denis.

--Sig_/Ovq1qEpK.46KTwqMgZHoD7o
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAl/qsbMACgkQX138wUF3
4mN9rw/+LfXb/idYeqHkKAN0ntPUmJhtAkwHD6GkM9+iTkUguDr5RWDxeLcdmZpW
6rLrIVO52Tgd883ZzCjeN39WIkmglsKT+KKWfBGdrAeKCUTI/7KwJ//Op8KOXp/8
pCyCzUNq2kA4kpti+qi9C+3LVp6OeLb5DI0ZOgx5MIP5V88/0tk34S/Tkt2Nstz7
Qt4eACqpjUUoqFj+jQ+cqKKwL5hKDcE/BRkxrCNF6J6CzZraxNMuf49cANKdipJx
kOmqj0rvFeYRNDLJTE4cb/TzFTt5M4eaU9Oss14xg/yXDxSbDgNrW7ZENT6cIa3+
2iAAWZVEDsHx2pcC33z72sGyTXQEOfJb4PHoqLeG9NdhzieqXDVkEI+GGQG6v4vA
MY+r44tGeXkcDh7LKk472PIwEfuuuIvEuSwYs4lR7b6flfnTGIIu7wHeyB1iBFfS
oUQEKSOf1gkHu9QacnD/16HBUJH0O+CFlvGBTPizMhrhVIKO+6pFIWJhoVbfkA5l
QxGQsmBRcvQWn2DN6rEtVjGfbd4xpBm/UgXy6vtBu25VUXwHcID6xbk7ehseDKWG
LfaYk1wmpEG9s/RZDq5vnWtCpX6aR42vD1hi7zhdtapgNSyzmcQRY2q4ZtI3rJ3O
ZcrRkrKBjhNt583TkRKLMUav7hN+yDz5nd+j7jlZVmx0zOY7fRs=
=73IM
-----END PGP SIGNATURE-----

--Sig_/Ovq1qEpK.46KTwqMgZHoD7o--




Information forwarded to bug-guix@HIDDEN:
bug#45519; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Dec 2020 03:49:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 28 22:49:41 2020
Received: from localhost ([127.0.0.1]:37340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ku60y-0005iJ-Qs
	for submit <at> debbugs.gnu.org; Mon, 28 Dec 2020 22:49:41 -0500
Received: from lists.gnu.org ([209.51.188.17]:40212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1ku60v-0005iA-N3
 for submit <at> debbugs.gnu.org; Mon, 28 Dec 2020 22:49:39 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:33656)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku60v-0004oC-F9
 for bug-guix@HIDDEN; Mon, 28 Dec 2020 22:49:37 -0500
Received: from cyberdimension.org ([2001:910:1314:ffff::1]:59040
 helo=gnutoo.cyberdimension.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1ku60t-0005sT-0L
 for bug-guix@HIDDEN; Mon, 28 Dec 2020 22:49:37 -0500
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id c14b24ee
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 03:43:06 +0000 (UTC)
Received: from primarylaptop.localdomain (localhost.localdomain [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 3c0d70d8
 for <bug-guix@HIDDEN>; Tue, 29 Dec 2020 03:43:06 +0000 (UTC)
Date: Tue, 29 Dec 2020 04:47:25 +0100
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: bug-guix@HIDDEN
Subject: MLO failed to load u-boot.img  on beaglebone black(AM335x)
Message-ID: <20201229044725.3856df42@HIDDEN>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; i686-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/PZvnDMhVA80/kN20YHM9n78";
 protocol="application/pgp-signature"; micalg=pgp-sha256
Received-SPF: pass client-ip=2001:910:1314:ffff::1;
 envelope-from=GNUtoo@HIDDEN; helo=gnutoo.cyberdimension.org
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--Sig_/PZvnDMhVA80/kN20YHM9n78
Content-Type: multipart/mixed; boundary="MP_/dOVe3WMs7S.uGu0B3=xaiAz"

--MP_/dOVe3WMs7S.uGu0B3=xaiAz
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I've generated an image for the beaglebone black with this
(beaglebone-black.scm) file:
> ;; Based on Guix's beaglebone-black.tmpl
> (use-modules (gnu) (gnu bootloader u-boot))
> (use-service-modules networking ssh)
> (use-package-modules bootloaders screen ssh)
> (operating-system
>   (host-name "beaglebone_black")
>   (timezone "Europe/Paris")
>   (locale "en_US.utf8")
>   ;; We use a microSD
>   (bootloader (bootloader-configuration
>                (bootloader u-boot-beaglebone-black-bootloader)
>                (target "/dev/mmcblk0")))
>   (kernel-arguments (append '("console=3DttyO0,115200"
> 			      "ignore_loglevel")))
>   ;; This module is required to mount the SD card.
>   (initrd-modules (cons "omap_hsmmc" %base-initrd-modules))
>   (file-systems (cons (file-system
>                         (device (file-system-label "my-root"))
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems))
>   (packages %base-packages)
>   (services (append (list
>                      (agetty-service
>                       (agetty-configuration
>                        (extra-options '("-L"))
>                        (baud-rate "115200")
>                        (term "vt100")
>                        (tty "ttyO0"))))
>                     %base-services)))

I then built it with:
> cp `guix system disk-image --target=3Darm-linux-gnueabihf \
> beaglebone-black.scm` guix.img

And at boot, it seems that MLO can't load u-boot.img:
> U-Boot SPL 2020.10 (Jan 01 1970 - 00:00:01 +0000)
> Trying to boot from MMC1
>
> U-Boot SPL 2020.10 (Jan 01 1970 - 00:00:01 +0000)
> Trying to boot from MMC1
>=20
> U-Boot SPL 2020.10 (Jan 01 1970 - 00:00:01 +0000)
> Trying to boot from MMC1
I don't know why there is a loop here. I didn't check if the watchdog
was disabled in MLO or not.

In gnu/bootloader/u-boot.scm in guix source code, we have:
> (define install-beaglebone-black-u-boot
>   ;; http://wiki.beyondlogic.org/index.php?title=3DBeagleBoneBlack_Upgrad=
ing_uBoot
>   ;; This first stage bootloader called MLO (U-Boot SPL) is expected at
>   ;; 0x20000 by BBB ROM code. The second stage bootloader will be loaded =
by
>   ;; the MLO and is expected at 0x60000.  Write both first stage ("MLO") =
and
>   ;; second stage ("u-boot.img") images, read in BOOTLOADER directory, to=
 the
>   ;; specified DEVICE.
>   #~(lambda (bootloader root-index image)
>       (let ((mlo (string-append bootloader "/libexec/MLO"))
>             (u-boot (string-append bootloader "/libexec/u-boot.img")))
>         (write-file-on-device mlo (* 256 512)
>                               image (* 256 512))
>         (write-file-on-device u-boot (* 1024 512)
>                               image (* 768 512)))))

0x60000 is at 384k. It's defined by
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR which defaults to 0x300.

Here u-boot.img[1] is 600K, so if we add 600k and 384k we're still
within the 1M alignment space before the first partition:
> Device     Boot Start     End Sectors  Size Id Type
> guix.img1        2048   83967   81920   40M ef EFI (FAT-12/16/32)
> guix.img2       83968 3287855 3203888  1.5G 83 Linux

So we can rule out space issues.

Another possibility is that it tries to boot on the filesystem instead
of block offset. I've already tried to upstream a patch for that in
u-boot (that I attached here) but it was refused because it had some
side effects:

On Mon, 20 Jan 2020 13:17:01 +0530
Lokesh Vutla wrote:
> > With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
> > raw MMC boot will be tried first, and if it fails, it FS will
> > be tried. =20
> This means that if FS boot is required then SPL_RAW_IMAGE_SUPPORT
> should be disabled. So with this patch applied, the default
> omap3_defconfig will fail to boot with FS mode. It is difficult to
> support this unless ROM passes some information on the bootmode.

We are using this patch in Parabola. I'll try to test it too in Guix
though I can often take quite some time to manage to test things with
Guix when patching Guix itself.

References:
-----------
[1]/gnu/store/83rpk8q9bww0phl6z6zgpf06qhqs8cw6-u-boot-am335x-boneblack-2020=
.10/libexec/u-boot.img

Denis.

--MP_/dOVe3WMs7S.uGu0B3=xaiAz
Content-Type: text/x-patch
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename=0001-omap34xx-SPL-enable-MMC-raw-boot-with-u-boot.img.patch

=46rom a49275a3cc03970939585610ebcf3b3d7e547037 Mon Sep 17 00:00:00 2001
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
Date: Sat, 9 Nov 2019 18:53:40 +0100
Subject: [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img

The following commit enabled raw SPL booting:
  22d90d560a omap3: Use raw SPL by default for mmc1
but it was reverted by the following commit:
  821c89d38c Revert "omap3: Use raw SPL by default for mmc1"
because SPL is unable to distinguish between RAW images and
garbage.

However if CONFIG_SPL_RAW_IMAGE_SUPPORT is disabled, SPL does
identify if there is a valid image with spl_parse_image_header.

With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
raw MMC boot will be tried first, and if it fails, it FS will
be tried.

The two scenarios have been tested on a BeagleBoard XM Revision C1.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
---
 arch/arm/mach-omap2/boot-common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-c=
ommon.c
index 734fa9d9e6..a48244e1c5 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -132,8 +132,10 @@ void save_omap_boot_params(void)
 	    (boot_device <=3D MMC_BOOT_DEVICES_END)) {
 		switch (boot_device) {
 		case BOOT_DEVICE_MMC1:
+#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
 			boot_mode =3D MMCSD_MODE_FS;
 			break;
+#endif
 		case BOOT_DEVICE_MMC2:
 			boot_mode =3D MMCSD_MODE_RAW;
 			break;
--=20
2.24.0


--MP_/dOVe3WMs7S.uGu0B3=xaiAz--

--Sig_/PZvnDMhVA80/kN20YHM9n78
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAl/qps4ACgkQX138wUF3
4mMamQ/+NTnRZeCR2Rb7Ja1pYcLoBHEZ9KEEEFKw79lgscJSdHO7A36+e4b/QJCK
j6ftQRrWdKX0CdNUzlZYQsrCh3lW20JtOnP76Kvz247ok3fHEQuRTpVbmIuzh9Sv
3ogAXD2Id6LVvIozZJdZ759X+4UTIDNF5fyZmwYt5jtoprAw6Tu9oVjVWNYRCPhs
qWoq4D/N1Sj8sCqxkeHYG2RLa9aaY67IXeHBUwj45lJLjRcxpWBZZodRk9a9TIJn
cAdxyT52JuNEpeupWVlT8kZ4/2OMq8fZ/BQk5WcSkDjxLW569FOlkfkXBS5nzdKp
w1YTiu3vPHHfFm5GOvEIU1UXcsFbmeRCpJSiiN2V5aVl8ZoShIyk1fzTbC/91n0R
HOra2QKQoSqwnJK4o32N0udRPDhjdI1xcl98cmuSbgqY+83wJu4hzgQxD5r8eQJB
lt7SHGIqHi5/8l6bhTD6JKvGlxXbCyEXl920oERvth/E3J0N/RrBOxbT/Ao/aqGJ
dFQ6t4P3tlFWxiHPecFvTyepOyY6Mu0cR7btaWBx2mocFun2VfdAMn5/HTTjzo4i
hciynh13MzI5rFJ9wEgnA2lm9JvBNmVthhQTjDBz8QovlPlzotUgShPbvXWVl1Ef
UXJUt/rleOCCXvoOlyET3aMrrVM74dwcTKAxVfH/TE/mCB0JPfw=
=ZGXI
-----END PGP SIGNATURE-----

--Sig_/PZvnDMhVA80/kN20YHM9n78--




Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#45519; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 29 Dec 2020 05:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.