From patchwork Sun May 30 01:30:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vagrant Cascadian X-Patchwork-Id: 29675 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 D9D5327BC81; Sun, 30 May 2021 02:31:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 65C6327BC78 for ; Sun, 30 May 2021 02:31:22 +0100 (BST) Received: from localhost ([::1]:54806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnAIT-0003A4-Bh for patchwork@mira.cbaines.net; Sat, 29 May 2021 21:31:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnAIB-00039q-Jn for guix-patches@gnu.org; Sat, 29 May 2021 21:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnAIA-00021x-8x for guix-patches@gnu.org; Sat, 29 May 2021 21:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnAIA-0003hP-3t for guix-patches@gnu.org; Sat, 29 May 2021 21:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48371] Add crust firmware for sunxi devices Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 01:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Maxime Devos , 48371@debbugs.gnu.org Received: via spool by 48371-submit@debbugs.gnu.org id=B48371.162233824214197 (code B ref 48371); Sun, 30 May 2021 01:31:02 +0000 Received: (at 48371) by debbugs.gnu.org; 30 May 2021 01:30:42 +0000 Received: from localhost ([127.0.0.1]:57989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnAHq-0003gu-C6 for submit@debbugs.gnu.org; Sat, 29 May 2021 21:30:42 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:40672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnAHo-0003gh-JM for 48371@debbugs.gnu.org; Sat, 29 May 2021 21:30:41 -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 2A8041A904; Sat, 29 May 2021 18:30:31 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <87r1hpf3br.fsf@yucca> References: <87o8dgrk70.fsf@yucca> <334cfe187104a05a822dadd12436bc37dd1fcbb1.camel@telenet.be> <87r1hpf3br.fsf@yucca> Date: Sat, 29 May 2021 18:30:26 -0700 Message-ID: <87o8ctf1ot.fsf@yucca> 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On 2021-05-29, Vagrant Cascadian wrote: > On 2021-05-13, Maxime Devos wrote: >> Vagrant Cascadian schreef op di 11-05-2021 om 15:15 [-0700]: >>> + #:make-flags (list >>> + "CROSS_COMPILE=or1k-elf-" >>> + "DEBUG=1" >>> + "HOSTCC=gcc" >>> + "HOSTAR=ar" >>> + "HOST_COMPILE=aarch64-linux-gnu-" >>> + "LEX=flex") >> >> IIUC, CROSS_COMPILE is the system Crust will run on, and HOST_COMPILE >> is the system where Crust is compiled. So shouldn't HOST_COMPILE be >> >> (string-append (nix-system->gnu-triplet (%current-system)) "-") >> >> such that Crust can be cross-compiled from non-aarch64 or non-linux systems? > > Good point! ... > Setting HOST_COMPILE to an empty value appears to work and it just uses > the defined HOSTCC and HOSTAR, so this is probably better anyways! Or dropping it entirely; it was only used to define HOSTCC and HOSTAR, which we set explicitly. > There's a new crust version available, so I'll give that a quick test > before sending updated patches. Updated patches attached. live well, vagrant From 719fc2874daa5fd5772c2c0d146e8d6fb9f1377b Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Tue, 11 May 2021 21:15:15 +0000 Subject: [PATCH 2/2] gnu: u-boot: Add crust firmware to pinebook, pine64_plus and pine64-lts. * gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument for System Control Processor (SCP) firmware. [native-inputs]: Add SCP firmware. (u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate crust firmware as the SCP firmware. --- gnu/packages/bootloaders.scm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 56bef57cb7..6f1bb5b8c9 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -737,7 +737,7 @@ it fits within common partitioning schemes.") (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) -(define-public (make-u-boot-sunxi64-package board triplet) +(define-public (make-u-boot-sunxi64-package board triplet scpfirmware) (let ((base (make-u-boot-package board triplet))) (package (inherit base) @@ -752,6 +752,9 @@ it fits within common partitioning schemes.") (assoc-ref (or native-inputs inputs) "firmware") "/bl31.bin"))) (setenv "BL31" bl31) + (setenv "SCP" (string-append + (assoc-ref inputs "scpfirmware") + "/scp.bin")) ;; This is necessary when we're using the bundled dtc. ;(setenv "PATH" (string-append (getenv "PATH") ":" ; "scripts/dtc")) @@ -759,16 +762,20 @@ it fits within common partitioning schemes.") #t)))))) (native-inputs `(("firmware" ,arm-trusted-firmware-sun50i-a64) + ("scpfirmware" ,scpfirmware) ,@(package-native-inputs base)))))) (define-public u-boot-pine64-plus - (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu")) + (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu" + crust-pine64-plus)) (define-public u-boot-pine64-lts - (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu")) + (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu" + crust-pine64-plus)) (define-public u-boot-pinebook - (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu"))) + (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu" + crust-pinebook))) (package (inherit base) (arguments -- 2.30.2