aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2018-10-01 12:36:50 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2018-10-04 04:20:04 +0200
commit5eff43804eaed5744967f83edbaeb7ffdb77aec1 (patch)
treed603ab8da7f25ed852f4f460f3fe2baad86c93fa
parent84ae0e29fd4fea418db450aa42b611b6d90d962e (diff)
downloadguix-5eff43804eaed5744967f83edbaeb7ffdb77aec1.tar.gz
guix-5eff43804eaed5744967f83edbaeb7ffdb77aec1.zip
gnu: Add memtest86+.
* gnu/packages/hardware.scm (memtest86+): New public variable.
-rw-r--r--gnu/packages/hardware.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index f77336e504..62f6316bca 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -18,6 +18,7 @@
(define-module (gnu packages hardware)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
@@ -74,6 +75,66 @@ calibrated, and restored when the calibration is applied.")
(license (list license:bsd-3 ; FindDDCUtil.cmake
license:gpl2+)))) ; everything else
+;; Distinct from memtest86, which is obsolete.
+(define-public memtest86+
+ (package
+ (name "memtest86+")
+ ;; Update the description when/if UEFI support is released.
+ (version "5.01")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.memtest.org/download/5.01/memtest86+-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0fch1l55753y6jkk0hj8f6vw4h1kinkn9ysp22dq5g9zjnvjf88l"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:system "i686-linux" ; the result runs outside of any OS
+ #:tests? #f ; no way to test this
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (replace 'build
+ ;; The default 'make all' does wonderful things, like scp(1) a file to
+ ;; 192.168.0.12. Build the bootable images and nothing more.
+ (lambda _
+ (invoke "make"
+ "memtest" ; ELF executable
+ "memtest.bin"))) ; DOS/MBR boot sector
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/memtest86+"))
+ (doc (string-append out "/share/doc/memtest86+-" ,version)))
+ (for-each
+ (lambda (file)
+ (install-file file lib))
+ (list "memtest"
+ "memtest.bin"))
+ (for-each
+ (lambda (file)
+ (install-file file doc))
+ (list "FAQ"
+ "README"))))))))
+ (native-inputs
+ ;; Newer GCCs fail with a deluge of "multiple definition of `__foo'" errors.
+ `(("gcc" ,gcc-4.9)))
+ (supported-systems (list "i686-linux" "x86_64-linux"))
+ (home-page "https://www.memtest.org/")
+ (synopsis "Thorough real-mode memory tester")
+ (description
+ "Memtest86+ is a thorough, stand-alone memory test for x86 systems. It
+repeatedly writes different patterns to all memory locations, reads them back
+again, and verifies whether the result is the same as what was written. This
+can help debug even intermittent and non-deterministic errors.
+
+It runs independently of any operating system, at computer boot-up, so that it
+can scan as much of your RAM as possible for hardware defects.
+
+Memtest86+ cannot currently be used on computers booted with UEFI.")
+ (license license:gpl2)))
+
(define-public msr-tools
(package
(name "msr-tools")