+
+(define-public ifdtool
+ (package
+ (name "ifdtool")
+ (version "4.9")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/coreboot/coreboot.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jidj29jh6p65d17k304wlzhxvp4p3c2namgcdwg2sxq8jfr0zlm"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ "INSTALL=install"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/ifdtool")
+ #t))
+ (delete 'configure)) ; no configure script
+ #:tests? #f)) ; no test suite
+ (home-page "https://github.com/corna/me_cleaner/")
+ (synopsis "Intel Firmware Descriptor dumper")
+ (description "This package provides @command{ifdtool}, a program to
+dump Intel Firmware Descriptor data of an image file.")
+ (license license:gpl2)))
+
+(define-public intelmetool
+ (package
+ (name "intelmetool")
+ (version "4.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://review.coreboot.org/p/coreboot")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nw555i0fm5kljha9h47bk70ykbwv8ddfk6qhz6kfqb79vzhy4h2"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("pciutils" ,pciutils)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:make-flags
+ (list "CC=gcc"
+ "INSTALL=install"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/intelmetool")
+ #t))
+ (delete 'configure)
+ (delete 'check))))
+ (home-page "https://github.com/zamaudio/intelmetool")
+ (synopsis "Intel Management Engine tools")
+ (description "This package provides tools for working with Intel
+Management Engine (ME). You need to @code{sudo rmmod mei_me} and
+@code{sudo rmmod mei} before using this tool. Also pass
+@code{iomem=relaxed} to the Linux kernel command line.")
+ (license license:gpl2)
+
+ ;; This is obviously an Intel thing, plus it requires <cpuid.h>.
+ (supported-systems '("x86_64-linux" "i686-linux"))))
+
+(define-public me-cleaner
+ (package
+ (name "me-cleaner")
+ (version "1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/corna/me_cleaner.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1bdj2clm13ir441vn7sv860xsc5gh71ja5lc2wn0gggnff0adxj4"))
+ (file-name (git-file-name name version))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-documentation
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man/man1")))
+ (install-file "man/me_cleaner.1" man)
+ #t))))))
+ (home-page "https://github.com/corna/me_cleaner")
+ (synopsis "Intel ME cleaner")
+ (description "This package provides tools for disabling Intel
+ME as far as possible (it only edits ME firmware image files).")
+ (license license:gpl3+)
+
+ ;; This is an Intel thing.
+ (supported-systems '("x86_64-linux" "i686-linux"))))
+
+(define-public uefitool
+ (package
+ (name "uefitool")
+ (version "0.27.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LongSoft/UEFITool.git")
+ (commit version)))
+ (sha256
+ (base32
+ "1i1p823qld927p4f1wcphqcnivb9mq7fi5xmzibxc3g9zzgnyc2h"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (invoke "qmake" "-makefile")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "UEFITool" (string-append (assoc-ref outputs "out")
+ "/bin"))
+ #t)))))
+ (inputs
+ `(("qtbase" ,qtbase)))
+ (home-page "https://github.com/LongSoft/UEFITool/")
+ (synopsis "UEFI image editor")
+ (description "@code{uefitool} is a graphical image file editor for
+Unifinished Extensible Firmware Interface (UEFI) images.")
+ (license license:bsd-2)))