From patchwork Wed Dec 14 02:32:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45254 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 753F727BBED; Wed, 14 Dec 2022 02:33: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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 0905127BBE9 for ; Wed, 14 Dec 2022 02:33:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5HZw-0000ky-Dw; Tue, 13 Dec 2022 21:33:04 -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 1p5HZv-0000kP-1W for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5HZu-0005gA-Px for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5HZu-0000YD-Be for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v3 1/4] gnu: make-u-boot-package: Add a u-boot argument. References: <20221202052903.10475-1-maxim.cournoyer@gmail.com> In-Reply-To: <20221202052903.10475-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 02:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59761 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59761@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16709851692079 (code B ref 59761); Wed, 14 Dec 2022 02:33:02 +0000 Received: (at 59761) by debbugs.gnu.org; 14 Dec 2022 02:32:49 +0000 Received: from localhost ([127.0.0.1]:36083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZg-0000XO-S1 for submit@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:49 -0500 Received: from mail-qv1-f45.google.com ([209.85.219.45]:36591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZe-0000XG-Cl for 59761@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:47 -0500 Received: by mail-qv1-f45.google.com with SMTP id o12so11704887qvn.3 for <59761@debbugs.gnu.org>; Tue, 13 Dec 2022 18:32:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zrI7rxcEpuhWCZphGgSxrEJ/JD7w9u9yMT5MEzKYawo=; b=Mkv9YcWVSReCp0CocVgvsY8fJiSbj36N7X+YVHnHXGAhkYEkIKBLk+kkqBulUzR5f0 i8wtUPYHfdxC6HCwjxFK1GSqxEq0q3G+hWHwaMEtarlUkMWo9weawigI6q1E1cYab5aV JnVQa9ipqQwTAhV1jbIn9ZKQIaKgaMSM1FYvIffE1pnnShGx3wXpeg2YMbsVIatU299h UOERA8Mux5b+G3ibhE1kDSrrS4eVeF9jVMnoCMazMC1c34qnpWk+XML/fgK/3++BMys6 m7FqpcPFWRTX/aoqg4+3C8UvXJt70OONi/VYdBNvUGbFMLCsESpF2NlNc0BwXfTLVM2a dozg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zrI7rxcEpuhWCZphGgSxrEJ/JD7w9u9yMT5MEzKYawo=; b=57ywYaPwnWFCeRdOt+L0B8Sun9mw/BC5Jr+WZhWr7RU79A9pzndCB9DRWrTXewjtxh oHvy8J8tW2ss2KU9wqfWGSU8xyotITX1UpDXMqKgJ/joruZr4J0DzmV8vTXboHsRMJA6 KrK1YcjF3Yrjdxwz1RKQ/wrEk37loa4AWo6VtqHAv700YitFyrRHWbTUNPtdS+6YfdhK 8TAQQZogcCDRNumY1AELd0Cjzj+I/jzHzdiHr8v7Yg/vzZfcnMqTV86p7fVSPr1H1vbJ IJRZMck5+fPjOYdQJ31RSGLox36TOGX3C4Br4Y/17T6+OAzbOTZeFVmPEsEKlDvsZIko u9Ww== X-Gm-Message-State: ANoB5pnLEbPfIT1HOj4P0V3WBqwfyyNr0Yfey2MtdfDNeB5uflvr6qJM TJFUH6YYeTJQtef/kDtrpOG4zcP6qsrDdA== X-Google-Smtp-Source: AA0mqf4fUFdb2GMGqPIcZAQ5muHbR09oW+OkrMACT8y4fZjwvrhDwPAYrkpxKKRA+bEVS2hznsGXgw== X-Received: by 2002:ad4:5109:0:b0:4c7:26a4:908e with SMTP id g9-20020ad45109000000b004c726a4908emr30603212qvp.47.1670985160210; Tue, 13 Dec 2022 18:32:40 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id k12-20020a05620a414c00b006e42a8e9f9bsm9191306qko.121.2022.12.13.18.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 18:32:39 -0800 (PST) From: Maxim Cournoyer Date: Tue, 13 Dec 2022 21:32:33 -0500 Message-Id: <20221214023236.25345-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches And have that u-boot argument used as the complete base of the template, so that a user can override it. * gnu/packages/bootloaders.scm (make-u-boot-package): New U-BOOT argument. Document it. [native-inputs]: Move the native-inputs of U-BOOT first, so that the cross compilation tools can be overridden via U-BOOT. [arguments]: Rewrite using substitute-keyword-arguments, extending rather than overriding most arguments. Use gexps. --- gnu/packages/bootloaders.scm | 180 +++++++++++++++++++---------------- 1 file changed, 97 insertions(+), 83 deletions(-) base-commit: 0ffa501f2b3e83ae56e9c2bd31418439090e869a diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 8888c51736..7ec9bbb543 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2021 Stefan +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -782,11 +783,13 @@ (define*-public (make-u-boot-package board triplet defconfig configs name-suffix - append-description) + append-description + (u-boot u-boot)) "Return a U-Boot package for BOARD cross-compiled for TRIPLET with the optional DEFCONFIG file and optional configuration changes from CONFIGS. NAME-SUFFIX is appended to the package name, while APPEND-DESCRIPTION is -appended to the package description." +appended to the package description. U-BOOT can be used when a fork or a +different version of U-Boot must be used." (let ((same-arch? (lambda () (string=? (%current-system) (gnu-triplet->nix-system triplet))))) @@ -801,90 +804,101 @@ (define*-public (make-u-boot-package board triplet "\n\n" append-description) (package-description u-boot))) (native-inputs - `(,@(if (not (same-arch?)) + ;; Note: leave the native u-boot inputs first, so that a user can + ;; override the cross-gcc and cross-binutils packages. + `(,@(package-native-inputs u-boot) + ,@(if (not (same-arch?)) `(("cross-gcc" ,(cross-gcc triplet)) ("cross-binutils" ,(cross-binutils triplet))) - `()) - ,@(package-native-inputs u-boot))) + `()))) (arguments - `(#:modules ((ice-9 ftw) - (srfi srfi-1) - (guix build gnu-build-system) - (guix build kconfig) - (guix build utils)) - #:imported-modules (,@%gnu-build-system-modules - (guix build kconfig)) - #:test-target "test" - #:make-flags - (list "HOSTCC=gcc" - ,@(if (not (same-arch?)) - `((string-append "CROSS_COMPILE=" ,triplet "-")) - '())) - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs make-flags #:allow-other-keys) - (let* ((config-name (string-append ,board "_defconfig")) - (config-file (string-append "configs/" config-name)) - (defconfig ,defconfig) - (configs ',configs)) - (when defconfig - ;; Replace the board-specific defconfig with the given one. - (copy-file defconfig config-file)) - (if (file-exists? config-file) - (begin - (when configs - (modify-defconfig config-file configs)) - (apply invoke "make" `(,@make-flags ,config-name)) - (verify-config ".config" config-file)) - (begin - (display "invalid board name; valid board names are:" - (current-error-port)) - (let ((suffix-len (string-length "_defconfig")) - (entries (scandir "configs"))) - (for-each (lambda (file-name) - (when (string-suffix? "_defconfig" file-name) - (format (current-error-port) - "- ~A\n" - (string-drop-right file-name - suffix-len)))) - (sort entries string-ci<))) - (error "invalid boardname ~s" ,board)))))) - (add-after 'configure 'disable-tools-libcrypto - ;; Disable libcrypto due to GPL and OpenSSL license - ;; incompatibilities - (lambda _ - (substitute* ".config" - (("CONFIG_TOOLS_LIBCRYPTO=.*$") "CONFIG_TOOLS_LIBCRYPTO=n")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (libexec (string-append out "/libexec")) - (uboot-files (append - (remove - ;; Those would not be reproducible - ;; because of the randomness used - ;; to produce them. - ;; It's expected that the user will - ;; use u-boot-tools to generate them - ;; instead. - (lambda (name) - (string-suffix? - "sunxi-spl-with-ecc.bin" - name)) - (find-files "." ".*\\.(bin|efi|img|spl|itb|dtb|rksd)$")) - (find-files "." "^(MLO|SPL)$")))) - (mkdir-p libexec) - (install-file ".config" libexec) - ;; Useful for "qemu -kernel". - (install-file "u-boot" libexec) - (for-each - (lambda (file) - (let ((target-file (string-append libexec "/" file))) - (mkdir-p (dirname target-file)) - (copy-file file target-file))) - uboot-files) - #t))))))))) + (substitute-keyword-arguments (package-arguments u-boot) + ((#:modules modules '()) + `((ice-9 ftw) + (srfi srfi-1) + (guix build gnu-build-system) + (guix build kconfig) + (guix build utils) + ,@modules)) + ((#:imported-modules imported-modules '()) + `((guix build kconfig) + ,@%gnu-build-system-modules + ,@imported-modules)) + ((#:test-target _ "test") + "test") + ((#:make-flags make-flags '()) + #~(list "HOSTCC=gcc" + #$@(if (not (same-arch?)) + (list (string-append "CROSS_COMPILE=" triplet "-")) + '()) + #$@make-flags)) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (replace 'configure + (lambda* (#:key outputs make-flags #:allow-other-keys) + (let* ((config-name (string-append #$board "_defconfig")) + (config-file (string-append "configs/" config-name)) + (defconfig #$defconfig) + (configs '#$configs)) + (when defconfig + ;; Replace the board-specific defconfig with the given + ;; one. + (copy-file defconfig config-file)) + (if (file-exists? config-file) + (begin + (when configs + (modify-defconfig config-file configs)) + (apply invoke "make" `(,@make-flags ,config-name)) + (verify-config ".config" config-file)) + (begin + (display "invalid board name; valid board names are:" + (current-error-port)) + (let ((suffix-len (string-length "_defconfig")) + (entries (scandir "configs"))) + (for-each (lambda (file-name) + (when (string-suffix? "_defconfig" + file-name) + (format (current-error-port) + "- ~A\n" + (string-drop-right + file-name suffix-len)))) + (sort entries string-ci<))) + (error "invalid boardname ~s" #$board)))))) + (add-after 'configure 'disable-tools-libcrypto + ;; Disable libcrypto due to GPL and OpenSSL license + ;; incompatibilities + (lambda _ + (substitute* ".config" + (("CONFIG_TOOLS_LIBCRYPTO=.*$") + "CONFIG_TOOLS_LIBCRYPTO=n")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((libexec (string-append #$output "/libexec")) + (uboot-files + (append + (remove + ;; Those would not be reproducible + ;; because of the randomness used to + ;; produce them. It's expected that the + ;; user will use u-boot-tools to generate + ;; them instead. + (lambda (name) + (string-suffix? + "sunxi-spl-with-ecc.bin" + name)) + (find-files "." + ".*\\.(bin|efi|img|spl|itb|dtb|rksd)$")) + (find-files "." "^(MLO|SPL)$")))) + (mkdir-p libexec) + (install-file ".config" libexec) + ;; Useful for "qemu -kernel". + (install-file "u-boot" libexec) + (for-each + (lambda (file) + (let ((target-file (string-append libexec "/" file))) + (mkdir-p (dirname target-file)) + (copy-file file target-file))) + uboot-files))))))))))) (define-public u-boot-malta (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) From patchwork Wed Dec 14 02:32:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45253 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 ACDFC27BBED; Wed, 14 Dec 2022 02:33:21 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 BD4FF27BBE9 for ; Wed, 14 Dec 2022 02:33:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5HZw-0000lG-SX; Tue, 13 Dec 2022 21:33:04 -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 1p5HZv-0000kf-H7 for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5HZv-0005gM-9R for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5HZv-0000YR-5J for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v3 2/4] gnu: make-u-boot-package: Install .imx files. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 02:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59761 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59761@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16709851742105 (code B ref 59761); Wed, 14 Dec 2022 02:33:03 +0000 Received: (at 59761) by debbugs.gnu.org; 14 Dec 2022 02:32:54 +0000 Received: from localhost ([127.0.0.1]:36089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZm-0000Xs-55 for submit@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:54 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:33774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZi-0000XH-C9 for 59761@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:50 -0500 Received: by mail-qt1-f178.google.com with SMTP id fu10so1589622qtb.0 for <59761@debbugs.gnu.org>; Tue, 13 Dec 2022 18:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XZqXVfTzn5YRnOeFCio1oq27IwTOUyMmow397x5rFz8=; b=iK1KVOpvh2HJtvVdV0YZ2luPulAkVo71te2x2DROVBxrN1KF1TP5tZpni/Flf6H3bX J2pDXvSyft3IE9B02rkecyj7jmQDEc/5ET27it/1zzVC07F5+1yUeISr/aZYlLUPumtE m9TNFmyToLpP2glErVWBhlPYZu9zK4v98KRnR7CXI+aCYBGzrdaxhU3Zm6d4s+XObPne Un3/IWFYritUUucv1enXqXEVuyZ3rnIY0F6h8ygPkzRcsJiL6qLrvfIhWwVReyo+QCGs Ov+uUT/0SW5uL6kbOe+pVoS3feTZLzfMPtF4TT6UJ0FI3ux0g1efMBDTB1lAZTUwUGpi sJVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XZqXVfTzn5YRnOeFCio1oq27IwTOUyMmow397x5rFz8=; b=qTkc9KIHuAi/2VybjcUFXTuLn1noNOuALG4KFfGSd5mQFxywJpxsKIHRkmojeugwNh 9LsdA87MzQDBOi4sJvRXipPErbm3jWbI9ckVWZ8BNUWYihcQlX16RcMR4MbEAb0O8aSr q1L/x9nDZuHcB1SlF1Hbpd4V1GpFSpHz46uDRCwe9GvR4QMeFpW5gC41363DbSo69D8F 60rKiLJqllg6MPp1KaoKN7bP9yC2Il68Aa2OigDIcBNFXbxjRTuLF7yq9kBZ3ITadY+A STQxzK/joqmfyN1u35UxaGkrDEcMJCYkn0I/Ued0icirAST1mkAdWffLBLBA0n1B8DkN Jjag== X-Gm-Message-State: ANoB5pkMJm1KyXmN+RJ1/Ro+VeaaF6TPfGm18kbzhiPbOiMwclwffY0U 190nlcimPcZPzQNm5HcJzL49m4VRhaGqBA== X-Google-Smtp-Source: AA0mqf7mW0U27TnTywteOL9MQ0hDhwYFY1Tebu7qc/ht47XXR7c1OKqf8RVQ7yhDgvwzrb1JN13Tmg== X-Received: by 2002:ac8:5756:0:b0:3a6:8700:b471 with SMTP id 22-20020ac85756000000b003a68700b471mr41420843qtx.38.1670985164772; Tue, 13 Dec 2022 18:32:44 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id k12-20020a05620a414c00b006e42a8e9f9bsm9191306qko.121.2022.12.13.18.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 18:32:44 -0800 (PST) From: Maxim Cournoyer Date: Tue, 13 Dec 2022 21:32:34 -0500 Message-Id: <20221214023236.25345-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221214023236.25345-1-maxim.cournoyer@gmail.com> References: <20221214023236.25345-1-maxim.cournoyer@gmail.com> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bootloaders.scm (make-u-boot-package) [phases] : Add imx to the regexp of files considered for installation. --- gnu/packages/bootloaders.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 7ec9bbb543..ab2cf06fd5 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -887,7 +887,7 @@ (define*-public (make-u-boot-package board triplet "sunxi-spl-with-ecc.bin" name)) (find-files "." - ".*\\.(bin|efi|img|spl|itb|dtb|rksd)$")) + ".*\\.(bin|efi|img|imx|spl|itb|dtb|rksd)$")) (find-files "." "^(MLO|SPL)$")))) (mkdir-p libexec) (install-file ".config" libexec) From patchwork Wed Dec 14 02:32:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45256 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 718E027BBEB; Wed, 14 Dec 2022 02:33:42 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 868EE27BBE9 for ; Wed, 14 Dec 2022 02:33:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5HZx-0000lX-Ub; Tue, 13 Dec 2022 21:33:05 -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 1p5HZv-0000kn-TQ for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5HZv-0005gS-Le for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5HZv-0000YY-HW for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v3 3/4] gnu: Add u-boot-ts7970-q-2g-1000mhz-c. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 02:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59761 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59761@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16709851752111 (code B ref 59761); Wed, 14 Dec 2022 02:33:03 +0000 Received: (at 59761) by debbugs.gnu.org; 14 Dec 2022 02:32:55 +0000 Received: from localhost ([127.0.0.1]:36091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZm-0000Xu-Fi for submit@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:55 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:38702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZj-0000XI-K9 for 59761@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:52 -0500 Received: by mail-qv1-f52.google.com with SMTP id pp21so10900295qvb.5 for <59761@debbugs.gnu.org>; Tue, 13 Dec 2022 18:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GzD/1gUpfRpcC5GIq5E+O+IujjtUUyVFqH8QryLhJ+w=; b=IrKlP2VuZd1TsQK0cD2E4z1V5WO4dxUds/IozSSwxufnewELSSFm7ID1+3QOiKkf7R zKSSf1EGRlvxTtwL6gZ2HyE4OkkCeseqROgJgWvrDG1zfK7WFjqZysBaGYBLLuQnjLUn FUxt7zkcokMDttxK3XNJIcsarm3SUeUyjb0Idt2VkAjtRo5F2mRsNV15TH0CUyxqfgkz oizsMBr7T4Hq8O1i5H261CkqjEgcLqKRDdZXj7zO3ZUwY2EnD/ftmNua1xoke3nPg7i5 NYiFSbFO6RwdEKr2PXm5xUXvKv9Cla77gM5w/FB6zHErM78jjVypd/l4hWxY/W7W01Bj VsJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GzD/1gUpfRpcC5GIq5E+O+IujjtUUyVFqH8QryLhJ+w=; b=TENR527G/OEE4Txr814PuBCOCDZ0gdEa9dPwGFn86xWcPtTOTvhd+7b2Evs2R3ZcwL 5OAwvSyA75K2MgVVGdOtZHtkY90/1BQjcQYPgffBJ/s6SFav/a7Hv34wd8rDzX/8AheQ P7lbF/PLDKzh7IdytikjQnHVYU6gpYV6i4H/W3rX3Hfmi0wqJCpmJ2QKSXx3fGImGbcz D+XGpCgcUO6LWHzpIqy5n85bS+cdfR7xVJryrJmZY4yba+dCRiYoZI1azX4wpCrYn4Pj Fd8NmGVKW3AUtPooYa6XeS39dBw2f8E1bWQgjNu4JRnMT2AnnEi3Q1drOrJDJrYBnSWC OIVA== X-Gm-Message-State: ANoB5plCLfg+1WdnrwC/R9xekV1DVVlmz6xq7oEtNi31WPI+5q5Bj+SF Q0iwmWVg//S0x5GuvkzNPVNOSwDaHtrXGQ== X-Google-Smtp-Source: AA0mqf4zaT7kMN8VbZciBkizPjp4mzlwMS8t9Z/w8ZPqFyKpO+P2Exibwu/VTzB97fKaz3oDi12Z9A== X-Received: by 2002:a0c:dc81:0:b0:4c7:2677:77cc with SMTP id n1-20020a0cdc81000000b004c7267777ccmr36107142qvk.8.1670985165922; Tue, 13 Dec 2022 18:32:45 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id k12-20020a05620a414c00b006e42a8e9f9bsm9191306qko.121.2022.12.13.18.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 18:32:45 -0800 (PST) From: Maxim Cournoyer Date: Tue, 13 Dec 2022 21:32:35 -0500 Message-Id: <20221214023236.25345-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221214023236.25345-1-maxim.cournoyer@gmail.com> References: <20221214023236.25345-1-maxim.cournoyer@gmail.com> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/bootloaders.scm (u-boot-ts-mx6): New variable. (u-boot-ts7970-q-2g-1000mhz-c): Likewise. --- gnu/packages/bootloaders.scm | 150 +++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ab2cf06fd5..02c1c1a17a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1271,6 +1271,156 @@ (define-public u-boot-rpi-4-32b-efi-bin (define-public u-boot-rpi-arm64-efi-bin (make-u-boot-bin-package u-boot-rpi-arm64-efi)) +(define u-boot-ts-mx6 + ;; There is no release; use the latest commit of the + ;; 'imx_v2015.04_3.14.52_1.1.0_ga' branch. + (let ((revision "0") + (commit "344403c64d93813fce8c6d94ed4c3ffb1fe2a181")) + (package + (inherit u-boot) + (name "u-boot-ts-mx6") + (version (git-version "2015.04_3" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/embeddedTS/u-boot-imx") + (commit commit))) + (file-name (git-file-name "u-boot-imx-ts" version)) + (sha256 + (base32 + "081swfz204dsy0nss4r55b8453w766yp2wgrh5y10l3gjc0fkrs1")))) + (arguments + (substitute-keyword-arguments (package-arguments u-boot) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-u-boot + (lambda _ + (substitute* (find-files "include/configs" "^ts[0-9]{4}\\.h$") + ;; Default to boot a standard zImage instead of a uImage. + (("/boot/uImage") + "/boot/zImage") + (("uimage") + "zimage") + (("bootm \\$\\{loadaddr}") + "bootz ${loadaddr}") + ;; This reference DTB is not available in mainline. + (("ts7970-revf.dtb") + "ts7970.dtb") + ;; Enable support for DISTRO_DEFAULTS, which enables to + ;; use 'sysboot' to boot Guix System. Also enable + ;; "standard" boot commands for dealing with discovery and + ;; booting of syslinux configurations (extlinux.conf). + + ;; Disable the stock CONFIG_BOOTCOMMAND to avoid a + ;; redefinition error. + (("CONFIG_BOOTCOMMAND") + "CONFIG_BOOTCOMMAND_DISABLED") + (("CONFIG_BOOTDELAY") + "CONFIG_BOOTDELAY_DISABLED") + ;; Inspired by include/configs/embestmx6boards.h + (("#define CONFIG_EXTRA_ENV_SETTINGS.*" anchor) + (string-append + "#include \n\n" + "#define MEM_LAYOUT_ENV_SETTINGS \\\n" + " \"bootm_size=0x10000000\\0\" \\\n" + " \"kernel_addr_r=0x10800000\\0\" \\\n" + " \"fdt_addr_r=0x18000000\\0\" \\\n" + " \"scriptaddr=0x18100000\\0\" \\\n" + " \"pxefile_addr_r=0x18200000\\0\" \\\n" + " \"ramdisk_addr_r=0x18300000\\0\"\n\n" + "#define BOOT_TARGET_DEVICES(func) \\\n" + " func(MMC, mmc, 0) \\\n" + " func(MMC, mmc, 1) \\\n" + " func(SATA, sata, 0) \\\n" + " func(USB, usb, 0) \\\n" + " func(PXE, pxe, na) \\\n" + " func(DHCP, dhcp, na)\n\n" + "#include \n\n" + anchor + ;; Sadly, the user config CONFIG_DEFAULT_FDT_FILE did + ;; not exist in that older U-Boot, a placeholder is + ;; added here, to be substituted in each TS U-Boot board + ;; package. + " \"fdtfile=DEFAULT_FDT_FILE\\0\" \\\n" + " MEM_LAYOUT_ENV_SETTINGS \\\n" + " BOOTENV \\\n"))))) + (add-after 'unpack 'patch-for-reproducibility + (lambda _ + ;; Substitute dynamically computed timestamps with static + ;; ones. + (substitute* "Makefile" + (("U_BOOT_DATE \"%b %d %C%y\"") + "U_BOOT_DATE \"Jan 01 1969\"") + (("U_BOOT_TIME \"%T\"") + "U_BOOT_TIME \"00:00:00\"")))) + (add-before 'build 'adjust-for-gcc10 + (lambda _ + (copy-file "include/linux/compiler-gcc6.h" + "include/linux/compiler-gcc10.h") + (substitute* "arch/arm/Makefile" + (("march=armv5") + "march=armv5te")))) + (add-after 'install 'build+install-tools + (lambda* (#:key make-flags #:allow-other-keys) + ;; Apply a trivial patch not backported from mainline to fix + ;; cross-compilation of tools (see: + ;; https://source.denx.de/u-boot/u-boot/-/commit/ + ;; 3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7). + (substitute* '("tools/Makefile" "tools/env/Makefile") + (("^HOSTCC = \\$\\(CC)" all) + (string-append "override " all))) + (apply invoke "make" "tools-all" make-flags) + (install-file "tools/env/fw_printenv" + (string-append #$output "/bin")) + (symlink (string-append #$output "/bin/fw_printenv") + (string-append #$output "/bin/fw_setenv")))))))) + (native-inputs + (modify-inputs (package-native-inputs u-boot) + (delete "dtc")))))) ;otherwise the build fails + +(define-public u-boot-ts7970-q-2g-1000mhz-c + (let ((base + (make-u-boot-package "ts7970-q-2g-1000mhz-c" "arm-linux-gnueabihf" + #:u-boot u-boot-ts-mx6 + #:append-description + "This U-Boot variant is for the Technologic +Systems TS-7970 revision C board, which includes a quad core Freescale i.MX6 +CPU and 2 GiB of RAM clocked at 1000MHz. The binary U-Boot image to flash is +the @file{libexec/u-boot.imx} file. It can be used with the @file{zImage} and +the @file{imx6q-ts7970.dtb} files provided by the +@code{linux-libre-arm-generic} image. + +To flash this bootloader, write it to an SD card, then using the U-Boot serial +console: +@example +mmc dev 0 +load mmc 0:1 ${loadaddr} /u-boot.imx +sf probe +sf erase 0 0x80000 +sf write ${loadaddr} 0x400 $filesize +@end example + +The factory values of U-Boot must also be reset so that it boots using a +zImage instead of the default uImage: +@example +run clearenv +reset +@end example + +For more information, refer to +@url{https://docs.embeddedts.com/TS-7970#Update_U-Boot}."))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'patch-u-boot 'set-default-fdt-file + (lambda _ + (substitute* "include/configs/ts7970.h" + (("DEFAULT_FDT_FILE") + "imx6q-ts7970.dtb"))))))))))) + (define-public vboot-utils (package (name "vboot-utils") From patchwork Wed Dec 14 02:32:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45255 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 85E6627BBED; Wed, 14 Dec 2022 02:33:37 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 D474227BBE9 for ; Wed, 14 Dec 2022 02:33:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5HZw-0000lA-L6; Tue, 13 Dec 2022 21:33:04 -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 1p5HZv-0000kQ-3A for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5HZu-0005gB-RT for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5HZu-0000YK-Mv for guix-patches@gnu.org; Tue, 13 Dec 2022 21:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v3 4/4] gnu: Add u-boot-ts7970-q-2g-1000mhz-c-bootloader. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Dec 2022 02:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59761 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59761@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16709851712091 (code B ref 59761); Wed, 14 Dec 2022 02:33:02 +0000 Received: (at 59761) by debbugs.gnu.org; 14 Dec 2022 02:32:51 +0000 Received: from localhost ([127.0.0.1]:36086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZi-0000Xf-Ok for submit@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:51 -0500 Received: from mail-qv1-f45.google.com ([209.85.219.45]:36591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5HZg-0000XG-PT for 59761@debbugs.gnu.org; Tue, 13 Dec 2022 21:32:49 -0500 Received: by mail-qv1-f45.google.com with SMTP id o12so11705045qvn.3 for <59761@debbugs.gnu.org>; Tue, 13 Dec 2022 18:32:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q5ft5quI9k56qDAM4eOgAltx2IUVB8HGULtJygVIUnY=; b=qwW8sxaIDEMP5G7bkYQW980AlVBpgUPA9x2ieCGMgmd2DSxaE+0iz2h4wCplOw4m3z yWeXvDND4UwqAneVVdqnPWsiTkRIG/W/Gq/CZRJ6boYkhkhBS3he5MW7a4M0cx4WYNSy dEN8QI/MBadzrsBx4uQu23MvynmBcM7dd5WSTNlKBFbBvAwwvfX8Fz9jBaqAAlDNXEpT wrx8xzP1nqIESEA2KS/tW+0fLvajwcmQzXzXXyshsSWtFek4rUxVgOg/nNeXpPlxSTFC NLJ4PeC5QQGeVcQLJdCxQ+lSvlDslWUtfBy22SNK9jZnkT1q6x6ZCVxW3cKgpeGOLdYp HOSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q5ft5quI9k56qDAM4eOgAltx2IUVB8HGULtJygVIUnY=; b=E2TcctVsDLynFRyJWw3nH1WGAKfa2UCNxi6CykK7EdcgGr4IFv0tW1wk9X3kAJFZee n5SC5TMnVkHYE5Zl/w4F6cAVXBcSBUnJughCIJNUVMf3jLUwdpALx/3TjVgJyimxoOSv pdghHwJzRL8b1teWv2H9NP3U/GuQVUb9zz1Q054pPjH7sg0HOf/VprFHuq3YkogbfKPU aUkVEGoYpgP5RQARlHbcYeex+pYLvxmoTscrBjRADa3iBa2VyVe6cOXKdyDJ8aeERdQH DQUF6oJc68ZaTU0ZWYTyyQ+KFxNXBlvJaOP/ov1MQlAqJAf0845WAmjuU3HZJIFNquUX +MJg== X-Gm-Message-State: ANoB5pnRh821lIhE9qnlJ4k/+ft249VzYAVLSHmAdmdGw35PCyOqjfDJ NMRqiDa2clUXzmwilRFHgR689tcbhDwNhw== X-Google-Smtp-Source: AA0mqf5+oRYx+xwoPhZ1JhvGziEU5WT+TOKGZ8KCUpsSvThtSoHsSt125RrgACdZlYlbwoU8I8g9kQ== X-Received: by 2002:a0c:fac2:0:b0:4c7:3cb0:4584 with SMTP id p2-20020a0cfac2000000b004c73cb04584mr28488525qvo.29.1670985168317; Tue, 13 Dec 2022 18:32:48 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id k12-20020a05620a414c00b006e42a8e9f9bsm9191306qko.121.2022.12.13.18.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 18:32:47 -0800 (PST) From: Maxim Cournoyer Date: Tue, 13 Dec 2022 21:32:36 -0500 Message-Id: <20221214023236.25345-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221214023236.25345-1-maxim.cournoyer@gmail.com> References: <20221214023236.25345-1-maxim.cournoyer@gmail.com> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/u-boot.scm (u-boot-ts7970-q-2g-1000mhz-c-bootloader): New variable. --- gnu/bootloader/u-boot.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 6cad33b741..65d7923465 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017, 2019 Mathieu Othacehe ;;; Copyright © 2020 Julien Lepiller ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ (define-module (gnu bootloader u-boot) u-boot-puma-rk3399-bootloader u-boot-rock64-rk3328-bootloader u-boot-rockpro64-rk3399-bootloader + u-boot-ts7970-q-2g-1000mhz-c-bootloader u-boot-wandboard-bootloader)) (define install-u-boot @@ -127,6 +129,12 @@ (define install-rockpro64-rk3399-u-boot (define install-pinebook-pro-rk3399-u-boot install-rockpro64-rk3399-u-boot) +(define install-u-boot-ts7970-q-2g-1000mhz-c-u-boot + #~(lambda (bootloader device mount-point) + (let ((u-boot.imx (string-append bootloader "/libexec/u-boot.imx")) + (install-dir (string-append mount-point "/boot"))) + (install-file u-boot.imx install-dir)))) + ;;; @@ -255,3 +263,13 @@ (define u-boot-pinebook-pro-rk3399-bootloader (inherit u-boot-bootloader) (package u-boot-pinebook-pro-rk3399) (disk-image-installer install-pinebook-pro-rk3399-u-boot))) + +(define u-boot-ts7970-q-2g-1000mhz-c-bootloader + ;; This bootloader doesn't really need to be installed, as it is read from + ;; an SPI memory chip, not the SD card. It is copied to /boot/u-boot.imx + ;; for convenience and should be manually flashed at the U-Boot prompt. + (bootloader + (inherit u-boot-bootloader) + (package u-boot-ts7970-q-2g-1000mhz-c) + (installer install-u-boot-ts7970-q-2g-1000mhz-c-u-boot) + (disk-image-installer #f)))