From 488defbf7d07b4607757f026913a3ac4523bea99 Mon Sep 17 00:00:00 2001
From: David Bauer <mail@david-bauer.net>
Date: Mon, 21 Aug 2023 23:18:57 +0200
Subject: [PATCH] ath79: don't create DIR-825 B1 factory image

Currently the build fails for the D-Link DIR-825 B1. THis is due to the
factory image being size-constrained. The sysupgrade image is not
affected, as OpenWrt now uses a concatenated firmware partition.

To newly install such a device, please use the latest OpenWrt 22.03
factory image and install a Gluon sysupgrade.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 ...on-t-create-DIR-825-B1-factory-image.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 patches/openwrt/0006-ath79-don-t-create-DIR-825-B1-factory-image.patch

diff --git a/patches/openwrt/0006-ath79-don-t-create-DIR-825-B1-factory-image.patch b/patches/openwrt/0006-ath79-don-t-create-DIR-825-B1-factory-image.patch
new file mode 100644
index 00000000..a9cfb41b
--- /dev/null
+++ b/patches/openwrt/0006-ath79-don-t-create-DIR-825-B1-factory-image.patch
@@ -0,0 +1,29 @@
+From: David Bauer <mail@david-bauer.net>
+Date: Mon, 21 Aug 2023 23:16:14 +0200
+Subject: ath79: don't create DIR-825 B1 factory image
+
+Currently the build fails for the D-Link DIR-825 B1. THis is due to the
+factory image being size-constrained. The sysupgrade image is not
+affected, as OpenWrt now uses a concatenated firmware partition.
+
+To newly install such a device, please use the latest OpenWrt 22.03
+factory image and install a Gluon sysupgrade.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+
+diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
+index 1a558c30a05433c585cdf81967e265b1f7711af7..bfea8fb8e3623790cf627628d6d58760fce22a67 100644
+--- a/target/linux/ath79/image/generic.mk
++++ b/target/linux/ath79/image/generic.mk
+@@ -1073,11 +1073,6 @@ define Device/dlink_dir-825-b1
+   DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
+ 	kmod-leds-reset kmod-owl-loader kmod-switch-rtl8366s
+   IMAGE_SIZE := 7808k
+-  FACTORY_SIZE := 6144k
+-  IMAGES += factory.bin
+-  IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
+-	pad-rootfs | check-size $$$$(FACTORY_SIZE) | pad-to $$$$(FACTORY_SIZE) | \
+-	append-string 01AP94-AR7161-RT-080619-00
+ endef
+ TARGET_DEVICES += dlink_dir-825-b1
+ 
-- 
GitLab