From patchwork Tue Dec 20 18:22: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: 45477 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 E2DB727BBED; Tue, 20 Dec 2022 18:52:53 +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 98ECC27BBE9 for ; Tue, 20 Dec 2022 18:52:52 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7hGa-0000aJ-I4; Tue, 20 Dec 2022 13:23: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 1p7hGZ-0000Zl-9V for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23: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 1p7hGZ-00063A-1L for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7hGY-0001pX-GE for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v4 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: Tue, 20 Dec 2022 18:23: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.16715605716998 (code B ref 59761); Tue, 20 Dec 2022 18:23:02 +0000 Received: (at 59761) by debbugs.gnu.org; 20 Dec 2022 18:22:51 +0000 Received: from localhost ([127.0.0.1]:46395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hGM-0001oo-Og for submit@debbugs.gnu.org; Tue, 20 Dec 2022 13:22:51 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:38506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hGL-0001od-3w for 59761@debbugs.gnu.org; Tue, 20 Dec 2022 13:22:49 -0500 Received: by mail-qt1-f178.google.com with SMTP id z12so11724454qtv.5 for <59761@debbugs.gnu.org>; Tue, 20 Dec 2022 10:22:49 -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=tyUOhxAa1k0n0nh5pkSnSVwHpV6GO0vLiCwz+lrYtko=; b=FABBMR9jON2t6Yl/nDnI4c2LNGNEF6AY/ebHAQsLB4io4yHyhzJ2YuZENY3VzUTnHe qroETYlTmxVAeQmNJvolNFsBhXVbUOSC6jYo2+I6K6aIWGqfGjHwt2M1ZHCYl8pPPTDf Vf/PLon4EgpW16eCjS9p8LLD5eOT9OvxBGdfMah2JRdHFENJ9JMRYcKbTrwMOEwi+JkI xBpupJfwIOeWDTA8fNHd+WCY8hy1RvNGwrw0/68duM8zeB0cy7Axl0FjYQqKm5TX+tzY HnHD4Le/sf0TED6TAlynk64P+TTBCGkJglN2dogFkgqWzhMU4o22sLjHEqcq4VnV2CBr XfZQ== 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=tyUOhxAa1k0n0nh5pkSnSVwHpV6GO0vLiCwz+lrYtko=; b=5EpJxDW0HQeW31MCgk1YInPVKZyrkATHebzmJaRMTEYaMGWVLRNrF/fI+39daQY422 TmWKd/erB4Aeq/YjobSJHA1ixzLpcvMvDf7ZbkoMjgQvkj0zAcjAKe4ZcUZu37zEwRee 0x/id32HAsgm4o76RvwJRYpRIyNPRFazjUcAB4fpHJ6jH638EpxJgzDydiFJNb82NZcB oT+s4GM+00GF/+B7csLnulqZZoPOA3JbOuildSP0LBJligvPEQ68F+yRy/lWhm+Zan64 /gEne9iK44f/9Cx3GS8QUQEwycWjfuLVB4hocgLfYYjVSUleOlIT3rbsoLpy5LvOKKCe J1Ug== X-Gm-Message-State: ANoB5pnKpVgvgOg661N0QYmSgWuJOmIZ6xUlaxLGE8nHB6snydUWBBmY feuYE+ZyADHf0R7GyowUHLWKrjessjAhF/OP X-Google-Smtp-Source: AA0mqf4gIdshu+B20RrQhV0Mcbr3sH+cNh91Uz/wiFW6vkaCerqgT62P0vZG+YjTeYgPyd1awm7mwA== X-Received: by 2002:a05:622a:5c8f:b0:3a8:199b:dcac with SMTP id ge15-20020a05622a5c8f00b003a8199bdcacmr49018566qtb.15.1671560563130; Tue, 20 Dec 2022 10:22:43 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1002]) by smtp.gmail.com with ESMTPSA id bq17-20020a05622a1c1100b00397e97baa96sm7951370qtb.0.2022.12.20.10.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 10:22:42 -0800 (PST) From: Maxim Cournoyer Date: Tue, 20 Dec 2022 13:22:34 -0500 Message-Id: <20221220182236.30360-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. --- (no changes since v1) gnu/packages/bootloaders.scm | 150 +++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) base-commit: daaef7858ffe2d0eb0378670a6447400410d1ff9 diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 738f3975f5..545803ece1 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1251,6 +1251,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 Tue Dec 20 18:22:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45476 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 EC06E27BBED; Tue, 20 Dec 2022 18:52:36 +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 7A71B27BBEB for ; Tue, 20 Dec 2022 18:52:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7hGa-0000aV-OB; Tue, 20 Dec 2022 13:23: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 1p7hGZ-0000Zn-Cy for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23: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 1p7hGZ-00063D-4t for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7hGY-0001pe-S8 for guix-patches@gnu.org; Tue, 20 Dec 2022 13:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59761] [PATCH v4 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: Tue, 20 Dec 2022 18:23: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.16715605747012 (code B ref 59761); Tue, 20 Dec 2022 18:23:02 +0000 Received: (at 59761) by debbugs.gnu.org; 20 Dec 2022 18:22:54 +0000 Received: from localhost ([127.0.0.1]:46398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hGQ-0001p2-Cb for submit@debbugs.gnu.org; Tue, 20 Dec 2022 13:22:54 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:36661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hGO-0001og-3V for 59761@debbugs.gnu.org; Tue, 20 Dec 2022 13:22:52 -0500 Received: by mail-qt1-f174.google.com with SMTP id bq12so1564144qtb.3 for <59761@debbugs.gnu.org>; Tue, 20 Dec 2022 10:22:52 -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=VB4pEJkf6N4DkYHXi2KpmARMky7B05R/ez/Wg6daR7c=; b=Qx2Hw9NE5YnWBZuaaVQURU/2+UR3nYAsn7MB4wqmXlYB7iQGkZLDEVavN7zCSBJTIL WKb/7RbK+DCbQ4PAASMNBcEP1v4jmvGdtawFt1DhcgqxUtIdGltk/Vr9QYEigJH8V/+e F7kDMODEkiNMYwLRZNhght3h40RHFo9Ap2Y77tE4fDknAJPE1GtXMsnfucWLSwdCgluD DW5sQ6+vAqCXjjoWpORH3ywSR90g2OdpjRy5C9X0m0yat9GokKxDRK/mdF+GhEdCwfux LOVt95o4acP2YLpFE1m7mduEtcZFxKs5QjHcLVFbt4S44S7cs4WYOnUSdnXlWNZ8wTQr iI7Q== 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=VB4pEJkf6N4DkYHXi2KpmARMky7B05R/ez/Wg6daR7c=; b=fjBODrF/OjM6QK0ECc1MaLXj9PTsF/PgRLNug67jV4fGCsoqHZl297UT5s/ubt7E47 jjS4KtzJhWNBVjL5eawfV+jKahXRmZfyVaw4Un4d8ckV37yY5YI3/8xihztk6VSDXxTb E/KGD+4e/nO7aQqQOniYF1zwTJiE9XOT5OvlESEFmgubJy+iou06wzRi+mwvUN3ZRs7s 9KhGFmiuwdfY0zDXOiP/i6DnMMgwQ8mRpcadrdjJYXqdy74Kl07PeJifLbYyDOmK7/Gz 5whqJDVNQ40WdZMyv+sB1MU1z+NWNy+u8ONpN08SjWpGLcEBunAFTZ1eRiy1h0DU7a5T O37A== X-Gm-Message-State: AFqh2kozUDbUdEKiawzqT4Tv2KDy/WcTl+LkZxfMXxgMitPxhnBeBrOi SjsQp1FeQ2ZnhAVwEZ2EJ0sm74wAHFHtX7j+ X-Google-Smtp-Source: AMrXdXulR6BGZvzd7vFLygE38YNDPGwXoxYmODC23IHm/fSLl00KrFuMJ89kIhtOx/rBOnnYwsmVbw== X-Received: by 2002:a05:622a:1dcb:b0:3a7:e426:2892 with SMTP id bn11-20020a05622a1dcb00b003a7e4262892mr4426409qtb.28.1671560566481; Tue, 20 Dec 2022 10:22:46 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1002]) by smtp.gmail.com with ESMTPSA id bq17-20020a05622a1c1100b00397e97baa96sm7951370qtb.0.2022.12.20.10.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 10:22:46 -0800 (PST) From: Maxim Cournoyer Date: Tue, 20 Dec 2022 13:22:35 -0500 Message-Id: <20221220182236.30360-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220182236.30360-1-maxim.cournoyer@gmail.com> References: <20221220182236.30360-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. --- 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)))