From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from eggs.gnu.org ([2001:470:142:3::10]:33577)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1j32Yp-0002aY-QI
 for guix-patches@gnu.org; Sat, 15 Feb 2020 13:53:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1j32Yo-00068q-KP
 for guix-patches@gnu.org; Sat, 15 Feb 2020 13:53:03 -0500
Received: from debbugs.gnu.org ([209.51.188.43]:58642)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1j32Yo-00068k-Hk
 for guix-patches@gnu.org; Sat, 15 Feb 2020 13:53:02 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1j32Yo-00025Y-HJ
 for guix-patches@gnu.org; Sat, 15 Feb 2020 13:53:02 -0500
Subject: [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro.
References: <87tv3rd6sz.fsf@gnu.org>
In-Reply-To: <87tv3rd6sz.fsf@gnu.org>
Resent-Message-ID: <handler.39617.B39617.15817927437977@debbugs.gnu.org>
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sat, 15 Feb 2020 19:52:08 +0100
Message-Id: <20200215185209.28334-1-janneke@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+kyle=kyleam.com@gnu.org>
To: 39617@debbugs.gnu.org

* gnu/packages/linux.scm (deblob-scripts-pinebook-pro): New function.
(linux-libre-pinebook-pro): Use it to declare new variable.
---
 gnu/packages/linux.scm | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 829bb09447..527180b522 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -872,6 +873,53 @@ It has been modified to remove all non-free binary blobs.")
                      #:defconfig "omap2plus_defconfig"
                      #:extra-version "arm-omap2plus"))
 
+;; Distribute a patched version of deblob-5.5 to accomodate for
+;; the file rename
+;;    drivers/crypto/ccp/psp-dev.c -> drivers/crypto/ccp/sev-dev.c
+(define (deblob-scripts-pinebook-pro version)
+  (list (version-major+minor version)
+        (origin
+          (method url-fetch)
+          (uri (string-append "https://lilypond.org/janneke/pinebook-pro/"
+                              "deblob-pinebook-pro-"
+                              (version-major+minor version)))
+          (file-name (string-append "deblob-" (version-major+minor version)))
+          (sha256
+           (base32 "15xpmn93mibgh3zlmbzfxx6hfk6y7vrwqc46gx7r87hrwhg0q4hj")))
+        (origin
+          (method url-fetch)
+          (uri (string-append "https://linux-libre.fsfla.org"
+                              "/pub/linux-libre/releases/" version "-gnu/"
+                              "deblob-check"))
+          (sha256
+           (base32 "12v9n7qf67vilwi2bkzbn1sbamhaw60rk79v3y2lm8bprgpy958l")))))
+
+;; This is apparently the least patched kernel (people call it "mainline",
+;; although it's not upstream), at the moment (Fri Feb 14 2020).  The exact
+;; version, branching, patchset is as yet unclear to me; the repository comes
+;; without any tags or upstream branches.
+(define-public linux-libre-pinebook-pro
+  (let* ((version "5.5.0")
+         (source
+          (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://gitlab.manjaro.org/tsys/linux-pinebook-pro.git")
+                  (commit "9564c96de3d1e7a19fbfed075333bf414fa1749f")))
+            (file-name (git-file-name "linux-libre-pinebook-pro" version))
+            (sha256
+             (base32
+              "0q4mrjvv7bpavd5r8k9njm0md0lymwcnjpd9nggb8vwffdgbchys"))))
+         (pristine-source (make-linux-libre-source
+                           "5.5.0-pinebook-pro" source
+                           (deblob-scripts-pinebook-pro version))))
+    (make-linux-libre*
+     version
+     pristine-source
+     '("aarch64-linux")
+     #:defconfig "pinebook_pro_defconfig"
+     #:extra-version "pinebook-pro")))
+
 
 ;;;
 ;;; Linux kernel modules.
-- 
2.24.0