emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#30013: closed ([PATCH] gnu: Add vboot-reference.)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#30013: closed ([PATCH] gnu: Add vboot-reference.)
Date: Mon, 08 Jan 2018 19:15:01 +0000

Your message dated Mon, 08 Jan 2018 20:14:35 +0100
with message-id <address@hidden>
and subject line Re: [bug#30013] [PATCH] gnu: Add vboot-reference.
has caused the debbugs.gnu.org bug report #30013,
regarding [PATCH] gnu: Add vboot-reference.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
30013: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30013
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#30013] [PATCH] gnu: Add vboot-reference. Date: Mon, 08 Jan 2018 20:14:35 +0100 User-agent: Notmuch/0.25.3 (https://notmuchmail.org) Emacs/25.3.1 (x86_64-pc-linux-gnu)
Ludovic Courtès <address@hidden> writes:

> Hi!
>
> Marius Bakke <address@hidden> skribis:
>
>> * gnu/packages/bootloaders.scm (vboot-reference): New public variable.
>
> “vboot-utils”

Whoops, good catch.

>> +       #: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")))
>
> It would be better (though more verbose) to use:
>
>   (string-append (assoc-ref inputs "coreutils") "/bin/cmp")
>
> to allow for cross-compilation, though we’d also need to add coreutils
> to ‘inputs’.  Not sure if it’s worth it, your call!

Thanks for this tip.  I packaged this for use with an ARM Chromebook, so
facilitating cross-compilation is good.  Updated!

Thanks for reviewing!

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

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