From 62de7fb629450433a33e5afae2daeb4be487d32c Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <josef.schlehofer@nic.cz>
Date: Fri, 9 Sep 2022 12:41:48 +0200
Subject: [PATCH] patches/openwrt: uboot-mvebu: add U-boot for Turris MOX

This supersedes
[mox-uboot-uboot](https://gitlab.nic.cz/turris/os/packages/-/blob/7b4fff7bc74226ade70ed30693355994c75ec6f0/hardware/mox/mox-uboot-uboot/Makefile)
package, which can be removed and we will use OpenWrt U-boot image
together with the way, how it should be done instead of doing our
variant.
---
 ...boot-mvebu-Add-U-boot-for-Turris-MOX.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 patches/openwrt/to-upstream/0054-uboot-mvebu-Add-U-boot-for-Turris-MOX.patch

diff --git a/patches/openwrt/to-upstream/0054-uboot-mvebu-Add-U-boot-for-Turris-MOX.patch b/patches/openwrt/to-upstream/0054-uboot-mvebu-Add-U-boot-for-Turris-MOX.patch
new file mode 100644
index 000000000..d044bd1d4
--- /dev/null
+++ b/patches/openwrt/to-upstream/0054-uboot-mvebu-Add-U-boot-for-Turris-MOX.patch
@@ -0,0 +1,41 @@
+From c0047b0bcafd24b2e13709ffff151381f5cf92ce Mon Sep 17 00:00:00 2001
+From: Josef Schlehofer <pepe.schlehofer@gmail.com>
+Date: Fri, 9 Sep 2022 12:40:11 +0200
+Subject: [PATCH] uboot-mvebu: Add U-boot for Turris MOX
+
+This adds U-boot support for Turris MOX within OpenWrt
+
+Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
+---
+ package/boot/uboot-mvebu/Makefile | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
+index 6470139de2..0fbcf4fd0d 100644
+--- a/package/boot/uboot-mvebu/Makefile
++++ b/package/boot/uboot-mvebu/Makefile
+@@ -50,6 +50,13 @@ define U-Boot/espressobin
+   UBOOT_CONFIG:=mvebu_espressobin-88f3720
+ endef
+ 
++define U-Boot/mox
++  NAME:=Turris MOX
++  BUILD_DEVICES:=cznic_turris-mox
++  BUILD_SUBTARGET:=cortexa53
++  UBOOT_CONFIG:=turris_mox
++endef
++
+ define U-Boot/uDPU
+   NAME:=Methode uDPU
+   BUILD_SUBTARGET:=cortexa53
+@@ -60,6 +67,7 @@ UBOOT_TARGETS:= \
+ 	helios4 \
+ 	omnia \
+ 	espressobin \
++	mox \
+ 	uDPU
+ 
+ define Package/u-boot/install
+-- 
+2.34.1
+
-- 
GitLab