summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7623
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2024-02-25 01:38:39 +0000
committerDaniel Golle <daniel@makrotopia.org>2024-02-25 01:50:31 +0000
commit3e8d2f2439d627e8798191b898628197a5dcd69e (patch)
treee52c2b3614bf3c7e8691c28b6c63c63a75763946 /target/linux/mediatek/mt7623
parent52cd3c74f1de656f9fdefedc742ad72e2a8695b0 (diff)
downloadopenwrt-3e8d2f2439d627e8798191b898628197a5dcd69e.tar.gz
openwrt-3e8d2f2439d627e8798191b898628197a5dcd69e.tar.bz2
openwrt-3e8d2f2439d627e8798191b898628197a5dcd69e.zip
mediatek: mt7623: bpi-r2: bump compat version on boot
The device booting successfully indicates that bootloader has been updated. Set compat_version to 1.1 on new configs and bump compat_version to 1.1 on first boot after a successful sysupgrade. Fixes: 6368ed1ae5 ("mediatek: mt7623: phase out uImage.FIT partition parser") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/mediatek/mt7623')
-rw-r--r--target/linux/mediatek/mt7623/base-files/etc/board.d/05_compat-version14
-rw-r--r--target/linux/mediatek/mt7623/base-files/etc/uci-defaults/05_fix-compat-version10
2 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7623/base-files/etc/board.d/05_compat-version b/target/linux/mediatek/mt7623/base-files/etc/board.d/05_compat-version
new file mode 100644
index 0000000000..a4cf133a69
--- /dev/null
+++ b/target/linux/mediatek/mt7623/base-files/etc/board.d/05_compat-version
@@ -0,0 +1,14 @@
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+bananapi,bpi-r2)
+ ucidef_set_compat_version "1.1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/mediatek/mt7623/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/mediatek/mt7623/base-files/etc/uci-defaults/05_fix-compat-version
new file mode 100644
index 0000000000..ae3f16002f
--- /dev/null
+++ b/target/linux/mediatek/mt7623/base-files/etc/uci-defaults/05_fix-compat-version
@@ -0,0 +1,10 @@
+. /lib/functions.sh
+
+case "$(board_name)" in
+bananapi,bpi-r2)
+ uci set system.@system[0].compat_version="1.1"
+ uci commit system
+ ;;
+esac
+
+exit 0