diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-18 14:59:48 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-27 12:10:45 +0200 |
commit | 8126e572dd4f531c5f105b7197bc119b2b1ebb07 (patch) | |
tree | d60027268c4c4f15cf52ad97f5993e81d0848454 /target/linux/imx6/base-files/lib/imx6.sh | |
parent | 0f3c3a5fb2738b25c62eb0ff8ef7d0654c0b9300 (diff) | |
download | upstream-8126e572dd4f531c5f105b7197bc119b2b1ebb07.tar.gz upstream-8126e572dd4f531c5f105b7197bc119b2b1ebb07.tar.bz2 upstream-8126e572dd4f531c5f105b7197bc119b2b1ebb07.zip |
imx6: use device-tree compatible for board name
In imx6, we currently use the model from DTS to derive a board name
manually in /lib/imx6.sh.
However, if we have individual DTS files anyway, we can exploit
generic 02_sysinfo and use the compatible as board name directly.
While at it, remove the wildcards from /lib/upgrade/platform.sh as
these might make code shorter, but are quite unpleasant when grepping
for a specific device.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/imx6/base-files/lib/imx6.sh')
-rw-r--r-- | target/linux/imx6/base-files/lib/imx6.sh | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh index a9fd0cad94..46d2eeb006 100644 --- a/target/linux/imx6/base-files/lib/imx6.sh +++ b/target/linux/imx6/base-files/lib/imx6.sh @@ -2,9 +2,6 @@ # Copyright (C) 2010-2013 OpenWrt.org # -IMX6_BOARD_NAME= -IMX6_MODEL= - rootpartuuid() { local cmdline=$(cat /proc/cmdline) local bootpart=${cmdline##*root=} @@ -31,103 +28,3 @@ apalis_mount_boot() { mount -o rw,noatime $(bootpart_from_uuid) /boot > /dev/null } } - -imx6_board_detect() { - local machine - local name - - machine=$(cat /proc/device-tree/model) - - case "$machine" in - "Gateworks Ventana i.MX6 DualLite/Solo GW51XX" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW51XX") - name="gw51xx" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW52XX" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW52XX") - name="gw52xx" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW53XX" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW53XX") - name="gw53xx" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW54XX" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW54XX" |\ - "Gateworks Ventana GW5400-A") - name="gw54xx" - ;; - - "Gateworks Ventana i.MX6 Dual/Quad GW551X" |\ - "Gateworks Ventana i.MX6 DualLite/Solo GW551X") - name="gw551x" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW552X" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW552X") - name="gw552x" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW553X" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW553X") - name="gw553x" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW5904" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW5904") - name="gw5904" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW5907" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW5907") - name="gw5907" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW5910" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW5910") - name="gw5910" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW5912" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW5912") - name="gw5912" - ;; - - "Gateworks Ventana i.MX6 DualLite/Solo GW5913" |\ - "Gateworks Ventana i.MX6 Dual/Quad GW5913") - name="gw5913" - ;; - - "SolidRun Cubox-i Solo/DualLite" |\ - "SolidRun Cubox-i Dual/Quad") - name="cubox-i" - ;; - - "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board" |\ - "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.1") - name="apalis,ixora" - ;; - - "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board") - name="apalis,eval" - ;; - - "Wandboard i.MX6 Dual Lite Board") - name="wandboard" - ;; - - *) - name="generic" - ;; - esac - - [ -z "$IMX6_BOARD_NAME" ] && IMX6_BOARD_NAME="$name" - [ -z "$IMX6_MODEL" ] && IMX6_MODEL="$machine" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$IMX6_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$IMX6_MODEL" > /tmp/sysinfo/model -} |