guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: u-boot-rockpro64-rk3399: Add support for booting from SCSI/S


From: guix-commits
Subject: 03/03: gnu: u-boot-rockpro64-rk3399: Add support for booting from SCSI/SATA.
Date: Tue, 5 Apr 2022 15:15:20 -0400 (EDT)

vagrantc pushed a commit to branch master
in repository guix.

commit d643ef38ed67a94d186c13cb6a5dc2f68c45b4ea
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Jan 18 01:04:30 2013 -0800

    gnu: u-boot-rockpro64-rk3399: Add support for booting from SCSI/SATA.
    
    * gnu/packages/bootloaders.scm (u-boot-rockpro64-rk3399)[arguments]: Add
      'patch-config phase to support SCSI/SATA disks.
    
    Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---
 gnu/packages/bootloaders.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 40ad72c04b..7ea6f5a647 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -982,6 +982,37 @@ to Novena upstream, does not load u-boot.img from the 
first partition.")
                 (lambda* (#:key inputs #:allow-other-keys)
                   (setenv "BL31"
                           (search-input-file inputs "/bl31.elf"))))
+              (add-after 'unpack 'patch-config
+                (lambda _
+                  (substitute* "configs/rockpro64-rk3399_defconfig"
+                    (("CONFIG_USB=y") "\
+CONFIG_USB=y
+CONFIG_AHCI=y
+CONFIG_AHCI_PCI=y
+CONFIG_SATA=y
+CONFIG_SATA_SIL=y
+CONFIG_SCSI=y
+CONFIG_SCSI_AHCI=y
+CONFIG_DM_SCSI=y
+"))
+                  (substitute* "include/config_distro_bootcmd.h"
+                    (("\"scsi_need_init=false")
+                     "\"setenv scsi_need_init false")
+                    (("#define BOOTENV_SET_SCSI_NEED_INIT \"scsi_need_init=;")
+                     "#define BOOTENV_SET_SCSI_NEED_INIT \"setenv 
scsi_need_init;"))
+                  (substitute* "include/configs/rockchip-common.h"
+                    (("#define BOOT_TARGET_DEVICES\\(func\\)")
+                     "
+#if CONFIG_IS_ENABLED(CMD_SCSI)
+       #define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0)
+#else
+       #define BOOT_TARGET_SCSI(func)
+#endif
+#define BOOT_TARGET_DEVICES(func)")
+                    (("BOOT_TARGET_NVME\\(func\\) \\\\")
+                     "\
+BOOT_TARGET_NVME(func) \\
+       BOOT_TARGET_SCSI(func) \\"))))
               ;; Phases do not succeed on the bl31 ELF.
               (delete 'strip)
               (delete 'validate-runpath)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]