From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4KkuKQrxK2G1YAEAgWs5BA (envelope-from ) for ; Sun, 29 Aug 2021 22:41:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sCm2JArxK2G7UQAAbx9fmQ (envelope-from ) for ; Sun, 29 Aug 2021 20:41:46 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 239531A017 for ; Sun, 29 Aug 2021 22:41:46 +0200 (CEST) Received: from localhost ([::1]:54498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKRcf-0001To-29 for larch@yhetil.org; Sun, 29 Aug 2021 16:41:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKRcC-00017g-PZ for guix-devel@gnu.org; Sun, 29 Aug 2021 16:41:17 -0400 Received: from cascadia.aikidev.net ([2600:3c01:e000:267:0:a171:de7:c]:43608) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKRc9-0005rq-6W; Sun, 29 Aug 2021 16:41:15 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id A98621AC19; Sun, 29 Aug 2021 13:41:10 -0700 (PDT) From: Vagrant Cascadian To: Mathieu Othacehe , guix-devel Subject: Re: Distributing Guix System Pinebook Pro images In-Reply-To: <87v93oror7.fsf@yucca> References: <87o89gvcps.fsf@gnu.org> <87v93oror7.fsf@yucca> Date: Sun, 29 Aug 2021 13:41:06 -0700 Message-ID: <87sfysrnkt.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=2600:3c01:e000:267:0:a171:de7:c; envelope-from=vagrant@debian.org; helo=cascadia.aikidev.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630269706; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=tsKqT4vD9BHLfPNkPZ1yg6M1WvRE/dKXPg6RS9VLcMM=; b=HE/P+k62xBnnGT1T9ttcFk/opl9F7PbA/swCPNAWVm1XiKbPmrLgwdfaUSqcQUucc0QNOg 6SnAvn9hKdgal5cVBcmhkA9sDMbftPvZLljVUHA2YHHLO2tb7nOKvXqgplVPK4CJuuNdnw sEF40d+3iVXO1cZPCAye8jWovuFw1A3XUzhe4grEqLyYjVb3HlK4NvuGNGImk/qtXXNg9L 2J1R8FyMFy4xmE0jNvGXfQR8vN+IOnxGJ2S9X44B4vu2hgxczVno05sl68O+4l2c/8tp5s XNB9G/LtQDLujtYdBe9WaClimq+lZcthB/as6pqhvhXSiLJGF3CWSxwOE/+tkA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630269706; a=rsa-sha256; cv=none; b=gRMiRVTAo9DPClESTSPq5TpM4DiycvuCU6ERdqOK8kdytB+ZhkiNcpOxtMFOrTeBLO8elr ECIzGI1e97iTKLU6wjVGaaNYbFNHDMmXqu7ruClv12bxW2zCjkNigLBqdUGJyddQDwzZyc oLb9oXWSyLDSmzg+tUd0+VN3VAPp6gSFVjpLYhZu6NViUyDzJ9A+8EE2yT4Vvzbjtk8OSg zcZewPppeiGl+BbX7NioW2uVpCB0zotCg/ji2vl7eVnw5JzbGFzQaK+wTuV2A9kPzkxOgn +P2vBOQLsrAu/pdfCN20DzJBx2GVya2OroQ5SHbS+AObTDaNxcoqhbQZYDRKDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -0.02 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 239531A017 X-Spam-Score: -0.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: KRn66a9P2yng --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 =2D-- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -127,6 +127,28 @@ =20 (define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot) =20 +(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/idbloade= r.img")) + (u-boot (string-append bootloader-pinebook-pro "/libexec/u-boo= t.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-su= nxi-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))))) + =20 ;;; @@ -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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYSvw4wAKCRDcUY/If5cW qucGAQDUJ1LLXC5c56/5Ryvn6HGi8fO3SOUC7ilLIPrxUPW4BgEAtHbY8jUs05v/ gKKNKImpRY2sCxoxu5b9yNDCn60EXwA= =F9ey -----END PGP SIGNATURE----- --=-=-=--