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 ms11 with LMTPS id QIXQGSl37l9iEwAA0tVLHw (envelope-from ) for ; Fri, 01 Jan 2021 01:13:13 +0000 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 QOmEFSl37l+bHgAAbx9fmQ (envelope-from ) for ; Fri, 01 Jan 2021 01:13:13 +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 A590B9402A5 for ; Fri, 1 Jan 2021 01:13:12 +0000 (UTC) Received: from localhost ([::1]:44608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv90A-0004vO-T3 for larch@yhetil.org; Thu, 31 Dec 2020 20:13:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv902-0004uv-JZ for guix-patches@gnu.org; Thu, 31 Dec 2020 20:13:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kv902-0004I2-Cn for guix-patches@gnu.org; Thu, 31 Dec 2020 20:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kv902-0005xx-7d for guix-patches@gnu.org; Thu, 31 Dec 2020 20:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45584] [PATCH 1/2] system: image: Add support for rockchip bootloader offsets. References: In-Reply-To: Resent-From: Caliph Nomble Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Jan 2021 01:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45584 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45584@debbugs.gnu.org Received: via spool by 45584-submit@debbugs.gnu.org id=B45584.160946352522855 (code B ref 45584); Fri, 01 Jan 2021 01:13:02 +0000 Received: (at 45584) by debbugs.gnu.org; 1 Jan 2021 01:12:05 +0000 Received: from localhost ([127.0.0.1]:41909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv8z7-0005wZ-E5 for submit@debbugs.gnu.org; Thu, 31 Dec 2020 20:12:05 -0500 Received: from mail-40140.protonmail.ch ([185.70.40.140]:20199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv8z5-0005w4-E8 for 45584@debbugs.gnu.org; Thu, 31 Dec 2020 20:12:04 -0500 Date: Fri, 01 Jan 2021 01:11:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609463516; bh=/KhRO8G9ENFwLEIc4Q57aTkp90cOts8CM0goSFWp1r4=; h=Date:To:From:Cc:Reply-To:Subject:From; b=FHSWjDYHYTqswDySRzQtk7NQ8PfHBqOpdnm4fHtfp22T1h7w2zbsuhcxfkMcII5f9 MK8S0vh5EOgpYY/BleEkhl8m23ORFaJj4KB4a9HXrhxj/7uTRbt7ZKN/ppxMVK/eH2 q2ewbdDDmhMS5VuMwcai5BxxOLrhOV3y6squ5/JE= Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Caliph Nomble Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Caliph Nomble , Caliph Nomble via Guix-patches From: Caliph Nomble via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.83 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=FHSWjDYH; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A590B9402A5 X-Spam-Score: -2.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: hxc9pGWkINNY * gnu/system/image.scm (root-largeboot-offset, arm32-largeboot-disk-image, arm32-largeboot-image-type): New variables, used primarily to define... (arm64-largeboot-disk-image, arm64-largeboot-image-type): ...these new variables. --- gnu/system/image.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 67930750d5..58d92cf4b6 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -59,6 +59,7 @@ #:use-module (ice-9 format) #:use-module (ice-9 match) #:export (root-offset + root-largeboot-offset root-label =20 esp-partition @@ -67,7 +68,9 @@ efi-disk-image iso9660-image arm32-disk-image + arm32-largeboot-disk-image arm64-disk-image + arm64-largeboot-disk-image =20 image-with-os raw-image-type @@ -75,7 +78,9 @@ iso-image-type uncompressed-iso-image-type arm32-image-type + arm32-largeboot-image-type arm64-image-type + arm64-largeboot-image-type =20 image-with-label system-image @@ -92,6 +97,10 @@ ;; this post-MBR gap. (define root-offset (* 512 2048)) =20 +;; Same as above, except 9MB big. Necessary for eg. rk3399 and rk3328 +;; systems, which install the bootloader at an 8MB offset. +(define root-largeboot-offset (+ root-offset (* 8 (expt 2 20)))) + ;; Generic root partition label. (define root-label "Guix_image") =20 @@ -140,11 +149,24 @@ ;; fails. (volatile-root? #f))) =20 +(define arm32-largeboot-disk-image + (image + (inherit arm32-disk-image) + (partitions + (list (partition + (inherit root-partition) + (offset root-largeboot-offset)))))) + (define arm64-disk-image (image (inherit arm32-disk-image) (target "aarch64-linux-gnu"))) =20 +(define arm64-largeboot-disk-image + (image + (inherit arm32-largeboot-disk-image) + (target "aarch64-linux-gnu"))) + =0C ;;; ;;; Images types. @@ -191,11 +213,21 @@ set to the given OS." (name 'arm32-raw) (constructor (cut image-with-os arm32-disk-image <>)))) =20 +(define arm32-largeboot-image-type + (image-type + (name 'arm32-largeboot-raw) + (constructor (cut image-with-os arm32-largeboot-disk-image <>)))) + (define arm64-image-type (image-type (name 'arm64-raw) (constructor (cut image-with-os arm64-disk-image <>)))) =20 +(define arm64-largeboot-image-type + (image-type + (name 'arm64-largeboot-raw) + (constructor (cut image-with-os arm64-largeboot-disk-image <>)))) + =0C ;; ;; Helpers. --=20 2.26.2