build/patch/u-boot/u-boot-helios4/add-spinor-targets.patch
Gauthier Provost 59af84c07c Helios4: Add SPI bootloader install feature ()
* 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
2018-10-08 13:44:36 +02:00

30 lines
1.1 KiB
Diff

diff --git a/Makefile b/Makefile
index 55380d7..2fd3440 100755
--- a/Makefile
+++ b/Makefile
@@ -482,6 +482,10 @@ endif
$(obj)u-boot.mmc: $(obj)u-boot.bin
echo y | $(obj)tools/marvell/doimage -T mmc -D 0x0 -E 0x0 -G $(obj)tools/marvell/bin_hdr/bin_hdr.bin u-boot.bin u-boot.mmc
+$(obj)u-boot.flash: $(obj)u-boot.bin
+ echo y | $(obj)tools/marvell/doimage -T flash -D 0x0 -E 0x0 -G $(obj)tools/marvell/bin_hdr/bin_hdr.bin u-boot.bin u-boot.flash
+ echo y | $(obj)tools/marvell/doimage -T uart -D 0x0 -E 0x0 -G $(obj)tools/marvell/bin_hdr/bin_hdr.uart.bin u-boot.bin u-boot-uart.flash
+
$(obj)u-boot.img: $(obj)u-boot.bin
$(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
-O u-boot -a $(CONFIG_SYS_TEXT_BASE) \
diff --git a/include/configs/armada_38x.h b/include/configs/armada_38x.h
index c38122c..cb59ea8 100644
--- a/include/configs/armada_38x.h
+++ b/include/configs/armada_38x.h
@@ -325,6 +325,10 @@ extern unsigned int mvUartPortGet(void);
#endif
/* Boot from SPI settings */
+#if defined(CONFIG_MV_SPI_BOOT)
+ #define MV_SPI_BOOT
+#endif
+
#if defined(MV_SPI_BOOT)
#define CONFIG_ENV_IS_IN_SPI_FLASH