[PATCH] bcm53xx: only fixup seama on D-Link DIR-885L

Linus Walleij linus.walleij at linaro.org
Thu Oct 20 13:43:45 PDT 2022


Just one device builds seama images so let's just fix up
seama on that one device. I guess the tool errors out but
this feels cleaner.

Cc: Hauke Mehrtens <hauke at hauke-m.de>
Cc: Rafał Miłecki <zajec5 at gmail.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
 .../base-files/etc/uci-defaults/09_fix_crc    | 24 ++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc
index eae84bb771b8..fedb418d581e 100644
--- a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc
+++ b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc
@@ -1,5 +1,23 @@
+. /lib/functions.sh
+
+board=$(board_name)
+
 kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
 
-mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0
-mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware && exit 0
-exit 1
+fixtrx() {
+	mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0
+}
+
+fixseama() {
+	mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware && exit 0
+}
+
+case "$board" in
+dlink,dir-885l)
+	fixtrx
+	fixseama
+	;;
+*)
+	fixtrx
+	;;
+esac
-- 
2.34.1




More information about the openwrt-devel mailing list