* Distributing Guix System Pinebook Pro images @ 2021-08-29 9:09 Mathieu Othacehe 2021-08-29 15:16 ` Maxim Cournoyer ` (3 more replies) 0 siblings, 4 replies; 11+ messages in thread From: Mathieu Othacehe @ 2021-08-29 9:09 UTC (permalink / raw) To: guix-devel Hello, The Guix website now offers Pinebook Pro Guix System images[1]. Those images can be directly copied on a micro-SD card and booted from. More details here[2]. Thanks, Mathieu [1]: https://guix.gnu.org/en/download/latest/ [2]: https://othacehe.org/distributing-guix-system-pinebook-pro-images.html. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 9:09 Distributing Guix System Pinebook Pro images Mathieu Othacehe @ 2021-08-29 15:16 ` Maxim Cournoyer 2021-08-29 20:15 ` Vagrant Cascadian ` (2 subsequent siblings) 3 siblings, 0 replies; 11+ messages in thread From: Maxim Cournoyer @ 2021-08-29 15:16 UTC (permalink / raw) To: Mathieu Othacehe; +Cc: guix-devel Hi Mathieu, Mathieu Othacehe <othacehe@gnu.org> writes: > Hello, > > The Guix website now offers Pinebook Pro Guix System images[1]. Those > images can be directly copied on a micro-SD card and booted from. More > details here[2]. > > Thanks, > > Mathieu > > [1]: https://guix.gnu.org/en/download/latest/ > [2]: https://othacehe.org/distributing-guix-system-pinebook-pro-images.html. Very neat! Well done! Maxim ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 9:09 Distributing Guix System Pinebook Pro images Mathieu Othacehe 2021-08-29 15:16 ` Maxim Cournoyer @ 2021-08-29 20:15 ` Vagrant Cascadian 2021-08-29 20:41 ` Vagrant Cascadian 2021-08-30 11:00 ` Efraim Flashner 2021-08-30 9:52 ` Mathieu Othacehe 2021-08-30 14:37 ` Katherine Cox-Buday 3 siblings, 2 replies; 11+ messages in thread From: Vagrant Cascadian @ 2021-08-29 20:15 UTC (permalink / raw) To: Mathieu Othacehe, guix-devel [-- Attachment #1: Type: text/plain, Size: 914 bytes --] On 2021-08-29, Mathieu Othacehe wrote: > The Guix website now offers Pinebook Pro Guix System images[1]. Those > images can be directly copied on a micro-SD card and booted from. More > details here[2]. It seems like I need to write up a hybrid pinebook/pinebook-pro bootloader definition, then that image could support *two* whole platforms. :) It also shouldn't be *too* hard to add support for UEFI too... Started a discussion about this in June: https://lists.gnu.org/archive/html/guix-devel/2021-06/msg00036.html And recently gave a talk describing this approach for Debian: https://salsa.debian.org/vagrant/two-pinebooks-walk-into-a-bar https://debconf21.debconf.org/talks/88-two-pinebooks-walk-into-a-bar/ Not sure how soon the video will be available, but the talk had technical difficulties at the start, so I hope to get a chance to do it all over again someday. :) live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 20:15 ` Vagrant Cascadian @ 2021-08-29 20:41 ` Vagrant Cascadian 2021-08-30 11:07 ` Efraim Flashner 2021-08-30 11:00 ` Efraim Flashner 1 sibling, 1 reply; 11+ messages in thread From: Vagrant Cascadian @ 2021-08-29 20:41 UTC (permalink / raw) To: Mathieu Othacehe, guix-devel [-- Attachment #1: Type: text/plain, Size: 2394 bytes --] On 2021-08-29, Vagrant Cascadian wrote: > On 2021-08-29, Mathieu Othacehe wrote: >> The Guix website now offers Pinebook Pro Guix System images[1]. Those >> images can be directly copied on a micro-SD card and booted from. More >> details here[2]. > > It seems like I need to write up a hybrid pinebook/pinebook-pro > bootloader definition, then that image could support *two* whole > platforms. :) Something like this, but that is valid guile and actually works :) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 6cad33b741..325618c5c5 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -127,6 +127,28 @@ (define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot) +(define install-pinebook-and-pinebook-pro-u-boot + ;; Install bootloaders for both pinebook pro and pinebook at compatible + ;; offsets. + ;; + ;; pinebook pro + #~(lambda (bootloader-pinebook-pro root-index image) + (let ((idb (string-append bootloader-pinebook-pro "/libexec/idbloader.img")) + (u-boot (string-append bootloader-pinebook-pro "/libexec/u-boot.itb"))) + ;; Use alternate offset of 2112 to avoid conflicts with pinebook + (write-file-on-device idb (stat:size (stat idb)) + image (* 2112 512)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + image (* 16384 512)))) + ;; pinebook + #~(lambda (bootloader-pinebook root-index image) + (let ((spl (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.bin")) + (u-boot (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.fit.itb"))) + (write-file-on-device spl (stat:size (stat spl)) + image (* 8 1024)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + image (* 40 1024))))) + \f ;;; @@ -255,3 +277,9 @@ (inherit u-boot-bootloader) (package u-boot-pinebook-pro-rk3399) (disk-image-installer install-pinebook-pro-rk3399-u-boot))) + +(define u-boot-pinebook-and-pinebook-pro-bootloader + (bootloader + (inherit u-boot-bootloader) + (packages '(u-boot-pinebook-pro-rk3399 u-boot-pinebook)) + (disk-image-installer install-pinebook-and-pinebook-pro-uboot))) live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 20:41 ` Vagrant Cascadian @ 2021-08-30 11:07 ` Efraim Flashner 0 siblings, 0 replies; 11+ messages in thread From: Efraim Flashner @ 2021-08-30 11:07 UTC (permalink / raw) To: Vagrant Cascadian; +Cc: guix-devel, Mathieu Othacehe [-- Attachment #1: Type: text/plain, Size: 4205 bytes --] On Sun, Aug 29, 2021 at 01:41:06PM -0700, Vagrant Cascadian wrote: > On 2021-08-29, Vagrant Cascadian wrote: > > On 2021-08-29, Mathieu Othacehe wrote: > >> The Guix website now offers Pinebook Pro Guix System images[1]. Those > >> images can be directly copied on a micro-SD card and booted from. More > >> details here[2]. > > > > It seems like I need to write up a hybrid pinebook/pinebook-pro > > bootloader definition, then that image could support *two* whole > > platforms. :) > > Something like this, but that is valid guile and actually works :) I've been looking at this a bit since I'm actually nearing the point of having something to write for the HiFive Unmatched. write-file-on-device can be called multiple times, we've only needed it twice for all the other cases though. > diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm > index 6cad33b741..325618c5c5 100644 > --- a/gnu/bootloader/u-boot.scm > +++ b/gnu/bootloader/u-boot.scm > @@ -127,6 +127,28 @@ > > (define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot) > > +(define install-pinebook-and-pinebook-pro-u-boot > + ;; Install bootloaders for both pinebook pro and pinebook at compatible > + ;; offsets. > + ;; > + ;; pinebook pro > + #~(lambda (bootloader-pinebook-pro root-index image) > + (let ((idb (string-append bootloader-pinebook-pro "/libexec/idbloader.img")) > + (u-boot (string-append bootloader-pinebook-pro "/libexec/u-boot.itb"))) > + ;; Use alternate offset of 2112 to avoid conflicts with pinebook > + (write-file-on-device idb (stat:size (stat idb)) > + image (* 2112 512)) > + (write-file-on-device u-boot (stat:size (stat u-boot)) > + image (* 16384 512)))) > + ;; pinebook > + #~(lambda (bootloader-pinebook root-index image) > + (let ((spl (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.bin")) > + (u-boot (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.fit.itb"))) > + (write-file-on-device spl (stat:size (stat spl)) > + image (* 8 1024)) > + (write-file-on-device u-boot (stat:size (stat u-boot)) > + image (* 40 1024))))) This could probably be (very untested) (define install-pinebook-and-pinebook-pro-u-boot ;; Install bootloaders for both the pinebook and pinebook pro at compatible ;; offsets. #~(lambda (bootloader-pinebook-pro root-index image) (let ((spl (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.bin")) (u-boot (string-append bootloader-pinebook "/libexec/u-boot-sunxi-with-spl.fit.itb")) (idb (string-append bootloader-pinebook-pro "/libexec/idbloader.img")) (u-boot-pro (string-append bootloader-pinebook-pro "/libexec/u-boot.itb"))) (write-file-on-device spl (stat:size (stat spl)) image (* 8 1024)) (write-file-on-device u-boot (stat:size (stat u-boot)) image (* 40 1024)) ;; Use alternate offset of 2112 to avoid conflicts with pinebook (write-file-on-device idb (stat:size (stat idb)) image (* 2112 512)) (write-file-on-device u-boot (stat:size (stat u-boot-pro)) image (* 16384 512))))) > > > ;;; > @@ -255,3 +277,9 @@ > (inherit u-boot-bootloader) > (package u-boot-pinebook-pro-rk3399) > (disk-image-installer install-pinebook-pro-rk3399-u-boot))) > + > +(define u-boot-pinebook-and-pinebook-pro-bootloader > + (bootloader > + (inherit u-boot-bootloader) not sure what to do with this one though > + (packages '(u-boot-pinebook-pro-rk3399 u-boot-pinebook)) > + (disk-image-installer install-pinebook-and-pinebook-pro-uboot))) > > > live well, > vagrant -- Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 20:15 ` Vagrant Cascadian 2021-08-29 20:41 ` Vagrant Cascadian @ 2021-08-30 11:00 ` Efraim Flashner 1 sibling, 0 replies; 11+ messages in thread From: Efraim Flashner @ 2021-08-30 11:00 UTC (permalink / raw) To: Vagrant Cascadian; +Cc: guix-devel, Mathieu Othacehe [-- Attachment #1: Type: text/plain, Size: 1360 bytes --] On Sun, Aug 29, 2021 at 01:15:40PM -0700, Vagrant Cascadian wrote: > On 2021-08-29, Mathieu Othacehe wrote: > > The Guix website now offers Pinebook Pro Guix System images[1]. Those > > images can be directly copied on a micro-SD card and booted from. More > > details here[2]. > > It seems like I need to write up a hybrid pinebook/pinebook-pro > bootloader definition, then that image could support *two* whole > platforms. :) > > It also shouldn't be *too* hard to add support for UEFI too... > > > Started a discussion about this in June: > > https://lists.gnu.org/archive/html/guix-devel/2021-06/msg00036.html > > > And recently gave a talk describing this approach for Debian: > > https://salsa.debian.org/vagrant/two-pinebooks-walk-into-a-bar > https://debconf21.debconf.org/talks/88-two-pinebooks-walk-into-a-bar/ > > Not sure how soon the video will be available, but the talk had > technical difficulties at the start, so I hope to get a chance to do it > all over again someday. :) > The videos are already up here https://meetings-archive.debian.net/pub/debian-meetings/2021/DebConf21/ -- Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 9:09 Distributing Guix System Pinebook Pro images Mathieu Othacehe 2021-08-29 15:16 ` Maxim Cournoyer 2021-08-29 20:15 ` Vagrant Cascadian @ 2021-08-30 9:52 ` Mathieu Othacehe 2021-08-30 14:01 ` Vagrant Cascadian 2021-08-30 14:37 ` Katherine Cox-Buday 3 siblings, 1 reply; 11+ messages in thread From: Mathieu Othacehe @ 2021-08-30 9:52 UTC (permalink / raw) To: guix-devel [-- Attachment #1: Type: text/plain, Size: 1118 bytes --] Hello, I managed to build a Guix System image with the Sway WM for the Pinebook Pro. The image is quite large (~6GiB) but it is bootable and works fine. Here are the steps I followed: * I built a cross-compiled barebones Pinebook Pro image as described in my previous email. * I used that image to turn the Pinebook Pro into an offload machine. * From my main x86_64 machine, I ran the following command: --8<---------------cut here---------------start------------->8--- guix system image ~/tmp/pinebook.scm -s aarch64-linux --8<---------------cut here---------------end--------------->8--- The pinebook.scm file is attached. * I flashed the image and booted from it, exactly like for the cross-compiled image. This is an interesting first step as generating desktop images for ARM devices is really convenient. Using the ARM machine as an offload machine to build a native ARM image from an Intel machine is less convenient though. I would really like to be able to build this same image using cross-compilation. The recent series sent by Maxime are making this goal more realistic. Thanks, Mathieu [-- Attachment #2: sway.jpeg --] [-- Type: image/jpeg, Size: 119083 bytes --] [-- Attachment #3: pinebook.scm --] [-- Type: application/octet-stream, Size: 5190 bytes --] ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu system images pinebook-pro) #:use-module (gnu bootloader) #:use-module (gnu bootloader u-boot) #:use-module (gnu image) #:use-module (gnu packages certs) #:use-module (gnu packages freedesktop) #:use-module (gnu packages linux) #:use-module (gnu packages wm) #:use-module (gnu packages xorg) #:use-module (gnu services) #:use-module (gnu services avahi) #:use-module (gnu services base) #:use-module (gnu services desktop) #:use-module (gnu services networking) #:use-module (gnu services sddm) #:use-module (gnu services ssh) #:use-module (gnu services xorg) #:use-module (gnu system) #:use-module (gnu system file-systems) #:use-module (gnu system image) #:use-module (gnu system shadow) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix utils) #:use-module (nongnu packages linux) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (pinebook-pro-desktop-os pinebook-pro-image-type pinebook-pro-desktop-raw-image)) (define pinebook-pro-desktop-os (operating-system (host-name "viso") (timezone "Europe/Paris") (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-pinebook-pro-rk3399-bootloader) (target "/dev/vda"))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (users (cons* (user-account (name "mathieu") (comment "Mathieu") (group "users") (home-directory "/home/mathieu") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) %base-file-systems)) (packages (cons* sway xterm nss-certs %base-packages)) (services (cons* (service agetty-service-type (agetty-configuration (extra-options '("-L")) ; no carrier detect (baud-rate "1500000") (term "vt100") (tty "ttyS2"))) (service openssh-service-type (openssh-configuration (permit-root-login 'without-password) (authorized-keys `(("mathieu" ,(local-file "/home/mathieu/.ssh/id_rsa.pub")))))) (service dhcp-client-service-type) (sddm-service (sddm-configuration (display-server "wayland"))) (modify-services (remove (lambda (service) (member (service-kind service) (list ntp-service-type avahi-service-type bluetooth-service network-manager-service-type gdm-service-type))) %desktop-services) (guix-service-type config => (guix-configuration (inherit config) (authorized-keys (append (list (local-file "/home/mathieu/.config/guix/keys/meije.scm")) %default-authorized-guix-keys)))) ))))) (define pinebook-pro-image-type (image-type (name 'pinebook-pro-raw) (constructor (cut image-with-os (arm64-disk-image (* 9 (expt 2 20))) ;9MiB <>)))) (define pinebook-pro-desktop-raw-image (image (inherit (os->image pinebook-pro-desktop-os #:type pinebook-pro-image-type)) (name 'pinebook-pro-desktop-raw-image) (target #f))) ;; Return the default image. pinebook-pro-desktop-raw-image ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-30 9:52 ` Mathieu Othacehe @ 2021-08-30 14:01 ` Vagrant Cascadian 2021-08-30 14:52 ` Mathieu Othacehe 0 siblings, 1 reply; 11+ messages in thread From: Vagrant Cascadian @ 2021-08-30 14:01 UTC (permalink / raw) To: Mathieu Othacehe, guix-devel On 2021-08-30, Mathieu Othacehe wrote: > I managed to build a Guix System image with the Sway WM for the Pinebook > Pro. The image is quite large (~6GiB) but it is bootable and works fine. I wonder how much diskspace savings you might get by leaving out the display manager... I typically just login from the console and run "exec sway". I *think* the last image I generated for that was more like 2GB, though my memory is fallable, and maybe misses various other standard desktop packages (e.g. web browser). > The pinebook.scm file is attached. (initrd-modules '()) (kernel linux-libre-arm64-generic) I have since figured out how to use the regular "linux-libre" kernel and which modules to add to the initrd... I'll try to dig those up. > This is an interesting first step as generating desktop images for ARM > devices is really convenient. Indeed! > Using the ARM machine as an offload machine to build a native ARM image > from an Intel machine is less convenient though. I would really like to > be able to build this same image using cross-compilation. The recent > series sent by Maxime are making this goal more realistic. Have fully native builds been fixed yet with "guix system image" ? That has been a blocker forme from trying it out. I haven't been booting my x86 guix installation lately, mostly just using the pinebook pro, so it is ironic I haven't been able to make a pinebook pro image. :) live well, vagrant ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-30 14:01 ` Vagrant Cascadian @ 2021-08-30 14:52 ` Mathieu Othacehe 2021-08-30 19:13 ` André A. Gomes 0 siblings, 1 reply; 11+ messages in thread From: Mathieu Othacehe @ 2021-08-30 14:52 UTC (permalink / raw) To: Vagrant Cascadian; +Cc: guix-devel Hello Vagrant, > I wonder how much diskspace savings you might get by leaving out the > display manager... I typically just login from the console and run "exec > sway". I *think* the last image I generated for that was more like 2GB, > though my memory is fallable, and maybe misses various other standard > desktop packages (e.g. web browser). Yeah SDDM drags Xorg between other things, I could definitely get rid of it. > I have since figured out how to use the regular "linux-libre" kernel and > which modules to add to the initrd... I'll try to dig those up. That would be nice. I also came across to the issue you reported here: https://issues.guix.gnu.org/48266. We definitely need to do something about it. Building this initrd modules list is quite painful. I'll try to think about it. > Have fully native builds been fixed yet with "guix system image" ? That > has been a blocker forme from trying it out. I haven't been booting my > x86 guix installation lately, mostly just using the pinebook pro, so it > is ironic I haven't been able to make a pinebook pro image. :) Hehe, that's a shame indeed. I'm working on it as a follow-up of https://issues.guix.gnu.org/45020. I'll propose a patch soon. Thanks, Mathieu ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-30 14:52 ` Mathieu Othacehe @ 2021-08-30 19:13 ` André A. Gomes 0 siblings, 0 replies; 11+ messages in thread From: André A. Gomes @ 2021-08-30 19:13 UTC (permalink / raw) To: Mathieu Othacehe; +Cc: Vagrant Cascadian, guix-devel Mathieu Othacehe <othacehe@gnu.org> writes: > Yeah SDDM drags Xorg between other things, I could definitely get rid of > it. Theoretically, it would be possible to write a SDDM service supporting wayland only AFAIK. But if you'll only use sway, it makes little sense to have a login manager indeed. -- André A. Gomes "Free Thought, Free World" ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Distributing Guix System Pinebook Pro images 2021-08-29 9:09 Distributing Guix System Pinebook Pro images Mathieu Othacehe ` (2 preceding siblings ...) 2021-08-30 9:52 ` Mathieu Othacehe @ 2021-08-30 14:37 ` Katherine Cox-Buday 3 siblings, 0 replies; 11+ messages in thread From: Katherine Cox-Buday @ 2021-08-30 14:37 UTC (permalink / raw) To: Mathieu Othacehe; +Cc: guix-devel Mathieu Othacehe <othacehe@gnu.org> writes: > The Guix website now offers Pinebook Pro Guix System images[1]. Awesome news! Thanks to all involved! -- Katherine ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-08-30 19:21 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-08-29 9:09 Distributing Guix System Pinebook Pro images Mathieu Othacehe 2021-08-29 15:16 ` Maxim Cournoyer 2021-08-29 20:15 ` Vagrant Cascadian 2021-08-29 20:41 ` Vagrant Cascadian 2021-08-30 11:07 ` Efraim Flashner 2021-08-30 11:00 ` Efraim Flashner 2021-08-30 9:52 ` Mathieu Othacehe 2021-08-30 14:01 ` Vagrant Cascadian 2021-08-30 14:52 ` Mathieu Othacehe 2021-08-30 19:13 ` André A. Gomes 2021-08-30 14:37 ` Katherine Cox-Buday
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.