summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/bootloaders.scm34
-rw-r--r--gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch57
3 files changed, 16 insertions, 76 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 9228605755..33cf439870 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1422,7 +1422,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/tomb-fix-errors-on-open.patch		\
   %D%/packages/patches/tuxpaint-stamps-path.patch		\
   %D%/packages/patches/txr-shell.patch				\
-  %D%/packages/patches/u-boot-fix-mkimage-header-verification.patch	\
   %D%/packages/patches/ucx-tcp-iface-ioctl.patch		\
   %D%/packages/patches/udiskie-no-appindicator.patch		\
   %D%/packages/patches/unzip-CVE-2014-8139.patch		\
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 28ba16fb4b..0884791b27 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -402,7 +402,7 @@ tree binary files.  These are board description files used by Linux and BSD.")
 (define u-boot
   (package
     (name "u-boot")
-    (version "2019.04")
+    (version "2020.01")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -410,19 +410,17 @@ tree binary files.  These are board description files used by Linux and BSD.")
                     "u-boot-" version ".tar.bz2"))
               (sha256
                (base32
-                "1vwv4bgbl7fjcm073zrphn17hnz5h5h778f88ivdsgbb2lnpgdvn"))
-              (patches
-               (search-patches
-                "u-boot-fix-mkimage-header-verification.patch"))))
+                "1w9ml4jl15q6ixpdqzspxjnl7d3rgxd7f99ms1xv5c8869h3qida"))))
     (native-inputs
      `(("bc" ,bc)
        ("bison" ,bison)
        ("dtc" ,dtc)
        ("flex" ,flex)
        ("lz4" ,lz4)
-       ("python-2" ,python-2)
-       ("python2-coverage" ,python2-coverage)
-       ("python2-pytest" ,python2-pytest)
+       ("perl" ,perl)
+       ("python" ,python)
+       ("python-coverage" ,python-coverage)
+       ("python-pytest" ,python-pytest)
        ("sdl" ,sdl)
        ("swig" ,swig)))
     (build-system  gnu-build-system)
@@ -462,19 +460,22 @@ also initializes the boards (RAM etc).")
              (substitute* "tools/dtoc/fdt_util.py"
               (("'cc'") "'gcc'"))
              (substitute* "tools/patman/test_util.py"
-              ;; python-coverage is simply called coverage in guix.
-              (("python-coverage") "coverage")
+              ;; python*-coverage is simply called coverage in guix.
+              (("%s-coverage") "coverage")
               ;; XXX Allow for only 99% test coverage.
               ;; TODO: Find out why that is needed.
               (("if coverage != '100%':") "if not int(coverage.rstrip('%')) >= 99:"))
              (substitute* "test/run"
               ;; Make it easier to find test failures.
               (("#!/bin/bash") "#!/bin/bash -x")
-              ;; pytest doesn't find it otherwise.
-              (("test/py/tests/test_ofplatdata.py")
-               "tests/test_ofplatdata.py")
               ;; This test would require git.
               (("\\./tools/patman/patman") (which "true"))
+              ;; FIXME: test fails, needs further investiation
+              (("run_test \"binman\"") ": run_test \"binman\"")
+              ;; FIXME: code coverage not working
+              (("run_test \"binman code coverage\"") ": run_test \"binman code coverage\"")
+              (("run_test \"dtoc code coverage\"") ": run_test \"dtoc code coverage\"")
+              (("run_test \"fdt code coverage\"") ": run_test \"fdt code coverage\"")
               ;; This test would require internet access.
               (("\\./tools/buildman/buildman") (which "true")))
              (substitute* "test/py/tests/test_sandbox_exit.py"
@@ -494,14 +495,11 @@ def test_ctrl_c"))
                                   ;; This test requires a sound system, which is un-used
                                   ;; in u-boot-tools.
                                   (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
-                              (find-files "configs" "sandbox_.*defconfig$"))
+                              (find-files "configs" "sandbox_.*defconfig$|tools-only_defconfig"))
              #t))
          (replace 'configure
            (lambda* (#:key make-flags #:allow-other-keys)
-             (call-with-output-file "configs/tools_defconfig"
-               (lambda (port)
-                 (display "CONFIG_SYS_TEXT_BASE=0\n" port)))
-             (apply invoke "make" "tools_defconfig" make-flags)))
+             (apply invoke "make" "tools-only_defconfig" make-flags)))
          (replace 'build
            (lambda* (#:key inputs make-flags #:allow-other-keys)
              (apply invoke "make" "tools-all" make-flags)))
diff --git a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch b/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch
deleted file mode 100644
index 063677db4a..0000000000
--- a/gnu/packages/patches/u-boot-fix-mkimage-header-verification.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 48b52117235928cfd7ef1ec5c3f2cff5d7b03862 Mon Sep 17 00:00:00 2001
-From: Jordan Hand <jordanhand22@gmail.com>
-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 <jorhand@microsoft.com>
-Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
-Tested-by: Vagrant Cascadian <vagrant@debian.org>
----
- 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);
- 		}
- 
--		/*
--		 * 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 = imagetool_verify_print_header_by_type(ptr, &sbuf,
--				tparams, &params);
-+		if (params.fflag) {
-+			/*
-+			 * Verifies the header format based on the expected header for
-+			 * image type in tparams
-+			 */
-+			retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
-+					tparams, &params);
-+		} else {
-+			/**
-+			 * When listing the image, we are not given the image type. Simply check all
-+			 * image types to find one that matches our header
-+			 */
-+			retval = imagetool_verify_print_header(ptr, &sbuf,
-+					tparams, &params);
-+		}
- 
- 		(void) munmap((void *)ptr, sbuf.st_size);
- 		(void) close (ifd);
--- 
-2.20.1
-