From patchwork Wed Jan 4 05:32:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45838 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 12BFE27BBE9; Wed, 4 Jan 2023 05:33:33 +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=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 E7EB527BBEB for ; Wed, 4 Jan 2023 05:33:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCwOe-0005ld-Vn; Wed, 04 Jan 2023 00: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 1pCwOc-0005kd-E8 for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -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 1pCwOc-0005M1-5e for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCwOc-0000kc-1O for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v5 1/2] gnu: Add u-boot-ts7970-q-2g-1000mhz-c. 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, 04 Jan 2023 05:33:01 +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: rekado@elephly.net, Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16728103762862 (code B ref 59761); Wed, 04 Jan 2023 05:33:01 +0000 Received: (at 59761) by debbugs.gnu.org; 4 Jan 2023 05:32:56 +0000 Received: from localhost ([127.0.0.1]:47316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCwOT-0000k1-MI for submit@debbugs.gnu.org; Wed, 04 Jan 2023 00:32:56 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]:38799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCwOO-0000jO-AL for 59761@debbugs.gnu.org; Wed, 04 Jan 2023 00:32:52 -0500 Received: by mail-qt1-f175.google.com with SMTP id z12so26503603qtv.5 for <59761@debbugs.gnu.org>; Tue, 03 Jan 2023 21: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:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JTfk8qNo3jjxcI9OVg0PGsusI1YcP+Rz1IQ260AMjGo=; b=pktDkLNCQvSk8oNubOcbwk7zgB5Yi/yDCBpmyYRmMK+8dWta+nY9juTTKQlcDR0ITS 22anbKnSe2DHj0mG6Ev0MqnGS8LWiBpFwN0NkjLdgT3KLAydc5d9lKtghLuzvrP1hrxG E5VNU3fosbk6TNlM7+ZBzYGqyjPY7cGIe/Knr2YEHitWkgjjU38IvTU6r9oQDC9JssAf COVInBdRV2DMzo5U7b5MrdRsZ8gQHjuozf+CTWu+gubFn5icAmQbY+i0yXiUTggL016w iHnpmf37X2um/M6xbm6Ft5rUZbDp8+yPt2x2A4giGB2/HmhbIqP6Swh6dgptS3k4IM8+ zeFQ== 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=JTfk8qNo3jjxcI9OVg0PGsusI1YcP+Rz1IQ260AMjGo=; b=cS1P1yvX+6c0ivYwha+2d7uBzqPGhQlUrVrEE1INnE+W+MW2GmrEVaFjW7B7dbuYA9 Q3dwZX6/RolZI62mCSSq6silw6qdr7HGDpAU35svZhX8rFSI9Ue65D6T+R+BqnPhcArd gaVX/BBZGfw2b7FAFNeknYBH57XggCB1COyKmvFaZ+PkpiqvlA84QR0vIiD8ep4kuNEt QO8vB7XO/3kZUEBXjphK89/1GGa/DYzpThqJgxl9uITAW9j8RYYYmCg7BmcJmjKoYHEl E/NoU+23AUU+Y6pEbHOKQsQ/FblKpbrAFr35/7dKOw9dvm5kggqwo081NovRr0wuDCsg BOlg== X-Gm-Message-State: AFqh2kpeD+djxSL0rToZ4S6sWPSHBd174Wo15FoQJoQuXt/Id/zXxyvF hGsETufxVZ8mDUQvmvGpgDBZ33YOoD86J2Cx X-Google-Smtp-Source: AMrXdXvk8bgtDJnG107NtcAtguRpfTj87Z1UlnuWM+TsBD7/8bza7cJsboZeTHl229PUo6VyNSmkiA== X-Received: by 2002:ac8:7616:0:b0:3ab:5f5f:a0d7 with SMTP id t22-20020ac87616000000b003ab5f5fa0d7mr72335617qtq.2.1672810362630; Tue, 03 Jan 2023 21:32:42 -0800 (PST) Received: from localhost.localdomain (dsl-10-135-221.b2b2c.ca. [72.10.135.221]) by smtp.gmail.com with ESMTPSA id s13-20020a05620a0bcd00b006e16dcf99c8sm23682508qki.71.2023.01.03.21.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 21:32:42 -0800 (PST) From: Maxim Cournoyer Date: Wed, 4 Jan 2023 00:32:33 -0500 Message-Id: <20230104053234.4540-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 * gnu/packages/bootloaders.scm (u-boot-ts-mx6): New variable. (u-boot-ts7970-q-2g-1000mhz-c): Likewise. --- Changes in v5: - Update package revision to 08809160fbc60d6e949fa9d37d9a41aab8fef742 - Refactor patch-u-boot phase to use single string blocks - Drop upstreamed patch in build+install-tools phase gnu/packages/bootloaders.scm | 148 +++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) base-commit: fef10282afdb97af43d1ec1c0c955a7fdc313e3c diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 7016b33f4f..22c15d13f1 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1339,6 +1339,154 @@ (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 "08809160fbc60d6e949fa9d37d9a41aab8fef742")) + (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 + "01mja33351hkcs59rmfvppqlxqw4rh9gng7a7hx2cfspqwh2y6kr")))) + (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 + +#define MEM_LAYOUT_ENV_SETTINGS \\ +\t\"bootm_size=0x10000000\\0\" \\ +\t\"kernel_addr_r=0x10800000\\0\" \\ +\t\"fdt_addr_r=0x18000000\\0\" \\ +\t\"scriptaddr=0x18100000\\0\" \\ +\t\"pxefile_addr_r=0x18200000\\0\" \\ +\t\"ramdisk_addr_r=0x18300000\\0\" + +#define BOOT_TARGET_DEVICES(func) \\ +\tfunc(MMC, mmc, 0) \\ +\tfunc(MMC, mmc, 1) \\ +\tfunc(SATA, sata, 0) \\ +\tfunc(USB, usb, 0) \\ +\tfunc(PXE, pxe, na) \\ +\tfunc(DHCP, dhcp, na) + +#include + +" 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. +"\ +\t\"fdtfile=DEFAULT_FDT_FILE\\0\" \\ +\tMEM_LAYOUT_ENV_SETTINGS \\ +\tBOOTENV \\\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 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 Jan 4 05:32:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45837 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 E3F9027BBED; Wed, 4 Jan 2023 05:33:29 +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 29F0527BBE9 for ; Wed, 4 Jan 2023 05:33:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCwOe-0005lX-LV; Wed, 04 Jan 2023 00: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 1pCwOc-0005kt-VR for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -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 1pCwOc-0005ME-N6 for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCwOc-0000kj-IW for guix-patches@gnu.org; Wed, 04 Jan 2023 00:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v5 2/2] 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, 04 Jan 2023 05: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: rekado@elephly.net, Maxim Cournoyer Received: via spool by 59761-submit@debbugs.gnu.org id=B59761.16728103772868 (code B ref 59761); Wed, 04 Jan 2023 05:33:02 +0000 Received: (at 59761) by debbugs.gnu.org; 4 Jan 2023 05:32:57 +0000 Received: from localhost ([127.0.0.1]:47318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCwOW-0000k7-Ra for submit@debbugs.gnu.org; Wed, 04 Jan 2023 00:32:57 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:44682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCwOQ-0000jS-TK for 59761@debbugs.gnu.org; Wed, 04 Jan 2023 00:32:53 -0500 Received: by mail-qt1-f177.google.com with SMTP id c11so26460389qtn.11 for <59761@debbugs.gnu.org>; Tue, 03 Jan 2023 21: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=4bOTIEwT1y3auEQ+1t7F6EHFE8nN0gb2AdxrWCK1Dok=; b=RGGQBv8BTJYucRgSwDE+Exqbs8FQnUL2s0Auj9O1nEA10QrqrxodHQCRPLSHyWAxdY iVf8vYSrW3ptvKxX6zYQX/njKW+dqcwXXXqkLHj0hfbeCMpNyFhMPUZB792X8NP86mkL eJByJuFqSCnPvV8UJOuziShX10IGuZ6Gl585if/D+BzepLw+rn1dZsFp8MWQyyAg7KEf j0Hat2990T2sLA4OV5/T5LpwJ8P3Fi5d/HcwuxqZhhcdyCPMz/lOJC4VdakKlsaGCquF QzVT5r/lT9VbP7wXYYiqSr02BZGZsUoDvUNCjLDXd4jAzbELrYatd883JujecjuPICqy eRug== 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=4bOTIEwT1y3auEQ+1t7F6EHFE8nN0gb2AdxrWCK1Dok=; b=dMlhNMG1DmK8uJrvpF1v3GLCsYgXwENYTMujltiUmspCQEnuW8REqFZLalRHaxjCt1 T+PO/fAgfZjBlf0i91ihR5QCJTVlkCk2fk0zh1DzyS9ROGHMQACMlSYL7+f+gOUPdK6C Hb6id+b2plj0JJPTRrk/VGdl230iZ/0oBAgjB3pg4pPTpO6WhEDwVLCxjKET46oE3Z0C CPCqjdJT6LUWXzhRs9m1QZozwrX6PCja2KHDpSujJQ3tazmI0I42UFINGq4nFi9LKKUn BLrEuYsKntpFiXGm/oqAijj17r7rLUI5avPHZjBLqXuB0Y4pwE9kcbDS1twldWBe0hZa LDOg== X-Gm-Message-State: AFqh2krAPj9Uh3OvDkDXDNU9OtRI/sf1qWMnx3DcoHWmnviJmZt3Bxj0 JLPYVUl8HgrIA0iKKitBvb2vCsJBJbSc68lJ X-Google-Smtp-Source: AMrXdXudZIW04MCEDLpSGSR4iaGWKEHzNaeJLXg0rKT+XaDOOv7NHKBwqbezrrUPb0w7dVMShmw4qg== X-Received: by 2002:a05:622a:258c:b0:3ab:9ef8:f7e8 with SMTP id cj12-20020a05622a258c00b003ab9ef8f7e8mr33495119qtb.42.1672810365120; Tue, 03 Jan 2023 21:32:45 -0800 (PST) Received: from localhost.localdomain (dsl-10-135-221.b2b2c.ca. [72.10.135.221]) by smtp.gmail.com with ESMTPSA id s13-20020a05620a0bcd00b006e16dcf99c8sm23682508qki.71.2023.01.03.21.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 21:32:44 -0800 (PST) From: Maxim Cournoyer Date: Wed, 4 Jan 2023 00:32:34 -0500 Message-Id: <20230104053234.4540-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230104053234.4540-1-maxim.cournoyer@gmail.com> References: <20230104053234.4540-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. --- (no changes since v4) Changes in v4: - Rebase on top of #60224 and master 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)))