diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-22 18:24:01 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-22 18:28:09 +0200 |
commit | 0a5d74fa68bce598302236ca0f3eb2db2bc1592d (patch) | |
tree | 5424162734bda267d63816734b29b63667d591ee /target/linux | |
parent | 3c190ef112979793cd0e2148c53c6208a642a463 (diff) | |
download | upstream-0a5d74fa68bce598302236ca0f3eb2db2bc1592d.tar.gz upstream-0a5d74fa68bce598302236ca0f3eb2db2bc1592d.tar.bz2 upstream-0a5d74fa68bce598302236ca0f3eb2db2bc1592d.zip |
arc770: use generic 02_sysinfo
Currently arc770 sets a board name from compatible for no apparent
reason. Just use the compatible directly instead.
This theoretically removes a board name "generic" when no compatible
was present, however, there is no case where this "generic" board
name was actually used.
This also fixes an issue where snps,axs101 would not have been
properly detected anyway, as its case was not set up syntactically
correct.
Fixes: 576621f1e353 ("linux: add support of Synopsys ARC770-based boards")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux')
-rwxr-xr-x | target/linux/arc770/base-files/etc/board.d/02_network | 2 | ||||
-rw-r--r-- | target/linux/arc770/base-files/lib/arc.sh | 39 | ||||
-rw-r--r-- | target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh | 7 |
3 files changed, 1 insertions, 47 deletions
diff --git a/target/linux/arc770/base-files/etc/board.d/02_network b/target/linux/arc770/base-files/etc/board.d/02_network index 3f53293700..7f1d619076 100755 --- a/target/linux/arc770/base-files/etc/board.d/02_network +++ b/target/linux/arc770/base-files/etc/board.d/02_network @@ -8,7 +8,7 @@ board_config_update case "$(board_name)" in -"arc-sdp"*) +"snps,axs101") ucidef_set_interface_lan "eth0" "dhcp" ;; esac diff --git a/target/linux/arc770/base-files/lib/arc.sh b/target/linux/arc770/base-files/lib/arc.sh deleted file mode 100644 index 3ad0b33678..0000000000 --- a/target/linux/arc770/base-files/lib/arc.sh +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# - -# defaults -ARC_BOARD_NAME="generic" -ARC_BOARD_MODEL="Generic ARC board" - -arc_board_detect() { - local board - local model - local compatible - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - model="$( cat /proc/device-tree/model )" - compatible="$( cat /proc/device-tree/compatible )" - - case "$compatible" in - "snps,axs101""snps,arc-sdp") - board="arc-sdp"; - ;; - "snps,nsim") - board="arc-nsim"; - ;; - esac - - if [ "$board" != "" ]; then - ARC_BOARD_NAME="$board" - fi - - if [ "$model" != "" ]; then - ARC_BOARD_MODEL="$model" - fi - - echo "$ARC_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$ARC_BOARD_MODEL" > /tmp/sysinfo/model - echo "Detected $ARC_BOARD_NAME // $ARC_BOARD_MODEL" -} diff --git a/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh b/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh deleted file mode 100644 index c5cd905828..0000000000 --- a/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh +++ /dev/null @@ -1,7 +0,0 @@ -do_arc() { - . /lib/arc.sh - - arc_board_detect -} - -boot_hook_add preinit_main do_arc |