summaryrefslogtreecommitdiff
path: root/target/linux/octeon/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/octeon/base-files')
-rw-r--r--target/linux/octeon/base-files/etc/uci-defaults/01_network31
-rwxr-xr-xtarget/linux/octeon/base-files/lib/functions/octeon.sh50
-rwxr-xr-xtarget/linux/octeon/base-files/lib/upgrade/platform.sh54
3 files changed, 0 insertions, 135 deletions
diff --git a/target/linux/octeon/base-files/etc/uci-defaults/01_network b/target/linux/octeon/base-files/etc/uci-defaults/01_network
deleted file mode 100644
index bda8d0c..0000000
--- a/target/linux/octeon/base-files/etc/uci-defaults/01_network
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-
-[ -e /etc/config/network ] && exit 0
-
-. /lib/functions/uci-defaults.sh
-. /lib/functions/octeon.sh
-
-touch /etc/config/network
-
-board=$(octeon_board_name)
-
-case "$board" in
-erlite)
- ucidef_set_interface_loopback
- ucidef_set_interface_lan 'eth0'
- ucidef_set_interface_wan 'eth1'
- ;;
-
-*)
- ucidef_set_interface_loopback
- ucidef_set_interface_wan 'eth1'
- ucidef_set_interface_lan 'eth0'
- ;;
-esac
-
-uci commit network
-
-exit 0
diff --git a/target/linux/octeon/base-files/lib/functions/octeon.sh b/target/linux/octeon/base-files/lib/functions/octeon.sh
deleted file mode 100755
index deae9e3..0000000
--- a/target/linux/octeon/base-files/lib/functions/octeon.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2010-2013 OpenWrt.org
-#
-
-OCTEON_BOARD_NAME=
-OCTEON_MODEL=
-
-octeon_board_detect() {
- local machine
- local name
-
- machine=$(grep "^system type" /proc/cpuinfo | sed "s/system type.*: \(.*\)/\1/g")
-
- case "$machine" in
- "UBNT_E100"*)
- name="erlite"
- ;;
-
- "UBNT_E200"*)
- name="er"
- ;;
-
- "UBNT_E220"*)
- name="erpro"
- ;;
-
- *)
- name="generic"
- ;;
- esac
-
- [ -z "$OCTEON_BOARD_NAME" ] && OCTEON_BOARD_NAME="$name"
- [ -z "$OCTEON_MODEL" ] && OCTEON_MODEL="$machine"
-
- [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-
- echo "$OCTEON_BOARD_NAME" > /tmp/sysinfo/board_name
- echo "$OCTEON_MODEL" > /tmp/sysinfo/model
-}
-
-octeon_board_name() {
- local name
-
- [ -f /tmp/sysinfo/board_name ] || octeon_board_detect
- [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
- [ -z "$name" ] && name="unknown"
-
- echo "$name"
-}
diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh
deleted file mode 100755
index e4c7b6f..0000000
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-
-. /lib/functions/octeon.sh
-
-platform_do_upgrade() {
- local board=$(octeon_board_name)
-
- case "$board" in
- erlite)
- local tar_file="$1"
- local kernel_length=`(tar xf $tar_file sysupgrade-erlite/kernel -O | wc -c) 2> /dev/null`
- local rootfs_length=`(tar xf $tar_file sysupgrade-erlite/root -O | wc -c) 2> /dev/null`
-
- [ -f /boot/vmlinux.64 -a ! -L /boot/vmlinux.64 ] && {
- mv /boot/vmlinux.64 /boot/vmlinux.64.previous
- mv /boot/vmlinux.64.md5 /boot/vmlinux.64.md5.previous
- }
-
- mkdir -p /boot
- mount -t vfat /dev/sda1 /boot
- tar xf $tar_file sysupgrade-erlite/kernel -O > /boot/vmlinux.64
- md5sum /boot/vmlinux.64 | cut -f1 -d " " > /boot/vmlinux.64.md5
- tar xf $tar_file sysupgrade-erlite/root -O | dd of=/dev/sda2 bs=4096
- sync
- umount /mnt
- return 0
- ;;
- esac
-
- return 1
-
-}
-
-platform_check_image() {
- local board=$(octeon_board_name)
-
- case "$board" in
- erlite)
- local tar_file="$1"
- local kernel_length=`(tar xf $tar_file sysupgrade-erlite/kernel -O | wc -c) 2> /dev/null`
- local rootfs_length=`(tar xf $tar_file sysupgrade-erlite/root -O | wc -c) 2> /dev/null`
- [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {
- echo "The upgarde image is corrupt."
- return 1
- }
- return 0
- ;;
- esac
-
- echo "Sysupgrade is not yet supported on $board."
- return 1
-}