diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-07-29 10:25:40 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-07-29 10:25:40 +0000 |
commit | 155510ec8e938f5bea4a35a5e11d93b81ed6bd20 (patch) | |
tree | d74d016bc5e75029d5fd0aa187c01177408993d5 /target/linux/mvebu/base-files | |
parent | a40fb63ca6c4dbe2868f2e11d1d9985f31de131c (diff) | |
download | upstream-155510ec8e938f5bea4a35a5e11d93b81ed6bd20.tar.gz upstream-155510ec8e938f5bea4a35a5e11d93b81ed6bd20.tar.bz2 upstream-155510ec8e938f5bea4a35a5e11d93b81ed6bd20.zip |
BB: remove some targets that are broken or have the wrong kernel version
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@41876 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/base-files')
8 files changed, 0 insertions, 318 deletions
diff --git a/target/linux/mvebu/base-files/etc/diag.sh b/target/linux/mvebu/base-files/etc/diag.sh deleted file mode 100755 index 07570b9188..0000000000 --- a/target/linux/mvebu/base-files/etc/diag.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# Copyright (C) 2014 OpenWrt.org - -. /lib/functions/leds.sh -. /lib/mvebu.sh - -get_status_led() { - case $(mvebu_board_name) in - armada-xp-mamba) - status_led="mamba:white:power" - ;; - esac -} - -set_state() { - get_status_led - - case "$1" in - preinit) - status_led_blink_preinit - ;; - failsafe) - status_led_blink_failsafe - ;; - done) - status_led_on - ;; - esac -} diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/01_leds b/target/linux/mvebu/base-files/etc/uci-defaults/01_leds deleted file mode 100755 index 770bb0acb4..0000000000 --- a/target/linux/mvebu/base-files/etc/uci-defaults/01_leds +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2014 OpenWrt.org -# - -. /lib/functions/uci-defaults.sh -. /lib/mvebu.sh - -board=$(mvebu_board_name) - -case "$board" in -armada-xp-mamba) - ucidef_set_led_netdev "wan" "WAN" "tlc59116:1" "eth1" - ucidef_set_led_usbdev "usb1" "USB1" "tlc59116:5" "1-1" - ucidef_set_led_usbdev "usb2" "USB2" "tlc59116:6" "2-2" - ;; - -esac - -ucidef_commit_leds - -exit 0 diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network deleted file mode 100644 index 8b1ed6a789..0000000000 --- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2014 OpenWrt.org -# - -[ -e /etc/config/network ] && exit 0 - -touch /etc/config/network - -. /lib/functions/uci-defaults.sh -. /lib/mvebu.sh - -ucidef_set_interface_loopback - -board=$(mvebu_board_name) - -case "$board" in -armada-xp-mamba) - ucidef_set_interfaces_lan_wan "eth0" "eth1" - ;; - -*) - ucidef_set_interface_lan "eth0" - ;; -esac - -uci commit network - -exit 0 diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh deleted file mode 100755 index e8985b4664..0000000000 --- a/target/linux/mvebu/base-files/lib/mvebu.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013 OpenWrt.org -# - -MVEBU_BOARD_NAME= -MVEBU_MODEL= - -mvebu_board_detect() { - local machine - local name - - machine=$(cat /proc/device-tree/model) - - case "$machine" in - *"Marvell Armada 370 Evaluation Board") - name="armada-370-db" - ;; - *"Globalscale Mirabox") - name="mirabox" - ;; - *"Marvell Armada 370 Reference Design") - name="armada-370-rd" - ;; - *"Marvell Armada XP Evaluation Board") - name="armada-xp-db" - ;; - *"PlatHome OpenBlocks AX3-4 board") - name="openblocks-ax3-4" - ;; - *"Marvell Armada XP GP Board") - name="armada-xp-gp" - ;; - *"Linksys WRT1900AC (Mamba)") - name="armada-xp-mamba" - ;; - esac - - [ -z "$name" ] && name="unknown" - - [ -z "$MVEBU_BOARD_NAME" ] && MVEBU_BOARD_NAME="$name" - [ -z "$MVEBU_MODEL" ] && MVEBU_MODEL="$machine" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$MVEBU_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$MVEBU_MODEL" > /tmp/sysinfo/model -} - -mvebu_board_name() { - local name - - [ -f /tmp/sysinfo/board_name ] || mvebu_board_detect - [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name) - [ -z "$name" ] && name="unknown" - - echo "$name" -} diff --git a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac deleted file mode 100644 index 30f1370b8f..0000000000 --- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac +++ /dev/null @@ -1,20 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# - -preinit_set_mac_address() { - local mac - - . /lib/functions.sh - . /lib/mvebu.sh - - case $(mvebu_board_name) in - armada-xp-mamba) - mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ifconfig eth0 hw ether $mac 2>/dev/null - ifconfig eth1 hw ether $mac 2>/dev/null - ;; - esac -} - -boot_hook_add preinit_main preinit_set_mac_address diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg deleted file mode 100644 index 54aff7dbcc..0000000000 --- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# - -preinit_mount_syscfg() { - - . /lib/functions.sh - . /lib/mvebu.sh - - case $(mvebu_board_name) in - armada-xp-mamba) - mkdir /tmp/syscfg - ubiattach -p /dev/mtd8 - mount -t ubifs ubi1:syscfg /tmp/syscfg - [ -f /tmp/syscfg/sysupgrade.tgz ] && { - echo "- config restore -" - cd / - mv /tmp/syscfg/sysupgrade.tgz /tmp - tar xzf /tmp/sysupgrade.tgz - rm -f /tmp/sysupgrade.tgz - sync - } - ;; - esac -} - -boot_hook_add preinit_main preinit_mount_syscfg diff --git a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh deleted file mode 100644 index f37831ba75..0000000000 --- a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# - -linksys_get_target_firmware() { - cur_boot_part=`/usr/sbin/fw_printenv -n boot_part` - target_firmware="" - if [ "$cur_boot_part" = "1" ] - then - # current primary boot - update alt boot - target_firmware="kernel2" - fw_setenv boot_part 2 - fw_setenv bootcmd "run altnandboot" - elif [ "$cur_boot_part" = "2" ] - then - # current alt boot - update primary boot - target_firmware="kernel1" - fw_setenv boot_part 1 - fw_setenv bootcmd "run nandboot" - fi - - echo "$target_firmware" -} - -linksys_get_root_magic() { - (get_image "$@" | dd skip=786432 bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2>/dev/null -} - -platform_do_upgrade_linksys() { - local magic_long="$(get_magic_long "$1")" - - mkdir -p /var/lock - local part_label="$(linksys_get_target_firmware)" - touch /var/lock/fw_printenv.lock - - if [ ! -n "$part_label" ] - then - echo "cannot find target partition" - exit 1 - fi - - local target_mtd=$(find_mtd_part $part_label) - - [ "$magic_long" = "73797375" ] && { - CI_KERNPART="$part_label" - if [ "$part_label" = "kernel1" ] - then - CI_UBIPART="rootfs1" - else - CI_UBIPART="rootfs2" - fi - - nand_upgrade_tar "$1" - } - [ "$magic_long" = "27051956" ] && { - # check firmwares' rootfs types - local target_mtd=$(find_mtd_part $part_label) - local oldroot="$(linksys_get_root_magic $target_mtd)" - local newroot="$(linksys_get_root_magic "$1")" - - if [ "$newroot" = "55424923" -a "$oldroot" = "55424923" ] - # we're upgrading from a firmware with UBI to one with UBI - then - # erase everything to be safe - mtd erase $part_label - get_image "$1" | mtd -n write - $part_label - else - get_image "$1" | mtd write - $part_label - fi - } -} - -linksys_preupgrade() { - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /usr/sbin/fw_printenv /usr/sbin/fw_setenv" - export RAMFS_COPY_BIN="${RAMFS_COPY_BIN} /bin/mkdir /bin/touch" - export RAMFS_COPY_DATA="${RAMFS_COPY_DATA} /etc/fw_env.config /var/lock/fw_printenv.lock" - - [ -f /tmp/sysupgrade.tgz ] && { - cp /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz - } -} - -append sysupgrade_pre_upgrade linksys_preupgrade diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh deleted file mode 100755 index f5e44c357a..0000000000 --- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# - -. /lib/mvebu.sh - -RAMFS_COPY_DATA=/lib/mvebu.sh - -platform_check_image() { - local board=$(mvebu_board_name) - local magic_long="$(get_magic_long "$1")" - - [ "$#" -gt 1 ] && return 1 - - case "$board" in - armada-xp-mamba ) - [ "$magic_long" != "27051956" -a "$magic_long" != "73797375" ] && { - echo "Invalid image type." - return 1 - } - return 0; - ;; - esac - - echo "Sysupgrade is not yet supported on $board." - return 1 -} - -platform_do_upgrade() { - local board=$(mvebu_board_name) - - case "$board" in - armada-xp-mamba) - platform_do_upgrade_linksys "$ARGV" - ;; - *) - default_do_upgrade "$ARGV" - ;; - esac -} - -disable_watchdog() { - killall watchdog - ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { - echo 'Could not disable watchdog' - return 1 - } -} - -append sysupgrade_pre_upgrade disable_watchdog |