summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2013-01-18 01:04:30 -0800
committerVagrant Cascadian <vagrant@debian.org>2022-04-05 12:05:28 -0700
commitd643ef38ed67a94d186c13cb6a5dc2f68c45b4ea (patch)
treeb26ca19dac067e83860cc2d574453f897ace6b80 /gnu/packages
parent4a0d0459903e0f2d89176120de1377e798b7d55d (diff)
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>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/bootloaders.scm31
1 files changed, 31 insertions, 0 deletions
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)))))