From unknown Tue Jun 17 01:50:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35217] gnu: u-boot: Update to 2019.04. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Apr 2019 07:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35217 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 35217@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15548819916931 (code B ref -1); Wed, 10 Apr 2019 07:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 10 Apr 2019 07:39:51 +0000 Received: from localhost ([127.0.0.1]:52366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hE7pn-0001nj-Dd for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hE7pl-0001nU-Nr for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:55649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hE7pg-0000lc-Iq for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE7pf-0005pY-4x for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hE7pd-0000kJ-Pb for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:43 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:39726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE7pd-0000k9-Bg for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:41 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id E70B31AA27 for ; Wed, 10 Apr 2019 00:39:40 -0700 (PDT) From: Vagrant Cascadian Date: Wed, 10 Apr 2019 00:39:36 -0700 Message-ID: <87h8b6ia13.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 173.255.214.101 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/packages/bootloaders (u-boot): Update to 2019.04. [source]: Add patch. (u-boot-novena): Update dynamic patch to handle variable rename. (u-boot-am335x-evm): New variable. (u-boot-am335x-boneblack): Deprecate variable. (u-boot-novena): Fix typo in description. * gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch: New fi= le. * gnu/local.mk (dist_patch_DATA): Update accordingly. =2D-- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 18 ++++--- ...boot-fix-mkimage-header-verification.patch | 48 +++++++++++++++++++ 3 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/u-boot-fix-mkimage-header-verifica= tion.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6c39c3fef5..d8b74c0650 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,6 +1307,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ + %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ %D%/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d6ef7d52b5..6064e699f8 100644 =2D-- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -378,7 +378,7 @@ tree binary files. These are board description files u= sed by Linux and BSD.") (define u-boot (package (name "u-boot") =2D (version "2019.01") + (version "2019.04") (source (origin (method url-fetch) (uri (string-append @@ -386,7 +386,10 @@ tree binary files. These are board description files = used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 =2D "08hwsmh5xsb1gcxsv8gvx00bai938dm5y3889n8jif3a8rd7xgah"))= )) + "1vwv4bgbl7fjcm073zrphn17hnz5h5h778f88ivdsgbb2lnpgdvn")) + (patches + (search-patches=20 + "u-boot-fix-mkimage-header-verification.patch")))) (native-inputs `(("bc" ,bc) ("bison" ,bison) @@ -577,8 +580,11 @@ board-independent tools."))) (define-public u-boot-malta (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) =20 =2D(define-public u-boot-beagle-bone-black =2D (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) +(define-public u-boot-am335x-evm + (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) + +(define-public u-boot-am335x-boneblack + (deprecated-package "u-boot-am335x-boneblack" u-boot-am335x-evm)) =20 (define-public (make-u-boot-sunxi64-package board triplet) (let ((base (make-u-boot-package board triplet))) @@ -637,7 +643,7 @@ board-independent tools."))) also initializes the boards (RAM etc). =20 This U-Boot is built for Novena. Be advised that this version, contrary =2Dto Novena upstream, does not load u-boot.img from the first patition.") +to Novena upstream, does not load u-boot.img from the first partition.") (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases) @@ -647,7 +653,7 @@ to Novena upstream, does not load u-boot.img from the f= irst patition.") ;; allowing it to be installed at a device offset. (lambda _ (substitute* "configs/novena_defconfig" =2D (("CONFIG_SPL_FAT_SUPPORT=3Dy") "# CONFIG_SPL_FAT_SUP= PORT is not set")) + (("CONFIG_SPL_FS_FAT=3Dy") "# CONFIG_SPL_FS_FAT is not = set")) #t))))))))) =20 (define-public u-boot-cubieboard diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.pa= tch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch new file mode 100644 index 0000000000..a24519d2f4 =2D-- /dev/null +++ b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch @@ -0,0 +1,48 @@ +From da8dc3e61bab213b322eafeffa2802585508f288 Mon Sep 17 00:00:00 2001 +From: Jordan Hand +Date: Tue, 9 Apr 2019 10:36:09 -0700 +Subject: [PATCH] fdt: Fix mkimage list to try every header type +Origin: https://patchwork.ozlabs.org/patch/1082572/ + +Signed-off-by: Jordan Hand +--- + tools/mkimage.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/tools/mkimage.c b/tools/mkimage.c +index 2899adff81..d1e1a6743d 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -403,14 +403,21 @@ int main(int argc, char **argv) + exit (EXIT_FAILURE); + } +=20 +- /* +- * scan through mkimage registry for all supported image types +- * and verify the input image file header for match +- * Print the image information for matched image type +- * Returns the error code if not matched +- */ +- retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, +- tparams, ¶ms); ++ if (params.fflag) { ++ /* ++ * Verifies the header format based on the expected header for image ++ * type in tparams ++ */ ++ retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, ++ tparams, ¶ms); ++ } else { ++ /** ++ * When listing the image, we are not given the image type. Simply che= ck all ++ * image types to find one that matches our header ++ */ ++ retval =3D imagetool_verify_print_header(ptr, &sbuf, ++ tparams, ¶ms); ++ } +=20 + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (ifd); +--=20 +2.20.1 + =2D-=20 2.20.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXK2duAAKCRDcUY/If5cW qlXfAP9v/z8F9+1bNFzsCm/vrcaAodjvq9phWQsTVH3hZchArQEArrFdjFo83fgJ G+T3iSIwbouHpXftgzFavKQM8KMDqg4= =MJ46 -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 01:50:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35217] gnu: u-boot: Update to 2019.04. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Apr 2019 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35217 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 35217@debbugs.gnu.org Received: via spool by 35217-submit@debbugs.gnu.org id=B35217.155493495419032 (code B ref 35217); Wed, 10 Apr 2019 22:23:02 +0000 Received: (at 35217) by debbugs.gnu.org; 10 Apr 2019 22:22:34 +0000 Received: from localhost ([127.0.0.1]:53649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hELc1-0004wt-Uu for submit@debbugs.gnu.org; Wed, 10 Apr 2019 18:22:34 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:50746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hELbz-0004wc-5Y for 35217@debbugs.gnu.org; Wed, 10 Apr 2019 18:22:32 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 466821AA27 for <35217@debbugs.gnu.org>; Wed, 10 Apr 2019 15:22:24 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <87zhox33vu.fsf@ponder> References: <87h8b6ia13.fsf@ponder> <87zhox33vu.fsf@ponder> Date: Wed, 10 Apr 2019 15:22:18 -0700 Message-ID: <87v9zl33hh.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > On 2019-04-10, Vagrant Cascadian wrote: > * gnu/packages/bootloaders (u-boot): Update to 2019.04. ... > (u-boot-am335x-evm): New variable. > (u-boot-am335x-boneblack): Deprecate variable. The am335x-boneblack configuration was dropped from upstream. The am335x-evm image is considerably larger than the am335x-boneblack images, which leads to issues when installing at a device offset, as it will overwrite the first partition unless the first partition starts significantly later than most tools (parted, cfdisk) default of sector 2048 (beagleboard.org images start the first partition at sector 8192). The embedded-os-installation code should probably check to make sure they aren't trampling the first partition if installing to the raw device offset. Alternately, it's possible to copy the u-boot.img onto the first FAT partition of the microSD/eMMC, which will be loaded instead of the offset. But that takes some rethinking of how to install the bootloader (which would be good to not diverge from upstream for other platforms, such as u-boot-novena). I've unsuccessfully tried to make a minimal variant of the am335x-evm that only supports the beaglebone black, by removing the other device trees, which made it considerably smaller, but not small enough. Disabling NAND and related features might still be possible, but I haven't managed to get a configuration that compiles. So there's no clear upgrade path for existing beaglebone black installs. The upside to all this is that am335x-evm supports multiple boards! In light of all that, I'm not sure what a proper way forward is... live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXK5smwAKCRDcUY/If5cW qiFQAQDpyMrHLl6e/211Ko4EqJISj1E/WfaZOxyXwUwGY3n45wD/cjm1tJZCL47E 15wleRc6dUQRqDbXpEz7N5sLgvr6yQo= =jMib -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 01:50:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35217] gnu: u-boot: Update to 2019.04. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Apr 2019 21:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35217 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Vagrant Cascadian Cc: 35217@debbugs.gnu.org Received: via spool by 35217-submit@debbugs.gnu.org id=B35217.155536214317363 (code B ref 35217); Mon, 15 Apr 2019 21:03:01 +0000 Received: (at 35217) by debbugs.gnu.org; 15 Apr 2019 21:02:23 +0000 Received: from localhost ([127.0.0.1]:35644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hG8kB-0004Vz-Ij for submit@debbugs.gnu.org; Mon, 15 Apr 2019 17:02:23 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:50100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hG8k6-0004Vi-SC for 35217@debbugs.gnu.org; Mon, 15 Apr 2019 17:02:19 -0400 Received: from localhost (188-22-89-123.adsl.highway.telekom.at [188.22.89.123]) by dd26836.kasserver.com (Postfix) with ESMTPSA id BDA13336003A; Mon, 15 Apr 2019 23:02:16 +0200 (CEST) Date: Mon, 15 Apr 2019 23:02:14 +0200 From: Danny Milosavljevic Message-ID: <20190415230214.31877ad1@scratchpost.org> In-Reply-To: <87v9zl33hh.fsf@ponder> References: <87h8b6ia13.fsf@ponder> <87zhox33vu.fsf@ponder> <87v9zl33hh.fsf@ponder> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/Q5wq0.id5sxQ5.RN1Wo++zV"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/Q5wq0.id5sxQ5.RN1Wo++zV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Vagrant, On Wed, 10 Apr 2019 15:22:18 -0700 Vagrant Cascadian wrote: > > On 2019-04-10, Vagrant Cascadian wrote: > > * gnu/packages/bootloaders (u-boot): Update to 2019.04. =20 > ... > > (u-boot-am335x-evm): New variable. > > (u-boot-am335x-boneblack): Deprecate variable. =20 >=20 > The am335x-boneblack configuration was dropped from upstream. >=20 > The am335x-evm image is considerably larger than the am335x-boneblack > images, which leads to issues when installing at a device offset, as it > will overwrite the first partition unless the first partition starts > significantly later than most tools (parted, cfdisk) default of sector > 2048 (beagleboard.org images start the first partition at sector 8192). >=20 > The embedded-os-installation code should probably check to make sure > they aren't trampling the first partition if installing to the raw > device offset. That would make the parted bindings a hard dependency, probably even build-side. But I think that would still be better than the alternative: destroying user filesystems. > Alternately, it's possible to copy the u-boot.img onto the first FAT > partition of the microSD/eMMC, which will be loaded instead of the > offset. But that takes some rethinking of how to install the bootloader > (which would be good to not diverge from upstream for other platforms, > such as u-boot-novena). Yeah, I think sooner or later it's going to come to this. Might as well bite the bullet now. > In light of all that, I'm not sure what a proper way forward is... Yeah, sounds like a bad situation with no nice solution that allows updating of existing installations. In that case, keeping existing installations on the old version would be preferrable to breaking them. --Sig_/Q5wq0.id5sxQ5.RN1Wo++zV Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAly08VYACgkQ5xo1VCww uqWS6Af9GwqyupWEmemtQkHnlNwAcFPktXjrC0qUltDn8w5EJ0v+F8b2wBC7zJ7r V4On0loBt2UHjOAOdqQQbfLQTQYhP6Ld8hPOVFxh9rOhFdsCU8Y5N54PLVMyW58d x/2DOgqU44DQizsz3fHu8yNK1jFnzhgfN3sBBWxuweumyAIO+Yw/JOXNYEKFMTCP 3e/OZ07Sk3iSOmWXo7BIcOwccYaO0b1tY7r2NzLrB83Meiu4/ReY0ZHKx2wkwRUH 6Jfy3YVtTR9xBJ4JRh4yZl5HDE1WAqMCYmvPXYRHk5lwTqvZKwdugb+tCA+KzWum KTtow5jPfnrhur5Msp1jmyoR+2zDqQ== =56sX -----END PGP SIGNATURE----- --Sig_/Q5wq0.id5sxQ5.RN1Wo++zV-- From unknown Tue Jun 17 01:50:39 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#35217] gnu: u-boot: Update to 2019.04. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Apr 2019 04:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35217 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Danny Milosavljevic Cc: 35217@debbugs.gnu.org Received: via spool by 35217-submit@debbugs.gnu.org id=B35217.155539005428600 (code B ref 35217); Tue, 16 Apr 2019 04:48:02 +0000 Received: (at 35217) by debbugs.gnu.org; 16 Apr 2019 04:47:34 +0000 Received: from localhost ([127.0.0.1]:36150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hGG0L-0007RD-SL for submit@debbugs.gnu.org; Tue, 16 Apr 2019 00:47:34 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:39568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hGG0J-0007Qw-GO for 35217@debbugs.gnu.org; Tue, 16 Apr 2019 00:47:32 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 8BF321AA27; Mon, 15 Apr 2019 21:47:24 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <20190415230214.31877ad1@scratchpost.org> References: <87h8b6ia13.fsf@ponder> <87zhox33vu.fsf@ponder> <87v9zl33hh.fsf@ponder> <20190415230214.31877ad1@scratchpost.org> Date: Mon, 15 Apr 2019 21:46:57 -0700 Message-ID: <87lg0a1rr2.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2019-04-15, Danny Milosavljevic wrote: > On Wed, 10 Apr 2019 15:22:18 -0700 > Vagrant Cascadian wrote: > >> > On 2019-04-10, Vagrant Cascadian wrote: >> > * gnu/packages/bootloaders (u-boot): Update to 2019.04.=20=20 >> ... >> > (u-boot-am335x-evm): New variable. >> > (u-boot-am335x-boneblack): Deprecate variable.=20=20 >>=20 >> The am335x-boneblack configuration was dropped from upstream. >>=20 >> The am335x-evm image is considerably larger than the am335x-boneblack >> images, which leads to issues when installing at a device offset, as it >> will overwrite the first partition unless the first partition starts >> significantly later than most tools (parted, cfdisk) default of sector >> 2048 (beagleboard.org images start the first partition at sector 8192). >>=20 >> The embedded-os-installation code should probably check to make sure >> they aren't trampling the first partition if installing to the raw >> device offset. > > That would make the parted bindings a hard dependency, probably even > build-side. But I think that would still be better than the alternative: > destroying user filesystems. Could do some math; e.g. the offset is 768, first sector is 2048. So if 2048-768-(size-of-in-sectors u-boot.img) >> 0, it should be ok. Better checking that done currently, at least. But more sophisticated, of course, would be checking the actual layout of the partition table... some targets (pine64+/pinebook) have offsets that conflict with GPT partition tables, for example. >> Alternately, it's possible to copy the u-boot.img onto the first FAT >> partition of the microSD/eMMC, which will be loaded instead of the >> offset. But that takes some rethinking of how to install the bootloader >> (which would be good to not diverge from upstream for other platforms, >> such as u-boot-novena). > > Yeah, I think sooner or later it's going to come to this. Might as well > bite the bullet now. Hmmm... >> In light of all that, I'm not sure what a proper way forward is... > > Yeah, sounds like a bad situation with no nice solution that allows > updating of existing installations. In that case, keeping existing > installations on the old version would be preferrable to breaking > them. Short of that, here's an updated u-boot 2019.04 patch that: =2D Generates a u-boot-am335x-boneblack package with a slightly modified am335x_evm configuration removing extra device-trees; that *should* be small enough to fit with the common partition tables (but so far untested). It theoretically has about 80k of wiggle-room for u-boot.img to grow before it becomes a problem again. =2D Better commented patch fixing mkimage to pass test-imagetools test suite. Patch was accepted in at least one of the maintainer trees upstream. live well, vagrant --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-u-boot-Update-to-2019.04.patch Content-Transfer-Encoding: quoted-printable From=202d9f80129801475002f6368074356a5eff9f24b4 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Mon, 18 Feb 2019 04:01:23 +0000 Subject: [PATCH] gnu: u-boot: Update to 2019.04. * gnu/packages/bootloaders (u-boot): Update to 2019.04. [source]: Add patch. (u-boot-novena): Update dynamic patch to handle variable rename. (u-boot-am335x-evm): New variable. (u-boot-am335x-boneblack): Build with modified am335x-evm config. (u-boot-novena): Fix typo in description. * gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch: New fi= le. * gnu/local.mk (dist_patch_DATA): Update accordingly. =2D-- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 39 +++++++++++-- ...boot-fix-mkimage-header-verification.patch | 57 +++++++++++++++++++ 3 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/u-boot-fix-mkimage-header-verifica= tion.patch diff --git a/gnu/local.mk b/gnu/local.mk index df96b98f07..660e96c856 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1308,6 +1308,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ + %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ %D%/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d6ef7d52b5..a2ac151978 100644 =2D-- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -378,7 +378,7 @@ tree binary files. These are board description files u= sed by Linux and BSD.") (define u-boot (package (name "u-boot") =2D (version "2019.01") + (version "2019.04") (source (origin (method url-fetch) (uri (string-append @@ -386,7 +386,10 @@ tree binary files. These are board description files = used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 =2D "08hwsmh5xsb1gcxsv8gvx00bai938dm5y3889n8jif3a8rd7xgah"))= )) + "1vwv4bgbl7fjcm073zrphn17hnz5h5h778f88ivdsgbb2lnpgdvn")) + (patches + (search-patches=20 + "u-boot-fix-mkimage-header-verification.patch")))) (native-inputs `(("bc" ,bc) ("bison" ,bison) @@ -577,8 +580,32 @@ board-independent tools."))) (define-public u-boot-malta (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) =20 =2D(define-public u-boot-beagle-bone-black =2D (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) +(define-public u-boot-am335x-boneblack + (let ((base (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))) + (package + (inherit base) + (name "u-boot-am335x-boneblack") + (description "U-Boot is a bootloader used mostly for ARM boards. It +also initializes the boards (RAM etc). + +This U-Boot is built for the BeagleBone Black, which was removed upstream, +adjusted from the am335x_evm build with several device trees removed so th= at +it fits within common partitioning schemes.") + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'patch-defconfig + ;; Patch out other devicetrees to build image small enough = to + ;; fit within typical partitioning schemes where the first + ;; partition begins at sector 2048. + (lambda _ + (substitute* "configs/am335x_evm_defconfig" + (("CONFIG_OF_LIST=3D.*$") "CONFIG_OF_LIST=3D\"am335x-ev= m am335x-boneblack\"\n")) + #t))))))))) + +(define-public u-boot-am335x-evm + (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) =20 (define-public (make-u-boot-sunxi64-package board triplet) (let ((base (make-u-boot-package board triplet))) @@ -637,7 +664,7 @@ board-independent tools."))) also initializes the boards (RAM etc). =20 This U-Boot is built for Novena. Be advised that this version, contrary =2Dto Novena upstream, does not load u-boot.img from the first patition.") +to Novena upstream, does not load u-boot.img from the first partition.") (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases) @@ -647,7 +674,7 @@ to Novena upstream, does not load u-boot.img from the f= irst patition.") ;; allowing it to be installed at a device offset. (lambda _ (substitute* "configs/novena_defconfig" =2D (("CONFIG_SPL_FAT_SUPPORT=3Dy") "# CONFIG_SPL_FAT_SUP= PORT is not set")) + (("CONFIG_SPL_FS_FAT=3Dy") "# CONFIG_SPL_FS_FAT is not = set")) #t))))))))) =20 (define-public u-boot-cubieboard diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.pa= tch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch new file mode 100644 index 0000000000..063677db4a =2D-- /dev/null +++ b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch @@ -0,0 +1,57 @@ +From 48b52117235928cfd7ef1ec5c3f2cff5d7b03862 Mon Sep 17 00:00:00 2001 +From: Jordan Hand +Date: Wed, 10 Apr 2019 09:46:32 -0700 +Subject: [PATCH,v2] fdt: Fix mkimage list to try every header type +Origin: https://patchwork.ozlabs.org/patch/1083495/ + +Image type is not supplied to `mkimage -l`. For this reason, we cannot +use imagetool_verify_print_header_by_type. Instead, this patch uses +imagetool_verify_print_header to look through all header types to find +one where image validation succeeds. + +This patch fixes failures in test/image/test-imagetools.sh + +Signed-off-by: Jordan Hand +Tested-by: Alex Kiernan +Tested-by: Vagrant Cascadian +--- + tools/mkimage.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/tools/mkimage.c b/tools/mkimage.c +index 2899adff81..76c3406d37 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -403,14 +403,21 @@ int main(int argc, char **argv) + exit (EXIT_FAILURE); + } +=20 +- /* +- * scan through mkimage registry for all supported image types +- * and verify the input image file header for match +- * Print the image information for matched image type +- * Returns the error code if not matched +- */ +- retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, +- tparams, ¶ms); ++ if (params.fflag) { ++ /* ++ * Verifies the header format based on the expected header for ++ * image type in tparams ++ */ ++ retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, ++ tparams, ¶ms); ++ } else { ++ /** ++ * When listing the image, we are not given the image type. Simply che= ck all ++ * image types to find one that matches our header ++ */ ++ retval =3D imagetool_verify_print_header(ptr, &sbuf, ++ tparams, ¶ms); ++ } +=20 + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (ifd); +--=20 +2.20.1 + =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXLVeQgAKCRDcUY/If5cW qj3/AP4ue2S14GY3dVIFulUDKSdd8yrBsfoWCZm9tMIh8qhf9QEAiMw9vd675vwx 6Lem2pyA2udTL7/mDKsnDSmfPcOpywE= =i3IU -----END PGP SIGNATURE----- --==-=-=-- From unknown Tue Jun 17 01:50:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vagrant Cascadian Subject: bug#35217: closed (Re: [bug#35217] gnu: u-boot: Update to 2019.04.) Message-ID: References: <20190429123531.38fbc9d9@scratchpost.org> <87h8b6ia13.fsf@ponder> X-Gnu-PR-Message: they-closed 35217 X-Gnu-PR-Package: guix-patches Reply-To: 35217@debbugs.gnu.org Date: Mon, 29 Apr 2019 10:36:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1556534162-18097-1" This is a multi-part message in MIME format... ------------=_1556534162-18097-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #35217: gnu: u-boot: Update to 2019.04. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 35217@debbugs.gnu.org. --=20 35217: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35217 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1556534162-18097-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 35217-done) by debbugs.gnu.org; 29 Apr 2019 10:35:41 +0000 Received: from localhost ([127.0.0.1]:38468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hL3dM-0004hL-V7 for submit@debbugs.gnu.org; Mon, 29 Apr 2019 06:35:41 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:40338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hL3dL-0004hC-11 for 35217-done@debbugs.gnu.org; Mon, 29 Apr 2019 06:35:39 -0400 Received: from localhost (178.112.141.112.wireless.dyn.drei.com [178.112.141.112]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 1320A33606DD; Mon, 29 Apr 2019 12:35:36 +0200 (CEST) Date: Mon, 29 Apr 2019 12:35:31 +0200 From: Danny Milosavljevic To: Vagrant Cascadian Subject: Re: [bug#35217] gnu: u-boot: Update to 2019.04. Message-ID: <20190429123531.38fbc9d9@scratchpost.org> In-Reply-To: <87lg0a1rr2.fsf@ponder> References: <87h8b6ia13.fsf@ponder> <87zhox33vu.fsf@ponder> <87v9zl33hh.fsf@ponder> <20190415230214.31877ad1@scratchpost.org> <87lg0a1rr2.fsf@ponder> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/VHQgGTw/DySS_0Kmipxlyu4"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35217-done Cc: 35217-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/VHQgGTw/DySS_0Kmipxlyu4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Thanks! Pushed to guix master as commit 6b99afeef89233b71d113a63cf04a6b4b4= 9a4679. --Sig_/VHQgGTw/DySS_0Kmipxlyu4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzG03MACgkQ5xo1VCww uqU0AAf8C82ek5nfxDjvg7ybV0McZkP6O2VcF11jYrzBMg3Ki86TxLMNitk+gzvE ZDv+Ain46KB3NkNh7j16n1Cx/e7sMxOgxTVd2bPbLK4voRc8Y7+zI3Lfgth/afKb eP3Zoe6Iqbi+32tEBLauP1qC+UHkmfKxCKqtzfu8krvIyI9XZjJpDSF67TfXyxYF sQ3xNv5NnlbY0yTpB8TLrGnD30V/gqlx68zhjmSSvYImMpnBnt89x1fHbpjL7F1K faFAo2OF9dtVT7guGqPk5EzGGbbV1+f0Pdau19yIsU+PnXP62do2f+cZD7acUoXs rj4XNQ0lhI580ZUsYnSd3YFeMwsbHQ== =h7Zw -----END PGP SIGNATURE----- --Sig_/VHQgGTw/DySS_0Kmipxlyu4-- ------------=_1556534162-18097-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Apr 2019 07:39:51 +0000 Received: from localhost ([127.0.0.1]:52366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hE7pn-0001nj-Dd for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hE7pl-0001nU-Nr for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:55649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hE7pg-0000lc-Iq for submit@debbugs.gnu.org; Wed, 10 Apr 2019 03:39:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE7pf-0005pY-4x for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hE7pd-0000kJ-Pb for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:43 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:39726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hE7pd-0000k9-Bg for guix-patches@gnu.org; Wed, 10 Apr 2019 03:39:41 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id E70B31AA27 for ; Wed, 10 Apr 2019 00:39:40 -0700 (PDT) From: Vagrant Cascadian To: guix-patches@gnu.org Subject: gnu: u-boot: Update to 2019.04. Date: Wed, 10 Apr 2019 00:39:36 -0700 Message-ID: <87h8b6ia13.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 173.255.214.101 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/packages/bootloaders (u-boot): Update to 2019.04. [source]: Add patch. (u-boot-novena): Update dynamic patch to handle variable rename. (u-boot-am335x-evm): New variable. (u-boot-am335x-boneblack): Deprecate variable. (u-boot-novena): Fix typo in description. * gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch: New fi= le. * gnu/local.mk (dist_patch_DATA): Update accordingly. =2D-- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 18 ++++--- ...boot-fix-mkimage-header-verification.patch | 48 +++++++++++++++++++ 3 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/u-boot-fix-mkimage-header-verifica= tion.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6c39c3fef5..d8b74c0650 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,6 +1307,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/totem-meson-easy-codec.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ + %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \ %D%/packages/patches/unzip-CVE-2014-8139.patch \ %D%/packages/patches/unzip-CVE-2014-8140.patch \ %D%/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d6ef7d52b5..6064e699f8 100644 =2D-- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -378,7 +378,7 @@ tree binary files. These are board description files u= sed by Linux and BSD.") (define u-boot (package (name "u-boot") =2D (version "2019.01") + (version "2019.04") (source (origin (method url-fetch) (uri (string-append @@ -386,7 +386,10 @@ tree binary files. These are board description files = used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 =2D "08hwsmh5xsb1gcxsv8gvx00bai938dm5y3889n8jif3a8rd7xgah"))= )) + "1vwv4bgbl7fjcm073zrphn17hnz5h5h778f88ivdsgbb2lnpgdvn")) + (patches + (search-patches=20 + "u-boot-fix-mkimage-header-verification.patch")))) (native-inputs `(("bc" ,bc) ("bison" ,bison) @@ -577,8 +580,11 @@ board-independent tools."))) (define-public u-boot-malta (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) =20 =2D(define-public u-boot-beagle-bone-black =2D (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) +(define-public u-boot-am335x-evm + (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) + +(define-public u-boot-am335x-boneblack + (deprecated-package "u-boot-am335x-boneblack" u-boot-am335x-evm)) =20 (define-public (make-u-boot-sunxi64-package board triplet) (let ((base (make-u-boot-package board triplet))) @@ -637,7 +643,7 @@ board-independent tools."))) also initializes the boards (RAM etc). =20 This U-Boot is built for Novena. Be advised that this version, contrary =2Dto Novena upstream, does not load u-boot.img from the first patition.") +to Novena upstream, does not load u-boot.img from the first partition.") (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases) @@ -647,7 +653,7 @@ to Novena upstream, does not load u-boot.img from the f= irst patition.") ;; allowing it to be installed at a device offset. (lambda _ (substitute* "configs/novena_defconfig" =2D (("CONFIG_SPL_FAT_SUPPORT=3Dy") "# CONFIG_SPL_FAT_SUP= PORT is not set")) + (("CONFIG_SPL_FS_FAT=3Dy") "# CONFIG_SPL_FS_FAT is not = set")) #t))))))))) =20 (define-public u-boot-cubieboard diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.pa= tch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch new file mode 100644 index 0000000000..a24519d2f4 =2D-- /dev/null +++ b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch @@ -0,0 +1,48 @@ +From da8dc3e61bab213b322eafeffa2802585508f288 Mon Sep 17 00:00:00 2001 +From: Jordan Hand +Date: Tue, 9 Apr 2019 10:36:09 -0700 +Subject: [PATCH] fdt: Fix mkimage list to try every header type +Origin: https://patchwork.ozlabs.org/patch/1082572/ + +Signed-off-by: Jordan Hand +--- + tools/mkimage.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/tools/mkimage.c b/tools/mkimage.c +index 2899adff81..d1e1a6743d 100644 +--- a/tools/mkimage.c ++++ b/tools/mkimage.c +@@ -403,14 +403,21 @@ int main(int argc, char **argv) + exit (EXIT_FAILURE); + } +=20 +- /* +- * scan through mkimage registry for all supported image types +- * and verify the input image file header for match +- * Print the image information for matched image type +- * Returns the error code if not matched +- */ +- retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, +- tparams, ¶ms); ++ if (params.fflag) { ++ /* ++ * Verifies the header format based on the expected header for image ++ * type in tparams ++ */ ++ retval =3D imagetool_verify_print_header_by_type(ptr, &sbuf, ++ tparams, ¶ms); ++ } else { ++ /** ++ * When listing the image, we are not given the image type. Simply che= ck all ++ * image types to find one that matches our header ++ */ ++ retval =3D imagetool_verify_print_header(ptr, &sbuf, ++ tparams, ¶ms); ++ } +=20 + (void) munmap((void *)ptr, sbuf.st_size); + (void) close (ifd); +--=20 +2.20.1 + =2D-=20 2.20.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCXK2duAAKCRDcUY/If5cW qlXfAP9v/z8F9+1bNFzsCm/vrcaAodjvq9phWQsTVH3hZchArQEArrFdjFo83fgJ G+T3iSIwbouHpXftgzFavKQM8KMDqg4= =MJ46 -----END PGP SIGNATURE----- --=-=-=-- ------------=_1556534162-18097-1--