From patchwork Wed Dec 7 15:01:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45106 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 A2BA927BBEB; Wed, 7 Dec 2022 15:03:22 +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=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 EBBB727BBE9 for ; Wed, 7 Dec 2022 15:03:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2vwu-0005Tp-Kq; Wed, 07 Dec 2022 10:03: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 1p2vwt-0005T5-B6 for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03: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 1p2vws-0001BH-Hx for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2vws-0001m1-2S for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v2 1/3] 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, 07 Dec 2022 15:03: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.16704253356774 (code B ref 59761); Wed, 07 Dec 2022 15:03:02 +0000 Received: (at 59761) by debbugs.gnu.org; 7 Dec 2022 15:02:15 +0000 Received: from localhost ([127.0.0.1]:50587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vw7-0001lC-8O for submit@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:15 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:42992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vw4-0001l4-FD for 59761@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:13 -0500 Received: by mail-qt1-f171.google.com with SMTP id h24so16299064qta.9 for <59761@debbugs.gnu.org>; Wed, 07 Dec 2022 07:02:12 -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=qjqPNM4unpNt6JOAxjWlTzqLqvKr2KDjWqk/kLtaiVQ=; b=hrm7wtJFMlXV2IAA7tatTxwXYakqwI4gDBKNgDpDi0Dp5rULG3cX3540GJrHcmTDuP 8ErSkVolycbHxTs8hPDh293LDXaT1VWEmbPYU7wkgF1nv1iaWVAxDiMNO/yaB6nASl/j LuI/1helAEpk+ErXbW5749GA1F6x+thfvg6l6scBYNFtIrdd97x3qAUoPNG9e6Tt7rJG kpRnChm6aA+AWBwFa0zTjEsyEBHtBgKMXcNprBZI63jQ3TVXugDSXKYprFRor/kWnMSh S/ZAN9q6Gmc8gpiz1pX45lRRPcGDmzGlBy5qC9vqf+Yv2dZI4h3itvEIlsR1DxPSi6qN QxCQ== 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=qjqPNM4unpNt6JOAxjWlTzqLqvKr2KDjWqk/kLtaiVQ=; b=aE9UoTBBGHZRK394KcXq31wvPlfaajMg6UnBffzam14/qU3ewt0WLEILotBUNrfrFo nVAND2jefrBbx3IsBLL5rGKzGIyMdRL4dLG9inWw+ICxu3jmhAepUndJtqoVEsrAOxRa /eGLLhLlRZYRkiwb5T45CNu8sitVRJ0qSvw2i7dpxFOorwFS5XlOT0O/NmcM5BrYIjOn vH7L39HhD8w4+4lTudiSS6mBdPpECEM13LcKSe75XarBjkTIsI6RVocB5bDq83EE1Z+m wjFgHdDa93Gm571V0BXANnNIHY1ehovka/Z/yeuziwezVBL2NqMcM1aXVCFLv5KSsX7W 0QBg== X-Gm-Message-State: ANoB5pnvG7ut9XSLa8QcE/u0+w8moDHZIssJqHYH1wLE98r9KzZqHavw nIZMPcCCVPiVuMiiRsQIG4OnsNBNA8g= X-Google-Smtp-Source: AA0mqf5jB4dO7NZNBoxNqDMeDwIbtDhvoub9HTfbgVDs1Idk7AjUvclMLeNDHK6PkB424OR2Um5irQ== X-Received: by 2002:a05:622a:58b:b0:3a5:c8c6:a889 with SMTP id c11-20020a05622a058b00b003a5c8c6a889mr1765270qtb.22.1670425326395; Wed, 07 Dec 2022 07:02:06 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-124-140.b2b2c.ca. [205.233.124.140]) by smtp.gmail.com with ESMTPSA id a7-20020ac84d87000000b003a6a19ee4f0sm9372462qtw.33.2022.12.07.07.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 07:02:06 -0800 (PST) From: Maxim Cournoyer Date: Wed, 7 Dec 2022 10:01:59 -0500 Message-Id: <20221207150201.9383-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: d4c2ea9226c229e56022ba641100ee7f5db8f53f 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 7 15:02:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45107 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 1D2C927BBEE; Wed, 7 Dec 2022 15:03:38 +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 952EA27BBE9 for ; Wed, 7 Dec 2022 15:03:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2vwv-0005UG-Ad; Wed, 07 Dec 2022 10:03: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 1p2vwt-0005T7-B3 for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03: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 1p2vws-0001BU-Ov for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2vws-0001m8-JP for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v2 2/3] 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, 07 Dec 2022 15:03: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.16704253406787 (code B ref 59761); Wed, 07 Dec 2022 15:03:02 +0000 Received: (at 59761) by debbugs.gnu.org; 7 Dec 2022 15:02:20 +0000 Received: from localhost ([127.0.0.1]:50590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vwB-0001lP-WA for submit@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:20 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:39462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vw9-0001l6-U4 for 59761@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:18 -0500 Received: by mail-qt1-f173.google.com with SMTP id r7so3688176qtx.6 for <59761@debbugs.gnu.org>; Wed, 07 Dec 2022 07:02:17 -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=B5PC8AhugaP3TiM0QrV3Ch6E+b+xthbo7zwLPgZhtieliR5LALbjyJIEvGHTjnuge8 avO1gbjdA1LNtKoQunciFTPqZzrB+k0sY4JGoGX+lnbEASNyrgb2PIZ7oydIdBRHk+Rt IxP8/uw+PoSNBLVzYzzMDsTgrEtcYY92mkRSbdeck0ivah9zyBESv4C1kIIom95ebQXj 0ecVB0NJtFtctKSn7DAVbsThOXfgCLBEv7P73QHxGi6pE9UQr2Y+hCoAcjxXVWsN3Cyz CYxhrwjfEQxBoqGgaDvYr7Tt/6arLi5hIZqiTC8eTXu0c89r3VT8Ujqtgn6lMt8KVPgB 5mww== 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=dkFNCY1mNB3Vtih//c7ZxDb7wyd2jyDvipoHQ0Ef1NbtJ+juYFB/ZFc5+nvUhyGlcy lH/lZWmE5SsN6oAkunmyPaakkPj+SHGL8LkmgAFtZK0W56MXKd8dZJeWZHGtEW4ME4Mq DUh6C8Gqy1639zHD6bxh994O3ds0RmBnGAKIjUPZ2IbKT31S585Cwoqhe/n4QJicbHse jS5UDsc/cjCYxroND3WppxxJ0Ymt5qzAE0KBx+ecnz+oAyxyQiVywEoX25rfjILCHebN kZ4i9o6v6xEkuUcoC5QSPAlAZGqNSEGZFnMTV6a4g1DsdwYZlns4O12zQVcdWUnpOSds ijNQ== X-Gm-Message-State: ANoB5pmqJIkaOS+ddv6H0gZOa/Q1Ha7dNz+FG8M8foHkMiojQtxIRVzi WlbSlyrzUspx6VScG+1Qfu4tL0j0Mlg= X-Google-Smtp-Source: AA0mqf54BtvIo4TCs7C+khCMcYFJgZcVlfrGWUiCuZqK0uzvldsIsGc4JXricJaWOptgkEdRD1vNRQ== X-Received: by 2002:a05:622a:4d96:b0:3a5:24fc:4bbb with SMTP id ff22-20020a05622a4d9600b003a524fc4bbbmr1174382qtb.7.1670425331873; Wed, 07 Dec 2022 07:02:11 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-124-140.b2b2c.ca. [205.233.124.140]) by smtp.gmail.com with ESMTPSA id a7-20020ac84d87000000b003a6a19ee4f0sm9372462qtw.33.2022.12.07.07.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 07:02:11 -0800 (PST) From: Maxim Cournoyer Date: Wed, 7 Dec 2022 10:02:00 -0500 Message-Id: <20221207150201.9383-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207150201.9383-1-maxim.cournoyer@gmail.com> References: <20221207150201.9383-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 7 15:02:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45108 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 2B7DB27BBEE; Wed, 7 Dec 2022 15:03:45 +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 595B027BBE9 for ; Wed, 7 Dec 2022 15:03:44 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2vwx-0005Uv-Nn; Wed, 07 Dec 2022 10:03:07 -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 1p2vwt-0005TR-De for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03: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 1p2vwt-0001Bh-4Z for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2vws-0001mF-Uk for guix-patches@gnu.org; Wed, 07 Dec 2022 10:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v2 3/3] 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, 07 Dec 2022 15:03: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.16704253466799 (code B ref 59761); Wed, 07 Dec 2022 15:03:02 +0000 Received: (at 59761) by debbugs.gnu.org; 7 Dec 2022 15:02:26 +0000 Received: from localhost ([127.0.0.1]:50594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vwI-0001lb-91 for submit@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:26 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:36614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2vwF-0001lO-Vo for 59761@debbugs.gnu.org; Wed, 07 Dec 2022 10:02:24 -0500 Received: by mail-qt1-f169.google.com with SMTP id fz10so16347748qtb.3 for <59761@debbugs.gnu.org>; Wed, 07 Dec 2022 07:02:23 -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=p5wI9ih4sGG7tmAaT8DEMAQkQJd9051SfheVeAZ+kbA=; b=KR5rV1Rm+SRN1AlbYJTivvsP4MoCx32vv21+Qc7G1ZJZRQQsRy1Kf8xyT0OW86/Dej jfIDyKN6GrDSnQXCTtaCiPznqf0ABYDxLTQO0bv+f7/o5SrsH75Tfsg+cI0RF5+KgG7d qnF3V0uct+8jfnGxlNg7V9lsR6ej63fMipam+kYBAZ9aqzzYOuFDQBU12JgHBPJm71Me hLyJS6HX14H3l3zzVR9YOnWCWkGtSlo4rb6I37pP3PEuGtUiBgCbmYQxskdWBeC94yvi 92V7VAQpR6vC8lskNSOVR1QPxkK0QMiBkF6PTbzco5Flwy8KkDJj0LhHGsy8QGC28PVO vOHw== 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=p5wI9ih4sGG7tmAaT8DEMAQkQJd9051SfheVeAZ+kbA=; b=wFifYj3Kv0M3FNSr/66h6Nw3kdf/WzE/nVGxurzhm+KnzPYzz1UqcnJuFzGU1BGkjF qDS46kJyRQJIAgaKlJzmaYxGlY6T55QhXjyay0Tb5NAkq80xUyAH/JCh2pP5q3FZIiKJ wP54cBWkAh2/LUtJGo5RyYPzLC6jVlgsAZjQHcQq8DeoQP1oGG/+CSdhYhvpogTPdDV8 ELpKYRBv8kBzRJtfPq6jti1MMUS1rBe0tLh/TM5CwLXLLB/6shJ1KVM3VmetM+Ca5m72 rfdIwzwnEGbkZ/1/il1H+j91COsDFbXYS3sMVLk96q70ANpwcIAs0bNlZSRFDh77GS4V jDXw== X-Gm-Message-State: ANoB5pm+nZaLPrPdvxEIeGIjH359RXYB/NU0A9ucH7LitmVucwD96yiz BVihM+kIj//VFxAWC0zrQvPQ7V1nG7U= X-Google-Smtp-Source: AA0mqf5whxXFDPwJ55G6k1ILLGbnPWYUKtE4A4lvDTRhHRofGXZxJWMFSHbQhN3AOSrlBrDNiRQizA== X-Received: by 2002:a05:622a:5c9b:b0:3a6:77f5:10da with SMTP id ge27-20020a05622a5c9b00b003a677f510damr1366577qtb.42.1670425337872; Wed, 07 Dec 2022 07:02:17 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-124-140.b2b2c.ca. [205.233.124.140]) by smtp.gmail.com with ESMTPSA id a7-20020ac84d87000000b003a6a19ee4f0sm9372462qtw.33.2022.12.07.07.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 07:02:17 -0800 (PST) From: Maxim Cournoyer Date: Wed, 7 Dec 2022 10:02:01 -0500 Message-Id: <20221207150201.9383-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207150201.9383-1-maxim.cournoyer@gmail.com> References: <20221207150201.9383-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 | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ab2cf06fd5..28a85eeca5 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1271,6 +1271,65 @@ (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-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 _ + (invoke "gcc" "--version") + (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 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 + (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.")) + (define-public vboot-utils (package (name "vboot-utils")