mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-23 07:11:26 +00:00
* Helios4: Add workaround for SPI and SATA concurrent access issue Concurrent access on SPI NOR and SATA drives can lead to unstable SATA. Therefore as workaround, disable SATA controller when SPI flash access is needed and make it as user configurable item in armbianEnv.txt This workaround might applies to Clearfog too. Signed-off-by: Aditya Prayoga <aditya@kobol.io> * Helios4: Add U-Boot SPI Signed-off-by: Aditya Prayoga <aditya@kobol.io> * Helios4: Add SPI bootloader install feature This will allow to use nand-sata-install to perform the following operations on Helios4 : - Install bootloader to SPI NOR Flash (Option 5 in Menu). - Copy RootFS to USB storage in order to boot from SPI with RootFS on USB (Option 6 in Menu). * Unmount temp mount points in create_armbian() instead of hardcoded /dev/sda
79 lines
2.9 KiB
Diff
79 lines
2.9 KiB
Diff
diff --git a/board/mv_ebu/a38x/mv_main_a38x.c b/board/mv_ebu/a38x/mv_main_a38x.c
|
|
index 0dce7f6..6d69879 100755
|
|
--- a/board/mv_ebu/a38x/mv_main_a38x.c
|
|
+++ b/board/mv_ebu/a38x/mv_main_a38x.c
|
|
@@ -679,25 +679,33 @@ void misc_init_r_env(void)
|
|
setenv("enaLPAE", "no");
|
|
#endif
|
|
|
|
- /* Flatten Device Tree environment setup */
|
|
-#ifdef CONFIG_CUSTOMER_BOARD_SUPPORT
|
|
- #ifdef CONFIG_ARMADA_38X
|
|
- fdt_env_setup("armada-38x.dtb", MV_FALSE); /* static setup: Skip DT update for customer */
|
|
- #else
|
|
- fdt_env_setup("armada-39x.dtb", MV_FALSE);
|
|
- #endif
|
|
-#else
|
|
- #ifdef CONFIG_ARMADA_38X
|
|
- fdt_env_setup("armada-38x-modular.dtb", MV_TRUE); /* dynamic setup: run DT update */
|
|
- #else
|
|
- fdt_env_setup("armada-39x.dtb", MV_FALSE); /* static setup: Skip DT update */
|
|
- #endif
|
|
-#endif
|
|
+ setenv("fdt_skip_update", "yes");
|
|
+ setenv("boot_a_script",
|
|
+ "for prefix in /boot/ /; do \
|
|
+ load ${boot_interface} 0:1 ${script_addr_r} ${prefix}boot.scr && \
|
|
+ source ${script_addr_r}; \
|
|
+ done");
|
|
+ setenv("mmcboot",
|
|
+ "setenv boot_interface mmc; run boot_a_script;");
|
|
+ setenv("sataboot",
|
|
+ "scsi init; setenv boot_interface scsi; run boot_a_script;");
|
|
+ setenv("usbboot",
|
|
+ "setenv usbActive 1; setenv usbType 3; usb start; setenv boot_interface usb; run boot_a_script;");
|
|
|
|
#if (CONFIG_BOOTDELAY >= 0)
|
|
env = getenv("bootcmd");
|
|
if (!env)
|
|
- setenv("bootcmd", "tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;"
|
|
+ setenv("bootcmd",
|
|
+#if defined (MV_MMC_BOOT)
|
|
+ "echo Trying to boot from MMC; run mmcboot;"
|
|
+#elif defined (MV_SATA_BOOT)
|
|
+ "echo Trying to boot from SATA; run sataboot;"
|
|
+#elif defined (MV_SPI_BOOT)
|
|
+ "echo Please store the boot environment on the NOR SPI flash to override the default boot sequence;"
|
|
+#endif /* MV_NOR_BOOT */
|
|
+ "echo Trying to boot from USB; run usbboot;"
|
|
+ "echo Default boot sequence failed - falling back to TFTP;"
|
|
+ "tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;"
|
|
"setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath "
|
|
"ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params "
|
|
"clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;");
|
|
diff --git a/common/cmd_fs.c b/common/cmd_fs.c
|
|
index a681d03..9cc5013 100644
|
|
--- a/common/cmd_fs.c
|
|
+++ b/common/cmd_fs.c
|
|
@@ -22,7 +22,7 @@
|
|
|
|
int do_load_wrapper(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|
{
|
|
- return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY, 0);
|
|
+ return do_load(cmdtp, flag, argc, argv, FS_TYPE_ANY, 16);
|
|
}
|
|
|
|
U_BOOT_CMD(
|
|
diff --git a/include/configs/armada_38x.h b/include/configs/armada_38x.h
|
|
index 1ae5256..2086859 100644
|
|
--- a/include/configs/armada_38x.h
|
|
+++ b/include/configs/armada_38x.h
|
|
@@ -164,7 +164,7 @@ extern unsigned int mvUartPortGet(void);
|
|
#define CONFIG_CMD_RCVR
|
|
#define CONFIG_CMD_BOOT_MENU
|
|
#define CONFIG_CMD_SYS_RESTORE
|
|
-
|
|
+#define CONFIG_CMD_FS_GENERIC
|
|
|
|
/* Open this define for enabling Secure Boot Mode eFuses modification
|
|
#define CONFIG_CMD_EFUSE
|