From e845c094d5c9d6afbb1ab3f0815d6ed546b9d429 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 11 Nov 2019 16:27:50 +0100 Subject: mediatek: split base-files into subtargets This splits some base-files across subtargets, as done previously on ath79 and ramips and also introduced for mt7629 subtarget here already. Most of the existing base-files content is specific to mt7623. While at it, apply the following fixes: - Remove lots of trailing whitespaces - Remove wildcard on unielec,u7623-02-emmc-512m - Remove inconsistent quotation marks in cases Signed-off-by: Adrian Schmutzler Acked-by: John Crispin --- .../mt7622/base-files/etc/board.d/02_network | 29 ++++++++++++++++++++++ .../mt7622/base-files/lib/upgrade/platform.sh | 26 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100755 target/linux/mediatek/mt7622/base-files/etc/board.d/02_network create mode 100755 target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh (limited to 'target/linux/mediatek/mt7622') diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..d719a35dec --- /dev/null +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network @@ -0,0 +1,29 @@ +#!/bin/sh + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +mediatek_setup_interfaces() +{ + local board="$1" + + case $board in + esac +} + +mediatek_setup_macs() +{ + local board="$1" + + case $board in + esac +} + +board_config_update +board=$(board_name) +mediatek_setup_interfaces $board +mediatek_setup_macs $board +board_config_flush + +exit 0 diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..f2264592a4 --- /dev/null +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -0,0 +1,26 @@ +platform_do_upgrade() { + local board=$(board_name) + + case "$board" in + *) + default_do_upgrade "$1" + ;; + esac +} + +PART_NAME=firmware + +platform_check_image() { + local board=$(board_name) + + [ "$#" -gt 1 ] && return 1 + + case "$board" in + *) + echo "Sysupgrade is not supported on your board yet." + return 1 + ;; + esac + + return 0 +} -- cgit v1.2.3