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>
This commit is contained in:
Ricardo Wurmus 2013-01-18 01:04:30 -08:00 committed by Vagrant Cascadian
parent 4a0d045990
commit d643ef38ed
No known key found for this signature in database
GPG Key ID: DC518FC87F9716AA

View File

@ -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)))))