rk3399: Enable SF distro bootcmd
authorJagan Teki <jagan@amarulasolutions.com>
Fri, 10 Apr 2020 18:26:31 +0000 (23:56 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 30 Apr 2020 17:03:31 +0000 (22:33 +0530)
Enable SPI flash(SF) distro boot command in rk3399.

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

Included the SF device at the last of the target devices
list since all the rest of the devices on the list have
more possibility to boot the distribution due to the
size of the SPI flash is concern.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
include/configs/rk3399_common.h
include/configs/rockchip-common.h

index 01a9174..f0ae6e6 100644 (file)
@@ -60,6 +60,7 @@
 #endif
 
 #include <config_distro_bootcmd.h>
+#include <environment/distro/sf.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
        ENV_MEM_LAYOUT_SETTINGS \
        "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
index b55e09a..bf8c60d 100644 (file)
        #define BOOT_TARGET_DHCP(func)
 #endif
 
+#if CONFIG_IS_ENABLED(CMD_SF)
+       #define BOOT_TARGET_SF(func)    func(SF, sf, 0)
+#else
+       #define BOOT_TARGET_SF(func)
+#endif
+
+#ifdef CONFIG_ROCKCHIP_RK3399
+#define BOOT_TARGET_DEVICES(func) \
+       BOOT_TARGET_MMC(func) \
+       BOOT_TARGET_USB(func) \
+       BOOT_TARGET_PXE(func) \
+       BOOT_TARGET_DHCP(func) \
+       BOOT_TARGET_SF(func)
+#else
 #define BOOT_TARGET_DEVICES(func) \
        BOOT_TARGET_MMC(func) \
        BOOT_TARGET_USB(func) \
        BOOT_TARGET_PXE(func) \
        BOOT_TARGET_DHCP(func)
+#endif
 
 #ifdef CONFIG_ARM64
 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"