guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#30013] [PATCH] gnu: Add vboot-reference.


From: Marius Bakke
Subject: [bug#30013] [PATCH] gnu: Add vboot-reference.
Date: Sun, 7 Jan 2018 14:05:20 +0100

* gnu/packages/bootloaders.scm (vboot-reference): New public variable.
---
 gnu/packages/bootloaders.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 613537a5d..353e2dcf0 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -41,9 +41,12 @@
   #:use-module (gnu packages mtools)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages virtualization)
+  #:use-module (gnu packages web)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -396,6 +399,68 @@ also initializes the boards (RAM etc).")
 (define-public u-boot-odroid-c2
   (make-u-boot-package "odroid-c2" "aarch64-linux-gnu"))
 
+(define-public vboot-utils
+  (package
+    (name "vboot-utils")
+    (version "R63-10032.B")
+    (source (origin
+              ;; XXX: Snapshots are available but changes timestamps every 
download.
+              (method git-fetch)
+              (uri (git-reference
+                    (url (string-append "https://chromium.googlesource.com";
+                                        
"/chromiumos/platform/vboot_reference"))
+                    (commit (string-append "release-" version))))
+              (file-name (string-append name "-" version "-checkout"))
+              (sha256
+               (base32
+                "0h0m3l69vp9dr6xrs1p6y7ilkq3jq8jraw2z20kqfv7lvc9l1lxj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list "CC=gcc"
+                          (string-append "DESTDIR=" (assoc-ref %outputs 
"out")))
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-hard-coded-paths
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (substitute* "futility/misc.c"
+                        (("/bin/cp") (which "cp")))
+                      (substitute* "tests/bitmaps/TestBmpBlock.py"
+                        (("/usr/bin/cmp") (which "cmp")))
+                      (substitute* "vboot_host.pc.in"
+                        (("prefix=/usr")
+                         (string-append "prefix=" (assoc-ref outputs "out"))))
+                      #t))
+                  (delete 'configure)
+                  (add-before 'check 'patch-tests
+                    (lambda _
+                      ;; These tests compare diffs against known-good values.
+                      ;; Patch the paths to match those in the build container.
+                      (substitute* (find-files "tests/futility/expect_output")
+                        (("/mnt/host/source/src/platform/vboot_reference")
+                         (string-append "/tmp/guix-build-" ,name "-" ,version
+                                        ".drv-0/source")))
+                      ;; Tests require write permissions to many of these 
files.
+                      (for-each make-file-writable (find-files 
"tests/futility"))
+                      #t)))
+       #:test-target "runtests"))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ;; For tests.
+       ("address@hidden" ,python-2)))
+    (inputs
+     `(("libyaml" ,libyaml)
+       ("openssl" ,openssl)
+       ("openssl:static" ,openssl "static")
+       ("util-linux" ,util-linux)))
+    (home-page
+     
"https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot";)
+    (synopsis "ChromiumOS verified boot utilities")
+    (description
+     "vboot-utils is a collection of tools to facilitate booting of
+Chrome-branded devices.  This includes the @command{cgpt} partitioning
+program, the @command{futility} and @command{crossystem} firmware management
+tools, and more.")
+    (license license:bsd-3)))
+
 (define-public os-prober
   (package
     (name "os-prober")
-- 
2.15.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]