* [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro.
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
@ 2020-02-15 18:52 ` Jan Nieuwenhuizen
2020-02-15 18:52 ` [bug#39617] [PATCH 2/2] gnu: Add u-boot-pinebook-pro-rk3399 Jan Nieuwenhuizen
2020-02-20 4:04 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Vagrant Cascadian
2020-02-15 21:51 ` [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Mike Rosset
` (5 subsequent siblings)
6 siblings, 2 replies; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-15 18:52 UTC (permalink / raw)
To: 39617
* 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")))
+
\f
;;;
;;; Linux kernel modules.
--
2.24.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 2/2] gnu: Add u-boot-pinebook-pro-rk3399.
2020-02-15 18:52 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Jan Nieuwenhuizen
@ 2020-02-15 18:52 ` Jan Nieuwenhuizen
2020-02-20 4:04 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Vagrant Cascadian
1 sibling, 0 replies; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-15 18:52 UTC (permalink / raw)
To: 39617
* gnu/packages/bootloaders.scm (make-u-boot-package): Add named parameter #:u-boot.
(u-boot-pbp): New variable.
(u-boot-pinebook-pro-rk3399): Use them to create new variable.
* gnu/bootloader/u-boot.scm (install-pinebook-pro-rk3399-u-boot,
u-boot-pinebook-pro-rk3399-bootloader): New variable.
* gnu/system/examples/pinebook-pro.tmpl: New file.
---
Makefile.am | 1 +
gnu/bootloader/u-boot.scm | 11 ++++++
gnu/packages/bootloaders.scm | 45 ++++++++++++++++++++-
gnu/system/examples/pinebook-pro.tmpl | 57 +++++++++++++++++++++++++++
4 files changed, 112 insertions(+), 2 deletions(-)
create mode 100644 gnu/system/examples/pinebook-pro.tmpl
diff --git a/Makefile.am b/Makefile.am
index 7474b7f375..69c35a0478 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -345,6 +345,7 @@ EXAMPLES = \
gnu/system/examples/desktop.tmpl \
gnu/system/examples/lightweight-desktop.tmpl \
gnu/system/examples/docker-image.tmpl \
+ gnu/system/examples/pinebook-pro.tmpl \
gnu/system/examples/vm-image.tmpl
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 3e892c5475..e7683601da 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 David Craven <david@craven.ch>
;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -35,6 +36,7 @@
u-boot-pine64-plus-bootloader
u-boot-pine64-lts-bootloader
u-boot-pinebook-bootloader
+ u-boot-pinebook-pro-rk3399-bootloader
u-boot-puma-rk3399-bootloader
u-boot-rock64-rk3328-bootloader
u-boot-rockpro64-rk3399-bootloader
@@ -121,6 +123,8 @@
(write-file-on-device u-boot (stat:size (stat u-boot))
device (* 16384 512)))))
+(define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot)
+
\f
;;;
@@ -236,3 +240,10 @@
(inherit u-boot-bootloader)
(package u-boot-rockpro64-rk3399)
(installer install-rockpro64-rk3399-u-boot)))
+
+(define u-boot-pinebook-pro-rk3399-bootloader
+ ;; SD and eMMC use the same format
+ (bootloader
+ (inherit u-boot-bootloader)
+ (package u-boot-pinebook-pro-rk3399)
+ (installer install-pinebook-pro-rk3399-u-boot)))
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c072ff8c8e..a3ce4a943f 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2019 nee <nee@cock.li>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -68,7 +69,8 @@
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:use-module (ice-9 regex))
+ #:use-module (ice-9 regex)
+ #:export (make-u-boot-package))
(define unifont
;; GNU Unifont, <http://gnu.org/s/unifont>.
@@ -529,7 +531,7 @@ def test_ctrl_c"))
also initializes the boards (RAM etc). This package provides its
board-independent tools.")))
-(define-public (make-u-boot-package board triplet)
+(define* (make-u-boot-package board triplet #:key (u-boot u-boot))
"Returns a u-boot package for BOARD cross-compiled for TRIPLET."
(let ((same-arch? (lambda ()
(string=? (%current-system)
@@ -809,6 +811,45 @@ to Novena upstream, does not load u-boot.img from the first partition.")
`(("firmware" ,arm-trusted-firmware-rk3399)
,@(package-native-inputs base))))))
+(define u-boot-pbp
+ (let ((commit "365495a329c8e92ca4c134562d091df71b75845e"))
+ (package
+ (inherit u-boot)
+ (name "u-boot")
+ (version (git-version (package-version u-boot) "pinebook-pro-1" commit))
+ (source (origin
+ ;; XXX: Snapshots are available but changes timestamps every download.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.eno.space/pbp-uboot.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "092dxcvsk40fclks0lrg2caigzjhw9axjg936w5fs6aj7c0qxzjy")))))))
+
+(define-public u-boot-pinebook-pro-rk3399
+ (let ((base (make-u-boot-package "pinebook_pro-rk3399" "aarch64-linux-gnu"
+ #:u-boot u-boot-pbp)))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH" (string-join (cdr (string-split (getenv "CPATH") #\:)) ":"))
+ (setenv "BL31" (string-append (assoc-ref inputs "firmware")
+ "/bl31.elf"))
+ #t))
+ ;; Phases do not succeed on the bl31 ELF.
+ (delete 'strip)
+ (delete 'validate-runpath)))))
+ (native-inputs
+ `(("firmware" ,arm-trusted-firmware-rk3399)
+ ,@(package-native-inputs base))))))
+
(define-public vboot-utils
(package
(name "vboot-utils")
diff --git a/gnu/system/examples/pinebook-pro.tmpl b/gnu/system/examples/pinebook-pro.tmpl
new file mode 100644
index 0000000000..ca27728b15
--- /dev/null
+++ b/gnu/system/examples/pinebook-pro.tmpl
@@ -0,0 +1,57 @@
+;; This is an operating system configuration template
+;; for a "bare bones" pinebook pro
+
+;; The default image's kernel 4.4.190 has
+;; microSD: /dev/mmcblk0
+;; eMMC: /dev/mmcblk1
+;;
+;; Note that after booting the Guix System with linux-libre
+;; 5.5-pinebook-pro this changes to
+;; microSD: /dev/mmcblk1
+;; eMMC: /dev/mmcblk2
+
+;; Assuming https://gitlab.com/janneke/guix.git wip-pinebook-pro
+;; has been built in .
+;; cp gnu/system/examples/pinebook-pro.tmpl arm-baar.scm
+;; sudo -E ./pre-inst-env guix system init arm-baar.scm /mnt --fallback
+
+(use-modules (gnu) (gnu bootloader u-boot))
+(use-service-modules avahi networking ssh)
+(use-package-modules admin bootloaders certs linux ssh)
+
+(operating-system
+ (host-name "armzalig")
+ (timezone "Europe/Amsterdam")
+ (locale "en_US.utf8")
+
+ ;; Assuming not using a typewriter that needs qwerty slowdown
+ (keyboard-layout (keyboard-layout "us" "dvorak"
+ #:options '("ctrl:nocaps" "compose:menu")))
+
+ ;; Assuming /dev/mmcblk0 is the microSD...
+ (bootloader (bootloader-configuration
+ (target "/dev/mmcblk0")
+ (bootloader u-boot-pinebook-pro-rk3399-bootloader)))
+ ;; ...and /dev/mmcblk0p1 is the root file system
+ (file-systems (cons* (file-system (device "/dev/mmcblk1p1")
+ (mount-point "/")
+ (type "ext4"))
+ %base-file-systems))
+
+ (kernel linux-libre-pinebook-pro)
+ (kernel-arguments '("ethaddr=${ethaddr}" "eth1addr=${eth1addr}" "serial=${serial#}"
+ "video=HDMI-A-1:1920x1080@60" "video=eDP-1:1920x1080@60"
+ "vga=current"))
+ (initrd-modules '())
+
+ (users (cons* (user-account (name "guix")
+ (group "users")
+ (supplementary-groups '("wheel")))
+ %base-user-accounts))
+ (name-service-switch %mdns-host-lookup-nss)
+ (packages (cons* nss-certs openssh wpa-supplicant-minimal %base-packages))
+ (services (cons* (service dhcp-client-service-type)
+ (service openssh-service-type
+ (openssh-configuration
+ (port-number 2222)))
+ %base-services)))
--
2.24.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro.
2020-02-15 18:52 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Jan Nieuwenhuizen
2020-02-15 18:52 ` [bug#39617] [PATCH 2/2] gnu: Add u-boot-pinebook-pro-rk3399 Jan Nieuwenhuizen
@ 2020-02-20 4:04 ` Vagrant Cascadian
2020-02-20 6:26 ` Jan Nieuwenhuizen
1 sibling, 1 reply; 19+ messages in thread
From: Vagrant Cascadian @ 2020-02-20 4:04 UTC (permalink / raw)
To: Jan Nieuwenhuizen, 39617; +Cc: Danny Milosavljevic, Mike Rosset
Successfully booted! Thanks for your work on this! This is the first
time I've ever booted a new machine with Guix rather than Debian
proper. :)
Also the very first time I bootstrapped a Guix system from the guix
packages built for Debian! Need to just go ahead and upload those soon.
relatively minor issue below:
On 2020-02-15, Jan Nieuwenhuizen wrote:
> +;; 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)
...
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://linux-libre.fsfla.org"
> + "/pub/linux-libre/releases/" version "-gnu/"
> + "deblob-check"))
I had to change version to download deblob-check to "5.5.1" as
apparently the 5.5.0 version was removed from (or never present on)
linux-libre.fsfla.org.
live well,
vagrant
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro.
2020-02-20 4:04 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Vagrant Cascadian
@ 2020-02-20 6:26 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-20 6:26 UTC (permalink / raw)
To: Vagrant Cascadian; +Cc: 39617, Mike Rosset, Danny Milosavljevic
Vagrant Cascadian writes:
> Successfully booted! Thanks for your work on this! This is the first
> time I've ever booted a new machine with Guix rather than Debian
> proper. :)
\o/
> Also the very first time I bootstrapped a Guix system from the guix
> packages built for Debian! Need to just go ahead and upload those soon.
>
> relatively minor issue below:
>
> On 2020-02-15, Jan Nieuwenhuizen wrote:
>> +;; 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)
> ...
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append "https://linux-libre.fsfla.org"
>> + "/pub/linux-libre/releases/" version "-gnu/"
>> + "deblob-check"))
>
> I had to change version to download deblob-check to "5.5.1" as
> apparently the 5.5.0 version was removed from (or never present on)
> linux-libre.fsfla.org.
Hmm; could be anything -- I'm hoping that we can move to a released
tarball + patches some time soon anyway; this one of th ugly bits.
Please feel free to push a fix!
Greetings
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
2020-02-15 18:52 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Jan Nieuwenhuizen
@ 2020-02-15 21:51 ` Mike Rosset
2020-02-16 18:19 ` Danny Milosavljevic
` (4 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Mike Rosset @ 2020-02-15 21:51 UTC (permalink / raw)
To: 39617; +Cc: vagrant, dannym
Jan Nieuwenhuizen writes:
> Hello ARM Gurus!
>
> These patches add initial Pinebook Pro support. There are several rough edges,
> your help would be much appreciated!
Hello Jan,
Thank you for working on this. I have not received my pinebook pro yet,
it should be here sometime this month. I will try to help with this once
it I have received it.
Mike
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
2020-02-15 18:52 ` [bug#39617] [PATCH 1/2] gnu: Add linux-libre-pinebook-pro Jan Nieuwenhuizen
2020-02-15 21:51 ` [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Mike Rosset
@ 2020-02-16 18:19 ` Danny Milosavljevic
2020-02-16 18:22 ` Danny Milosavljevic
` (3 more replies)
2020-02-16 18:21 ` [bug#39617] Fw: " Danny Milosavljevic
` (3 subsequent siblings)
6 siblings, 4 replies; 19+ messages in thread
From: Danny Milosavljevic @ 2020-02-16 18:19 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: vagrant, 39617
[-- Attachment #1: Type: text/plain, Size: 2729 bytes --]
Hi Janneke,
On Sat, 15 Feb 2020 19:49:48 +0100
Jan Nieuwenhuizen <janneke@gnu.org> wrote:
> A vanilla kernel does not work yet; apparently development to upstream
> pinebook-pro patches lives here:
> https://gitlab.manjaro.org/tsys/linux-pinebook-pro
Yeah, but LKML has some of the patches there in review, for example:
* http://lkml.iu.edu/hypermail/linux/kernel/2001.1/01899.html (already accepted)
* https://patchwork.kernel.org/patch/11325531/ (pending changes)
[...]
* https://www.spinics.net/lists/kernel/msg3367972.html (pending changes)
So all in all I think the Pinebook Pro will eventually work with the vanilla kernel.
> Similarly, Das U-Boot has a pinebook-pro development branch
> https://git.eno.space/pbp-uboot.git
(Not so sure whether that one will be upstreamed)
> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,' /boot/extlinux/extlinux.conf
It might make sense to find out why this is necessary.
https://lists.denx.de/pipermail/u-boot/2014-January/171682.html describes that it
should be possible to set up u-boot environment variables (in uEnv.txt) to make
it find the correct FDT file anyway. If none is set up, it automatically generates
the file name to use using $soc and $board. But that's for PXE booting
(booting empty machine via network)--not sure where the normal case is in U-Boot,
if any. U-Boot sometimes has some weird blind spots like that.
Also, https://lists.denx.de/pipermail/u-boot/2016-May/254703.html kinda
sounds like they dont support subdirs. Wanna try adding "/rockchip" to the
end of FDTDIR in extlinux.conf ?
Also, what's the value of CONFIG_[DEFAULT_]DEVICE_TREE in your u-boot
configuration?
> --8<---------------cut here---------------end--------------->8---
>
> Because of the aarch64 guix pull problem, the separate repositories for
> kernel and u-boot, the weird MMC numbering changes /dev/mmcblk0 <->
> /dev/mmcblk1 and this ugly extlinux.conf fixup I am not sure where to
> share this code, maybe wip-pinebook-pro @ savannah. WDYT?
I'm all for wip-pinebook-pro @ savannah, especially before losing a now-working
version by hacking further on it. Been there done that :)
If you want we can collaborate in the next days on finding the cause of
the weird FDT problem.
> For more details, see
>
> https://joyofsource.com/guix-system-on-the-pinebook-pro.html
>
> I think it would be nice to have an updated this blog on guix.gnu.org when
> these silly problems are resolved.
Sure!
As a general remark, make-u-boot-package was not public because
I didn't want to commit to its interface yet.
I think we don't need to export it even now. (We can if we have to)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-16 18:19 ` Danny Milosavljevic
@ 2020-02-16 18:22 ` Danny Milosavljevic
2020-02-16 19:04 ` Jan Nieuwenhuizen
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Danny Milosavljevic @ 2020-02-16 18:22 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: vagrant, 39617
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Hmm, CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
Should be fine then.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-16 18:19 ` Danny Milosavljevic
2020-02-16 18:22 ` Danny Milosavljevic
@ 2020-02-16 19:04 ` Jan Nieuwenhuizen
2020-02-20 4:12 ` Vagrant Cascadian
2020-02-28 1:03 ` Vagrant Cascadian
3 siblings, 0 replies; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-16 19:04 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: vagrant, 39617
Danny Milosavljevic writes:
Hi Danny,
>> A vanilla kernel does not work yet; apparently development to upstream
>> pinebook-pro patches lives here:
>> https://gitlab.manjaro.org/tsys/linux-pinebook-pro
>
> Yeah, but LKML has some of the patches there in review, for example:
>
> * http://lkml.iu.edu/hypermail/linux/kernel/2001.1/01899.html (already accepted)
> * https://patchwork.kernel.org/patch/11325531/ (pending changes)
> [...]
> * https://www.spinics.net/lists/kernel/msg3367972.html (pending changes)
>
> So all in all I think the Pinebook Pro will eventually work with the vanilla kernel.
Oh, great! I was pretty lost about all this. I finally got some
feedback on this; I'll update my post. I was told "use mainline Manjaro
kernel here, take branch v5.5". I did that but got confused a bit by
the lack of any tags. I fetched tags from linus and got
git describe => v5.5-5246-g9564c96de3d1
WTF? Just today I looked at v5.5-rc7, an older manjaro branch and saw
git describe => v5.5-rc7-75-g2335a564ec8f
Then, I found that the v5.5 branch has probably ~85 extra commits. We
could try applying those patches onto a recent kernel, v5.5 or v5.6
(when it's released?).
>> Similarly, Das U-Boot has a pinebook-pro development branch
>> https://git.eno.space/pbp-uboot.git
>
> (Not so sure whether that one will be upstreamed)
Okay, I'm also not sure yet if this is required; but I'm glad it works
now and we can work from here.
>> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,' /boot/extlinux/extlinux.conf
>
> It might make sense to find out why this is necessary.
>
> https://lists.denx.de/pipermail/u-boot/2014-January/171682.html describes that it
> should be possible to set up u-boot environment variables (in uEnv.txt) to make
> it find the correct FDT file anyway. If none is set up, it automatically generates
> the file name to use using $soc and $board. But that's for PXE booting
> (booting empty machine via network)--not sure where the normal case is in U-Boot,
> if any. U-Boot sometimes has some weird blind spots like that.
Ah, possibly some softcoding mechanism like this (we use a patched
u-boot!) is going astray. Hmm.
> Also, https://lists.denx.de/pipermail/u-boot/2016-May/254703.html kinda
> sounds like they dont support subdirs. Wanna try adding "/rockchip" to the
> end of FDTDIR in extlinux.conf ?
> Also, what's the value of CONFIG_[DEFAULT_]DEVICE_TREE in your u-boot
> configuration?
I am pretty sure it is
$ grep DEFAULT_FDT /gnu/store/zxb488q5l9c6j5pnazvp5s30z1p18gnm-u-boot-pinebook-pro-rk3399-2020.01-pinebook-pro-1.365495a/libexec/.config
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb"
So yeah, strange.
>> Because of the aarch64 guix pull problem, the separate repositories for
>> kernel and u-boot, the weird MMC numbering changes /dev/mmcblk0 <->
>> /dev/mmcblk1 and this ugly extlinux.conf fixup I am not sure where to
>> share this code, maybe wip-pinebook-pro @ savannah. WDYT?
>
> I'm all for wip-pinebook-pro @ savannah, especially before losing a now-working
> version by hacking further on it. Been there done that :)
Okay, pushed!
> If you want we can collaborate in the next days on finding the cause of
> the weird FDT problem.
Ah thank you...that would (have been???) so nice. This morning, my
pinebook pro did not want to start and hasn't all day. :-( :-( :-(
Could running a wrong kernel brick the thing, I don't think so...but
I'm pretty lost. I'll wait a couple of days to see if it comes to life
again.
>> For more details, see
>>
>> https://joyofsource.com/guix-system-on-the-pinebook-pro.html
>>
>> I think it would be nice to have an updated this blog on guix.gnu.org when
>> these silly problems are resolved.
>
> Sure!
>
> As a general remark, make-u-boot-package was not public because
> I didn't want to commit to its interface yet.
> I think we don't need to export it even now. (We can if we have to)
Ah; I needed that before when I had a separate pinebook-pro.scm; and may
have kept the export... Sure, let's remove it if it's not needed.
Greetings,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-16 18:19 ` Danny Milosavljevic
2020-02-16 18:22 ` Danny Milosavljevic
2020-02-16 19:04 ` Jan Nieuwenhuizen
@ 2020-02-20 4:12 ` Vagrant Cascadian
2020-02-20 6:29 ` Jan Nieuwenhuizen
2020-02-28 1:03 ` Vagrant Cascadian
3 siblings, 1 reply; 19+ messages in thread
From: Vagrant Cascadian @ 2020-02-20 4:12 UTC (permalink / raw)
To: Danny Milosavljevic, Jan Nieuwenhuizen; +Cc: 39617
On 2020-02-16, Danny Milosavljevic wrote:
> On Sat, 15 Feb 2020 19:49:48 +0100
> Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,' /boot/extlinux/extlinux.conf
I didn't do this manually and mine booted without it; is this
implemented in the patches directly?
> It might make sense to find out why this is necessary.
>
> https://lists.denx.de/pipermail/u-boot/2014-January/171682.html describes that it
> should be possible to set up u-boot environment variables (in uEnv.txt) to make
> it find the correct FDT file anyway.
uEnv.txt is not necessarily widely supported; some arbitrary boards
implement it, but I wouldn't rely on it.
live well,
vagrant
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-20 4:12 ` Vagrant Cascadian
@ 2020-02-20 6:29 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-20 6:29 UTC (permalink / raw)
To: Vagrant Cascadian; +Cc: Danny Milosavljevic, 39617
Vagrant Cascadian writes:
> On 2020-02-16, Danny Milosavljevic wrote:
>> On Sat, 15 Feb 2020 19:49:48 +0100
>> Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>>> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,' /boot/extlinux/extlinux.conf
>
> I didn't do this manually and mine booted without it; is this
> implemented in the patches directly?
The need for this was a big puzzle to me -- I have no idea what happened
ovor at my side. Could it be a firmware thing, you may have an earlier
badge?
I did build some packages on an intel box, possibly using qemu; as soon
as I have a working pinebook again I'll try to do a whole fresh install.
Thanks!
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-16 18:19 ` Danny Milosavljevic
` (2 preceding siblings ...)
2020-02-20 4:12 ` Vagrant Cascadian
@ 2020-02-28 1:03 ` Vagrant Cascadian
3 siblings, 0 replies; 19+ messages in thread
From: Vagrant Cascadian @ 2020-02-28 1:03 UTC (permalink / raw)
To: Danny Milosavljevic, Jan Nieuwenhuizen; +Cc: 39617
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
On 2020-02-16, Danny Milosavljevic wrote:
> On Sat, 15 Feb 2020 19:49:48 +0100
> Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
>> A vanilla kernel does not work yet; apparently development to upstream
>> pinebook-pro patches lives here:
>> https://gitlab.manjaro.org/tsys/linux-pinebook-pro
>
> Yeah, but LKML has some of the patches there in review, for example:
>
> * http://lkml.iu.edu/hypermail/linux/kernel/2001.1/01899.html (already accepted)
> * https://patchwork.kernel.org/patch/11325531/ (pending changes)
> [...]
> * https://www.spinics.net/lists/kernel/msg3367972.html (pending changes)
>
> So all in all I think the Pinebook Pro will eventually work with the vanilla kernel.
Updated patches were sent today (by the same person working on the
manjaro kernel, I think):
https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=248535
>> Similarly, Das U-Boot has a pinebook-pro development branch
>> https://git.eno.space/pbp-uboot.git
>
> (Not so sure whether that one will be upstreamed)
I think the upstreaming for pinebook pro is delayed on the device tree
landing in upstream linux... Peter Robinson sent a patch series that
kind of worked for me, though I didn't yet have a working kernel at the
time to test:
https://patchwork.ozlabs.org/project/uboot/list/?series=142716&state=*
Combining that with the newer device-tree patches submitted to linux
might be fruitful!
I haven't done any recent tests, largely due to the issue with "guix
pull" being broken on aarch64... might only have limited ability to test
things the next week or so, or might just get a wild hair and go for it.
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] Fw: [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
` (2 preceding siblings ...)
2020-02-16 18:19 ` Danny Milosavljevic
@ 2020-02-16 18:21 ` Danny Milosavljevic
2020-02-16 18:27 ` [bug#39617] " Danny Milosavljevic
` (2 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Danny Milosavljevic @ 2020-02-16 18:21 UTC (permalink / raw)
To: 39617
[-- Attachment #1: Type: text/plain, Size: 2739 bytes --]
Hi Janneke,
On Sat, 15 Feb 2020 19:49:48 +0100
Jan Nieuwenhuizen <janneke@gnu.org> wrote:
> A vanilla kernel does not work yet; apparently development to upstream
> pinebook-pro patches lives here:
> https://gitlab.manjaro.org/tsys/linux-pinebook-pro
Yeah, but LKML has some of the patches there in review, for example:
* http://lkml.iu.edu/hypermail/linux/kernel/2001.1/01899.html (already accepted)
* https://patchwork.kernel.org/patch/11325531/ (pending changes)
[...]
* https://www.spinics.net/lists/kernel/msg3367972.html (pending changes)
So all in all I think the Pinebook Pro will eventually work with the vanilla kernel.
> Similarly, Das U-Boot has a pinebook-pro development branch
> https://git.eno.space/pbp-uboot.git
(Not so sure whether that one will be upstreamed)
> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,' /boot/extlinux/extlinux.conf
It might make sense to find out why this is necessary.
https://lists.denx.de/pipermail/u-boot/2014-January/171682.html describes that it
should be possible to set up u-boot environment variables (in uEnv.txt) to make
it find the correct FDT file anyway. If none is set up, it automatically generates
the file name to use using $soc and $board. But that's for PXE booting
(booting empty machine via network)--not sure where the normal case is in U-Boot,
if any. U-Boot sometimes has some weird blind spots like that.
Also, https://lists.denx.de/pipermail/u-boot/2016-May/254703.html kinda
sounds like they dont support subdirs. Wanna try adding "/rockchip" to the
end of FDTDIR in extlinux.conf ?
Also, what's the value of CONFIG_[DEFAULT_]DEVICE_TREE in your u-boot
configuration?
> --8<---------------cut here---------------end--------------->8---
>
> Because of the aarch64 guix pull problem, the separate repositories for
> kernel and u-boot, the weird MMC numbering changes /dev/mmcblk0 <->
> /dev/mmcblk1 and this ugly extlinux.conf fixup I am not sure where to
> share this code, maybe wip-pinebook-pro @ savannah. WDYT?
I'm all for wip-pinebook-pro @ savannah, especially before losing a now-working
version by hacking further on it. Been there done that :)
If you want we can collaborate in the next days on finding the cause of
the weird FDT problem.
> For more details, see
>
> https://joyofsource.com/guix-system-on-the-pinebook-pro.html
>
> I think it would be nice to have an updated this blog on guix.gnu.org when
> these silly problems are resolved.
Sure!
As a general remark, make-u-boot-package was not public because
I didn't want to commit to its interface yet.
I think we don't need to export it even now. (We can if we have to)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
` (3 preceding siblings ...)
2020-02-16 18:21 ` [bug#39617] Fw: " Danny Milosavljevic
@ 2020-02-16 18:27 ` Danny Milosavljevic
2020-02-18 21:48 ` Danny Milosavljevic
2020-05-20 6:29 ` Brian Woodcox
2020-05-20 6:29 ` Brian Woodcox
6 siblings, 1 reply; 19+ messages in thread
From: Danny Milosavljevic @ 2020-02-16 18:27 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: Vagrant Cascadian, 39617
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
Hi Janneke,
>[0]: A difficulty here is that the Pinebook Pro currently does not want to show
>a U-Boot prompt, command line or debug output. If you consider to buy one, you
>may want to also order a serial cable that might help debugging the boot
>sequence.
Could you file a bug report upstream?
It should be possible (and much less weird) for the vendor to just enable the
TFT display in u-boot and display stuff there.
(linux-sunxi, the dev group for another ARM SoC vendor, does it just fine in
mainline u-boot--so it is possible and can maybe be copied)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-16 18:27 ` [bug#39617] " Danny Milosavljevic
@ 2020-02-18 21:48 ` Danny Milosavljevic
0 siblings, 0 replies; 19+ messages in thread
From: Danny Milosavljevic @ 2020-02-18 21:48 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: Vagrant Cascadian, 39617
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
Hi Janneke,
On Sun, 16 Feb 2020 19:27:41 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:
> It should be possible (and much less weird) for the vendor to just enable the
> TFT display in u-boot and display stuff there.
>
> (linux-sunxi, the dev group for another ARM SoC vendor, does it just fine in
> mainline u-boot--so it is possible and can maybe be copied)
I came across an example u-boot configuration for LCD screen:
https://github.com/Openvario/meta-openvario/blob/warrior/recipes-bsp/u-boot/files/openvario-57-lvds/openvario_defconfig
especially
CONFIG_VIDEO_LCD_MODE="x:640,y:480,depth:18,pclk_khz:25000,hs:1,vs:1,le:157,ri:2,up:42,lo:2,sync:3,vmode:0"
CONFIG_VIDEO_LCD_PANEL_LVDS=y
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_VIDEO_LCD_BL_PWM_ACTIVE_LOW=n
We'd still need to get the timing parameters (CONFIG_VIDEO_LCD_MODE) for the Pinebook Pro (from the panel datasheet).
And that's if that thing is connected via LVDS in the first place.
But that's all moot if your Pinebook Pro is bricked for good.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
` (4 preceding siblings ...)
2020-02-16 18:27 ` [bug#39617] " Danny Milosavljevic
@ 2020-05-20 6:29 ` Brian Woodcox
2020-05-20 7:15 ` Jan Nieuwenhuizen
2020-05-20 6:29 ` Brian Woodcox
6 siblings, 1 reply; 19+ messages in thread
From: Brian Woodcox @ 2020-05-20 6:29 UTC (permalink / raw)
To: 39617; +Cc: janneke
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
Regarding this issue:
sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,'
I only ran into this issue with a few newer Pinebook Pro’s
It turns out the stock Debian’s u-boot on the emmc is causing the boot process to look for rockchip-evb_rk3399.dtb.
For example if you install the Manjaro u-boot files to the emmc, this problem goes away.
That’s why only some of us encounter this problem and others do not.
Brian.
[-- Attachment #2: Type: text/html, Size: 1196 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-05-20 6:29 ` Brian Woodcox
@ 2020-05-20 7:15 ` Jan Nieuwenhuizen
2020-05-20 16:06 ` Brian Woodcox
0 siblings, 1 reply; 19+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-20 7:15 UTC (permalink / raw)
To: Brian Woodcox; +Cc: 39617
Brian Woodcox writes:
> Regarding this issue:
> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,'
> I only ran into this issue with a few newer Pinebook Pro’s
> It turns out the stock Debian’s u-boot on the emmc is causing the boot process to look for rockchip-evb_rk3399.dtb.
> For example if you install the Manjaro u-boot files to the emmc, this problem goes away.
> That’s why only some of us encounter this problem and others do not.
Ah, that's great! You tried several? I'm still hoping that pine64 will
some day handle my zoho support ticket about my bricked pinebook pro :-(
Greetings,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-05-20 7:15 ` Jan Nieuwenhuizen
@ 2020-05-20 16:06 ` Brian Woodcox
0 siblings, 0 replies; 19+ messages in thread
From: Brian Woodcox @ 2020-05-20 16:06 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: 39617
Yes, I have 4 in total.
I’m teaching 3 of my 4 children programming and guix. Or at least that’s the plan.
I have loaded guix system on their SD cards, so that they can boot and also re-configure works. Yay!
We have Icecat installed on all the laptops. Graphics acceleration with Xfce.
I’ve learned a lot about Guix myself in the past number of weeks.
So far a happy camper.
Brian.
> On May 20, 2020, at 1:15 AM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>
> Brian Woodcox writes:
>
>> Regarding this issue:
>
>> sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,'
>> I only ran into this issue with a few newer Pinebook Pro’s
>> It turns out the stock Debian’s u-boot on the emmc is causing the boot process to look for rockchip-evb_rk3399.dtb.
>> For example if you install the Manjaro u-boot files to the emmc, this problem goes away.
>> That’s why only some of us encounter this problem and others do not.
>
> Ah, that's great! You tried several? I'm still hoping that pine64 will
> some day handle my zoho support ticket about my bricked pinebook pro :-(
>
> Greetings,
> janneke
>
> --
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support
2020-02-15 18:49 [bug#39617] [PATCH 0/2] Add initial Pinebook Pro support Jan Nieuwenhuizen
` (5 preceding siblings ...)
2020-05-20 6:29 ` Brian Woodcox
@ 2020-05-20 6:29 ` Brian Woodcox
6 siblings, 0 replies; 19+ messages in thread
From: Brian Woodcox @ 2020-05-20 6:29 UTC (permalink / raw)
To: 39617; +Cc: janneke
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
Regarding this issue:
sudo sed 's,FDTDIR \([^ ]*\),FDT \1/rockchip/rk3399-pinebook-pro.dtb,'
I only ran into this issue with a few newer Pinebook Pro’s
It turns out the stock Debian’s u-boot on the emmc is causing the boot process to look for rockchip-evb_rk3399.dtb.
For example if you install the Manjaro u-boot files to the emmc, this problem goes away.
That’s why only some of us encounter this problem and others do not.
Brian.
[-- Attachment #2: Type: text/html, Size: 1196 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread