From patchwork Sat Nov 18 16:01:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 19652 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B9D9E27BBEA; Sat, 18 Nov 2023 16:02:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C003127BBE2 for ; Sat, 18 Nov 2023 16:02:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4Nlo-0005u3-2l; Sat, 18 Nov 2023 11:02:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4Nll-0005t0-07 for guix-patches@gnu.org; Sat, 18 Nov 2023 11:02:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r4Nlk-0007dQ-E4 for guix-patches@gnu.org; Sat, 18 Nov 2023 11:02:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r4Nli-0004Gb-If; Sat, 18 Nov 2023 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67261] [PATCH 2/3] gnu: bootloader: Add orangepi-r1-plus-lts-rk3328 bootloader. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Sat, 18 Nov 2023 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67261@debbugs.gnu.org Cc: Herman Rimm , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 67261-submit@debbugs.gnu.org id=B67261.170032331716377 (code B ref 67261); Sat, 18 Nov 2023 16:02:02 +0000 Received: (at 67261) by debbugs.gnu.org; 18 Nov 2023 16:01:57 +0000 Received: from localhost ([127.0.0.1]:49345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4Nld-0004G4-AS for submit@debbugs.gnu.org; Sat, 18 Nov 2023 11:01:57 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:35765 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4NlZ-0004FR-9G for 67261@debbugs.gnu.org; Sat, 18 Nov 2023 11:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1700323291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z6UE5yYu0lTLzwd2JF0WchW/4b1DN2gZDIjIziShZp8=; b=iT0Xkbm8Akx/ihx76qrr9jwcXrjx4QkFDLxkkEMVvMvSgbpPMYlEB6f2n0nmytcQZOZo33 oI+w7Smzzqd7ohfhlOi/O7ok0csrjtuqYQmp2Bxj7U8ikSUSlvtqTwOrkhWVy8JIic225E u7g5263obTCb5TAQBt6TqDejYKOaWppH3PNg27xw/twwL3hwi2rvpbFBGSizDmynqoGLRL YTJ4HhTZzHzA+P9BJusvEs7Wilsxqu6YcZdlTk64+6mnmX38wQZSY5rggIWOzrm5ncPkjw C9OkFwybOHdDXsW7Bkmd41OTqOpzGIGFb9LabySPuzuq9MVyNykGzaa0BuDukA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id b125565a (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 18 Nov 2023 16:01:31 +0000 (UTC) Date: Sat, 18 Nov 2023 17:01:27 +0100 Message-ID: <2e6ef3942e41a389e78e438941e2b52495dc530f.1700321434.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/u-boot.scm (install-orangepi-r1-plus-lts-rk3328-u-boot, u-boot-orangepi-r1-plus-lts-rk3328-bootloader): New variables. * gnu/packages/bootloaders.scm (u-boot-orangepi-r1-plus-lts-rk3328): New variable. --- gnu/bootloader/u-boot.scm | 17 +++++++++++++++++ gnu/packages/bootloaders.scm | 15 +++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 712db15b02..d20aabd538 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2023 Efraim Flashner +;;; Copyright © 2023 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ (define-module (gnu bootloader u-boot) u-boot-mx6cuboxi-bootloader u-boot-nintendo-nes-classic-edition-bootloader u-boot-novena-bootloader + u-boot-orangepi-r1-plus-lts-rk3328-bootloader u-boot-pine64-plus-bootloader u-boot-pine64-lts-bootloader u-boot-pinebook-bootloader @@ -93,6 +95,15 @@ (define install-imx-u-boot (write-file-on-device u-boot (stat:size (stat u-boot)) image (* 69 1024))))) +(define install-orangepi-r1-plus-lts-rk3328-u-boot + #~(lambda (bootloader root-index image) + (let ((idb (string-append bootloader "/libexec/idbloader.img")) + (u-boot (string-append bootloader "/libexec/u-boot.itb"))) + (write-file-on-device idb (stat:size (stat idb)) + image (* 64 512)) + (write-file-on-device u-boot (stat:size (stat u-boot)) + image (* 16384 512))))) + (define install-puma-rk3399-u-boot #~(lambda (bootloader root-index image) (let ((spl (string-append bootloader "/libexec/idbloader.img")) @@ -233,6 +244,12 @@ (define u-boot-novena-bootloader (inherit u-boot-imx-bootloader) (package u-boot-novena))) +(define u-boot-orangepi-r1-plus-lts-rk3328-bootloader + (bootloader + (inherit u-boot-bootloader) + (package u-boot-orangepi-r1-plus-lts-rk3328) + (disk-image-installer install-orangepi-r1-plus-lts-rk3328-u-boot))) + (define u-boot-pine64-plus-bootloader (bootloader (inherit u-boot-allwinner64-bootloader) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 5da696388a..e88abe2dec 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1128,6 +1128,21 @@ (define-public u-boot-novena version, contrary to Novena upstream, does not load u-boot.img from the first partition.")) +(define-public u-boot-orangepi-r1-plus-lts-rk3328 + (let ((base (make-u-boot-package "orangepi-r1-plus-lts-rk3328" "aarch64-linux-gnu"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-environment + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (setenv "BL31" (search-input-file inputs "bl31.elf")))))))) + (inputs + (modify-inputs (package-inputs base) + (append arm-trusted-firmware-rk3328)))))) + (define-public u-boot-cubieboard (make-u-boot-package "Cubieboard" "arm-linux-gnueabihf"))