summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@debian.org>2019-04-15 21:46:57 -0700
committerDanny Milosavljevic <dannym@scratchpost.org>2019-04-29 12:35:04 +0200
commit6b99afeef89233b71d113a63cf04a6b4b49a4679 (patch)
treef581fe9269fd8c953161caa901a7bdb08b7dc2f9
parentda56f10971e0b6f32969b10e38ed043b2c99bb82 (diff)
gnu: u-boot: Update to 2019.04.
* gnu/packages/bootloaders.scm (u-boot): Update to 2019.04. [source]: Add patch. (u-boot-novena): Update dynamic patch to handle config key 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/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): Use u-boot-am335x-boneblack. * gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch: New file. * gnu/local.mk (dist_patch_DATA): Update accordingly. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
-rw-r--r--gnu/bootloader/u-boot.scm2
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/bootloaders.scm39
-rw-r--r--gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch57
4 files changed, 92 insertions, 7 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 1c6f322bc44..54abfe1c69d 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -106,7 +106,7 @@
106(define u-boot-beaglebone-black-bootloader 106(define u-boot-beaglebone-black-bootloader
107 (bootloader 107 (bootloader
108 (inherit u-boot-bootloader) 108 (inherit u-boot-bootloader)
109 (package u-boot-beagle-bone-black) 109 (package u-boot-am335x-boneblack)
110 (installer install-beaglebone-black-u-boot))) 110 (installer install-beaglebone-black-u-boot)))
111 111
112(define u-boot-allwinner-bootloader 112(define u-boot-allwinner-bootloader
diff --git a/gnu/local.mk b/gnu/local.mk
index 15db537098e..a0f40d13ae2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1309,6 +1309,7 @@ dist_patch_DATA = \
1309 %D%/packages/patches/totem-meson-easy-codec.patch \ 1309 %D%/packages/patches/totem-meson-easy-codec.patch \
1310 %D%/packages/patches/tuxpaint-stamps-path.patch \ 1310 %D%/packages/patches/tuxpaint-stamps-path.patch \
1311 %D%/packages/patches/twinkle-include-qregexpvalidator.patch \ 1311 %D%/packages/patches/twinkle-include-qregexpvalidator.patch \
1312 %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch \
1312 %D%/packages/patches/unzip-CVE-2014-8139.patch \ 1313 %D%/packages/patches/unzip-CVE-2014-8139.patch \
1313 %D%/packages/patches/unzip-CVE-2014-8140.patch \ 1314 %D%/packages/patches/unzip-CVE-2014-8140.patch \
1314 %D%/packages/patches/unzip-CVE-2014-8141.patch \ 1315 %D%/packages/patches/unzip-CVE-2014-8141.patch \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index b4eabaea481..e1d91b136cb 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -379,7 +379,7 @@ tree binary files. These are board description files used by Linux and BSD.")
379(define u-boot 379(define u-boot
380 (package 380 (package
381 (name "u-boot") 381 (name "u-boot")
382 (version "2019.01") 382 (version "2019.04")
383 (source (origin 383 (source (origin
384 (method url-fetch) 384 (method url-fetch)
385 (uri (string-append 385 (uri (string-append
@@ -387,7 +387,10 @@ tree binary files. These are board description files used by Linux and BSD.")
387 "u-boot-" version ".tar.bz2")) 387 "u-boot-" version ".tar.bz2"))
388 (sha256 388 (sha256
389 (base32 389 (base32
390 "08hwsmh5xsb1gcxsv8gvx00bai938dm5y3889n8jif3a8rd7xgah")))) 390 "1vwv4bgbl7fjcm073zrphn17hnz5h5h778f88ivdsgbb2lnpgdvn"))
391 (patches
392 (search-patches
393 "u-boot-fix-mkimage-header-verification.patch"))))
391 (native-inputs 394 (native-inputs
392 `(("bc" ,bc) 395 `(("bc" ,bc)
393 ("bison" ,bison) 396 ("bison" ,bison)
@@ -578,8 +581,32 @@ board-independent tools.")))
578(define-public u-boot-malta 581(define-public u-boot-malta
579 (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) 582 (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
580 583
581(define-public u-boot-beagle-bone-black 584(define-public u-boot-am335x-boneblack
582 (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) 585 (let ((base (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")))
586 (package
587 (inherit base)
588 (name "u-boot-am335x-boneblack")
589 (description "U-Boot is a bootloader used mostly for ARM boards. It
590also initializes the boards (RAM etc).
591
592This U-Boot is built for the BeagleBone Black, which was removed upstream,
593adjusted from the am335x_evm build with several device trees removed so that
594it fits within common partitioning schemes.")
595 (arguments
596 (substitute-keyword-arguments (package-arguments base)
597 ((#:phases phases)
598 `(modify-phases ,phases
599 (add-after 'unpack 'patch-defconfig
600 ;; Patch out other devicetrees to build image small enough to
601 ;; fit within typical partitioning schemes where the first
602 ;; partition begins at sector 2048.
603 (lambda _
604 (substitute* "configs/am335x_evm_defconfig"
605 (("CONFIG_OF_LIST=.*$") "CONFIG_OF_LIST=\"am335x-evm am335x-boneblack\"\n"))
606 #t)))))))))
607
608(define-public u-boot-am335x-evm
609 (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
583 610
584(define-public (make-u-boot-sunxi64-package board triplet) 611(define-public (make-u-boot-sunxi64-package board triplet)
585 (let ((base (make-u-boot-package board triplet))) 612 (let ((base (make-u-boot-package board triplet)))
@@ -638,7 +665,7 @@ board-independent tools.")))
638also initializes the boards (RAM etc). 665also initializes the boards (RAM etc).
639 666
640This U-Boot is built for Novena. Be advised that this version, contrary 667This U-Boot is built for Novena. Be advised that this version, contrary
641to Novena upstream, does not load u-boot.img from the first patition.") 668to Novena upstream, does not load u-boot.img from the first partition.")
642 (arguments 669 (arguments
643 (substitute-keyword-arguments (package-arguments base) 670 (substitute-keyword-arguments (package-arguments base)
644 ((#:phases phases) 671 ((#:phases phases)
@@ -648,7 +675,7 @@ to Novena upstream, does not load u-boot.img from the first patition.")
648 ;; allowing it to be installed at a device offset. 675 ;; allowing it to be installed at a device offset.
649 (lambda _ 676 (lambda _
650 (substitute* "configs/novena_defconfig" 677 (substitute* "configs/novena_defconfig"
651 (("CONFIG_SPL_FAT_SUPPORT=y") "# CONFIG_SPL_FAT_SUPPORT is not set")) 678 (("CONFIG_SPL_FS_FAT=y") "# CONFIG_SPL_FS_FAT is not set"))
652 #t))))))))) 679 #t)))))))))
653 680
654(define-public u-boot-cubieboard 681(define-public u-boot-cubieboard
diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch
new file mode 100644
index 00000000000..063677db4ab
--- /dev/null
+++ b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch
@@ -0,0 +1,57 @@
1From 48b52117235928cfd7ef1ec5c3f2cff5d7b03862 Mon Sep 17 00:00:00 2001
2From: Jordan Hand <jordanhand22@gmail.com>
3Date: Wed, 10 Apr 2019 09:46:32 -0700
4Subject: [PATCH,v2] fdt: Fix mkimage list to try every header type
5Origin: https://patchwork.ozlabs.org/patch/1083495/
6
7Image type is not supplied to `mkimage -l`. For this reason, we cannot
8use imagetool_verify_print_header_by_type. Instead, this patch uses
9imagetool_verify_print_header to look through all header types to find
10one where image validation succeeds.
11
12This patch fixes failures in test/image/test-imagetools.sh
13
14Signed-off-by: Jordan Hand <jorhand@microsoft.com>
15Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
16Tested-by: Vagrant Cascadian <vagrant@debian.org>
17---
18 tools/mkimage.c | 23 +++++++++++++++--------
19 1 file changed, 15 insertions(+), 8 deletions(-)
20
21diff --git a/tools/mkimage.c b/tools/mkimage.c
22index 2899adff81..76c3406d37 100644
23--- a/tools/mkimage.c
24+++ b/tools/mkimage.c
25@@ -403,14 +403,21 @@ int main(int argc, char **argv)
26 exit (EXIT_FAILURE);
27 }
28
29- /*
30- * scan through mkimage registry for all supported image types
31- * and verify the input image file header for match
32- * Print the image information for matched image type
33- * Returns the error code if not matched
34- */
35- retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
36- tparams, &params);
37+ if (params.fflag) {
38+ /*
39+ * Verifies the header format based on the expected header for
40+ * image type in tparams
41+ */
42+ retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
43+ tparams, &params);
44+ } else {
45+ /**
46+ * When listing the image, we are not given the image type. Simply check all
47+ * image types to find one that matches our header
48+ */
49+ retval = imagetool_verify_print_header(ptr, &sbuf,
50+ tparams, &params);
51+ }
52
53 (void) munmap((void *)ptr, sbuf.st_size);
54 (void) close (ifd);
55--
562.20.1
57