aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/at91/base-files
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-23 20:15:17 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-08-25 19:28:42 +0200
commit7f1540cc46333e9f96237e0084c554a9ec59068c (patch)
treeffce165b07798c0d42288d47d8060913ee7edf9e /target/linux/at91/base-files
parent186569e2e8aac5847ee125c127d500ba024fde0e (diff)
downloadupstream-7f1540cc46333e9f96237e0084c554a9ec59068c.tar.gz
upstream-7f1540cc46333e9f96237e0084c554a9ec59068c.tar.bz2
upstream-7f1540cc46333e9f96237e0084c554a9ec59068c.zip
at91: introduce vendor_model scheme and drop board names
This introduces the vendor_model scheme to this target in order to harmonize device names within the target and with the rest of OpenWrt. In addition, custom board names are dropped in favor of the generic script which takes the compatible. Use the SUPPORTED_DEVICES variable to store the compatible where it deviates from the device name, so we can use it in build recipes. While at it, harmonize a few indents as well. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/at91/base-files')
-rwxr-xr-xtarget/linux/at91/base-files/etc/board.d/02_network2
-rw-r--r--target/linux/at91/base-files/lib/at91.sh92
-rw-r--r--target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh7
3 files changed, 1 insertions, 100 deletions
diff --git a/target/linux/at91/base-files/etc/board.d/02_network b/target/linux/at91/base-files/etc/board.d/02_network
index 66f9d88fae..306dfe375e 100755
--- a/target/linux/at91/base-files/etc/board.d/02_network
+++ b/target/linux/at91/base-files/etc/board.d/02_network
@@ -9,7 +9,7 @@ board_config_update
case "$(board_name)" in
-sama5d3_xplained)
+atmel,sama5d3-xplained)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
diff --git a/target/linux/at91/base-files/lib/at91.sh b/target/linux/at91/base-files/lib/at91.sh
deleted file mode 100644
index 19a63e1200..0000000000
--- a/target/linux/at91/base-files/lib/at91.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-
-AT91_BOARD_NAME=
-AT91_MODEL=
-
-at91_board_detect() {
- local machine
- local name
-
- machine=$(cat /proc/device-tree/model)
-
- case "$machine" in
- *"Atmel at91sam9263ek")
- name="at91sam9263ek"
- ;;
- *"Atmel AT91SAM9G15-EK")
- name="at91sam9g15ek"
- ;;
- *"Atmel at91sam9g20ek")
- name="at91sam9g20ek"
- ;;
- *"Atmel at91sam9g20ek 2 mmc")
- name="at91sam9g20ek_2mmc"
- ;;
- *"Atmel AT91SAM9G25-EK")
- name="at91sam9g25ek"
- ;;
- *"Atmel AT91SAM9G35-EK")
- name="at91sam9g35ek"
- ;;
- *"Atmel AT91SAM9M10G45-EK")
- name="at91sam9m10g45ek"
- ;;
- *"Atmel AT91SAM9X25-EK")
- name="at91sam9x25ek"
- ;;
- *"Atmel AT91SAM9X35-EK")
- name="at91sam9x35ek"
- ;;
- *"SAMA5D3 Xplained")
- name="sama5d3_xplained"
- ;;
- *"Atmel SAMA5D27 SOM1 EK")
- name="sama5d27_som1_ek"
- ;;
- *"Atmel SAMA5D2 PTC EK")
- name="sama5d2_ptc_ek"
- ;;
- *"SAMA5D2 Xplained")
- name="sama5d2_xplained"
- ;;
- *"SAMA5D4 Xplained")
- name="sama5d4_xplained"
- ;;
- *"CalAmp LMU5000")
- name="lmu5000"
- ;;
- *"Calao TNY A9260")
- name="tny_a9260"
- ;;
- *"Calao TNY A9263")
- name="tny_a9263"
- ;;
- *"Calao TNY A9G20")
- name="tny_a9g20"
- ;;
- *"Calao USB A9260")
- name="usb_a9260"
- ;;
- *"Calao USB A9263")
- name="usb_a9263"
- ;;
- *"Calao USB A9G20")
- name="usb_a9g20"
- ;;
- *"Ethernut 5")
- name="ethernut5"
- ;;
- esac
-
- [ -z "$name" ] && name="unknown"
-
- [ -z "$AT91_BOARD_NAME" ] && AT91_BOARD_NAME="$name"
- [ -z "$AT91_MODEL" ] && AT91_MODEL="$machine"
-
- [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
- echo "$AT91_BOARD_NAME" > /tmp/sysinfo/board_name
- echo "$AT91_MODEL" > /tmp/sysinfo/model
-}
diff --git a/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh b/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh
deleted file mode 100644
index c812329568..0000000000
--- a/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-do_at91() {
- . /lib/at91.sh
-
- at91_board_detect
-}
-
-boot_hook_add preinit_main do_at91